@ouro.bot/cli 0.1.0-alpha.1326 → 0.1.0-alpha.1328
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/tools-escalation.js +7 -2
- package/dist/repertoire/tools-friend-link.js +12 -4
- package/dist/repertoire/tools-github.js +6 -1
- package/dist/repertoire/tools-obligations.js +7 -2
- package/dist/repertoire/tools-orientation.js +6 -1
- package/dist/repertoire/tools-session.js +34 -7
- package/dist/repertoire/tools-surface.js +10 -2
- 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.1328",
|
|
6
|
+
"changes": [
|
|
7
|
+
"orientation_get, let_go, report_failure, file_ouroboros_bug, surface and friend_link_code have Ouro AX cards; their failures end with a code, and orientation_get states a low-risk profile."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.1327",
|
|
12
|
+
"changes": [
|
|
13
|
+
"The five session tools have Ouro AX cards; their failures end with a code, and query_active_work and query_session state a low-risk profile."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.1326",
|
|
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.1328</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -38,6 +38,7 @@ const path = __importStar(require("path"));
|
|
|
38
38
|
const friends_1 = require("@ouro.bot/friends");
|
|
39
39
|
const failure_reports_1 = require("../heart/failure-reports");
|
|
40
40
|
const runtime_1 = require("../nerves/runtime");
|
|
41
|
+
const tool_error_code_1 = require("./tool-error-code");
|
|
41
42
|
function text(value) {
|
|
42
43
|
return typeof value === "string" ? value : "";
|
|
43
44
|
}
|
|
@@ -67,7 +68,7 @@ exports.reportFailureToolDefinition = {
|
|
|
67
68
|
},
|
|
68
69
|
handler: async (args, ctx) => {
|
|
69
70
|
if (!ctx?.agentRoot)
|
|
70
|
-
return "report_failure is unavailable: no agent runtime.";
|
|
71
|
+
return (0, tool_error_code_1.withCode)("report_failure is unavailable: no agent runtime.", "no-agent-runtime");
|
|
71
72
|
const severity = ["low", "medium", "high"].includes(args.severity) ? args.severity : "medium";
|
|
72
73
|
const store = new friends_1.FileFriendStore(path.join(ctx.agentRoot, "friends"));
|
|
73
74
|
const result = await (0, failure_reports_1.fileFailureReport)(ctx.agentRoot, store, {
|
|
@@ -85,8 +86,12 @@ exports.reportFailureToolDefinition = {
|
|
|
85
86
|
localPath: path.join(ctx.agentRoot, "state", "reports", `${result.id}.json`),
|
|
86
87
|
recovery: "agent-runnable: retain/read this local report and retry report_failure after authorization is repaired. human-required: configure a verified escalation peer and its root-owned grant, or submit a sanitized issue at https://github.com/ourostack/ouroboros/issues/new. No peer was granted access and no external issue was filed.",
|
|
87
88
|
});
|
|
88
|
-
return `Not filed (${result.reason}): ${result.detail}
|
|
89
|
+
return (0, tool_error_code_1.withCode)(`Not filed (${result.reason}): ${result.detail}`, "report-not-filed");
|
|
89
90
|
}
|
|
90
91
|
return JSON.stringify({ filed: true, reportId: result.id, shortId: result.shortId, duplicate: result.duplicate, recipients: result.recipients });
|
|
91
92
|
},
|
|
93
|
+
ax: { id: "tool:report_failure", group: "turn-escalation", when: "Pick this when a tool you need is missing or keeps failing in a way you can't get around, to hand it to the engineers who fix you.", effect: "write", errors: [
|
|
94
|
+
{ code: "no-agent-runtime", means: "This turn runs without an agent home, so there is nowhere to file from.", fix: "Tell the person plainly what failed; the report can be filed from a normal chat later." },
|
|
95
|
+
{ code: "report-not-filed", means: "The report was refused, usually because ari_words, tried or error is missing; the message gives the reason.", fix: "Fill in all three fields and call report_failure again." },
|
|
96
|
+
] },
|
|
92
97
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.friendLinkToolDefinition = void 0;
|
|
4
|
+
const tool_error_code_1 = require("./tool-error-code");
|
|
4
5
|
const identity_1 = require("../heart/identity");
|
|
5
6
|
const friend_link_codes_1 = require("../mind/friend-link-codes");
|
|
6
7
|
const runtime_1 = require("../nerves/runtime");
|
|
@@ -34,15 +35,15 @@ exports.friendLinkToolDefinition = {
|
|
|
34
35
|
});
|
|
35
36
|
const context = ctx?.context;
|
|
36
37
|
if (!context?.friend)
|
|
37
|
-
return "no friend context: I can only issue a link code to the person I'm talking to.";
|
|
38
|
+
return (0, tool_error_code_1.withCode)("no friend context: I can only issue a link code to the person I'm talking to.", "no-friend-context");
|
|
38
39
|
const friend = context.friend;
|
|
39
40
|
if (friend.trustLevel !== "family")
|
|
40
|
-
return "link codes are only for family.";
|
|
41
|
+
return (0, tool_error_code_1.withCode)("link codes are only for family.", "family-only");
|
|
41
42
|
if (context.isGroupChat)
|
|
42
|
-
return "link codes can't be issued in a group chat. Ask me in a 1:1 chat.";
|
|
43
|
+
return (0, tool_error_code_1.withCode)("link codes can't be issued in a group chat. Ask me in a 1:1 chat.", "group-chat");
|
|
43
44
|
const channel = args.channel;
|
|
44
45
|
if (channel && !LINKABLE_CHANNELS.includes(channel))
|
|
45
|
-
return `unknown channel '${channel}'. Use one of: ${LINKABLE_CHANNELS.join(", ")}
|
|
46
|
+
return (0, tool_error_code_1.withCode)(`unknown channel '${channel}'. Use one of: ${LINKABLE_CHANNELS.join(", ")}.`, "invalid-channel");
|
|
46
47
|
const issued = (0, friend_link_codes_1.issueLinkCode)({
|
|
47
48
|
agentRoot: ctx?.agentRoot ?? (0, identity_1.getAgentRoot)(),
|
|
48
49
|
friend,
|
|
@@ -54,4 +55,11 @@ exports.friendLinkToolDefinition = {
|
|
|
54
55
|
},
|
|
55
56
|
summaryKeys: ["channel"],
|
|
56
57
|
riskProfile: { mutates: "durable_state_write", risk: "high", reason: "issues a code that links a new account to a family friend" },
|
|
58
|
+
ax: { id: "tool:friend_link_code", group: "turn-friends", when: "Pick this when a family member wants another of their own accounts, such as Teams, recognised as them.", effect: "write", errors: [
|
|
59
|
+
{ code: "no-friend-context", means: "This turn has no known person to issue a code for.", fix: "Issue the code from a chat with that family member." },
|
|
60
|
+
{ code: "family-only", means: "Link codes are only for family, and this person isn't family.", fix: "Tell them plainly; their owner can raise their trust level if that is wanted." },
|
|
61
|
+
{ code: "group-chat", means: "Codes aren't issued in group chats.", fix: "Ask them to message you one to one, then issue it there." },
|
|
62
|
+
{ code: "invalid-channel", means: "channel isn't one of the linkable channels listed in the message.", fix: "Call again with a listed channel, or leave channel out to accept any." },
|
|
63
|
+
{ code: "orientation-hold", means: "This turn is on a correction hold, so new link codes wait.", fix: "Call orientation_get, settle what the person meant, then issue the code if it is still wanted." },
|
|
64
|
+
] },
|
|
57
65
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.githubToolDefinitions = void 0;
|
|
4
|
+
const tool_error_code_1 = require("./tool-error-code");
|
|
4
5
|
const auth_required_1 = require("./auth-required");
|
|
5
6
|
const github_client_1 = require("./github-client");
|
|
6
7
|
const runtime_1 = require("../nerves/runtime");
|
|
@@ -31,7 +32,7 @@ exports.githubToolDefinitions = [
|
|
|
31
32
|
});
|
|
32
33
|
if (!ctx?.githubToken) {
|
|
33
34
|
const recovery = (0, auth_required_1.authRequired)(ctx, "github", "I need access to GitHub.");
|
|
34
|
-
return `${recovery}\nNot filed on GitHub. human-required: sign in at https://github.com/ourostack/ouroboros/issues/new and submit the title/body after checking for private data. agent-runnable: call report_failure to retain the failure locally if no authorized filing route is available
|
|
35
|
+
return (0, tool_error_code_1.withCode)(`${recovery}\nNot filed on GitHub. human-required: sign in at https://github.com/ourostack/ouroboros/issues/new and submit the title/body after checking for private data. agent-runnable: call report_failure to retain the failure locally if no authorized filing route is available.`, "auth-required");
|
|
35
36
|
}
|
|
36
37
|
const owner = "ourostack";
|
|
37
38
|
const repo = "ouroboros";
|
|
@@ -46,5 +47,9 @@ exports.githubToolDefinitions = [
|
|
|
46
47
|
integration: "github",
|
|
47
48
|
summaryKeys: ["title"],
|
|
48
49
|
riskProfile: { mutates: "external_side_effect", risk: "high", reason: "files a GitHub issue" },
|
|
50
|
+
ax: { id: "tool:file_ouroboros_bug", group: "turn-escalation", when: "Pick this to open a public GitHub issue on the harness repo when you hold GitHub access; without it, report_failure keeps the problem locally.", effect: "write", errors: [
|
|
51
|
+
{ code: "auth-required", means: "This turn has no GitHub authorization, so nothing was filed; the message gives the sign-in or manual route.", fix: "Call report_failure with the same facts, and pass on the manual route if the person wants a public issue." },
|
|
52
|
+
{ code: "orientation-hold", means: "This turn is on a correction hold, so new issues wait.", fix: "Call orientation_get, settle what the person meant, then go ahead if it is still right." },
|
|
53
|
+
] },
|
|
49
54
|
},
|
|
50
55
|
];
|
|
@@ -98,7 +98,7 @@ function completePacketsForObligation(agentRoot, obligationId) {
|
|
|
98
98
|
}
|
|
99
99
|
function letGo(args, agentRoot, agentName) {
|
|
100
100
|
if (typeof args.id !== "string" || args.id.trim().length === 0) {
|
|
101
|
-
return JSON.stringify({ error: "id is required" });
|
|
101
|
+
return JSON.stringify({ error: "id is required", code: "missing-argument" });
|
|
102
102
|
}
|
|
103
103
|
const id = args.id.trim();
|
|
104
104
|
const reason = typeof args.reason === "string" && args.reason.trim().length > 0
|
|
@@ -147,7 +147,7 @@ function letGo(args, agentRoot, agentName) {
|
|
|
147
147
|
});
|
|
148
148
|
return JSON.stringify({ kind: "obligation", let_go: id, reason });
|
|
149
149
|
}
|
|
150
|
-
return JSON.stringify({ error: `no obligation found with id "${id}"
|
|
150
|
+
return JSON.stringify({ error: `no obligation found with id "${id}"`, code: "obligation-not-found" });
|
|
151
151
|
}
|
|
152
152
|
exports.obligationToolDefinitions = [
|
|
153
153
|
{
|
|
@@ -178,5 +178,10 @@ exports.obligationToolDefinitions = [
|
|
|
178
178
|
return letGo({ id: args.id, reason: args.reason }, agentRoot, agentName);
|
|
179
179
|
},
|
|
180
180
|
riskProfile: { mutates: "durable_state_write", risk: "high", reason: "releases durable obligation state" },
|
|
181
|
+
ax: { id: "tool:let_go", group: "turn-orientation", when: "Pick this to drop a held work item that was settled elsewhere or no longer applies, so it stops cycling in your prompt.", effect: "write", idempotent: true, errors: [
|
|
182
|
+
{ code: "missing-argument", means: "id is empty.", fix: "Copy the bracketed id from the held work items list and call let_go with it." },
|
|
183
|
+
{ code: "obligation-not-found", means: "No held item or obligation has that id.", fix: "Check the id against the held work items list; a mistyped id is the usual cause." },
|
|
184
|
+
{ code: "orientation-hold", means: "This turn is on a correction hold, so releases wait.", fix: "Call orientation_get, settle what the person meant, then go ahead if it is still right." },
|
|
185
|
+
] },
|
|
181
186
|
},
|
|
182
187
|
];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.orientationToolDefinitions = void 0;
|
|
4
4
|
const runtime_1 = require("../nerves/runtime");
|
|
5
|
+
const tool_error_code_1 = require("./tool-error-code");
|
|
5
6
|
exports.orientationToolDefinitions = [
|
|
6
7
|
{
|
|
7
8
|
tool: {
|
|
@@ -24,8 +25,12 @@ exports.orientationToolDefinitions = [
|
|
|
24
25
|
meta: { available: !!ctx?.orientationFrame },
|
|
25
26
|
});
|
|
26
27
|
if (!ctx?.orientationFrame)
|
|
27
|
-
return "no orientation frame is available for this turn.";
|
|
28
|
+
return (0, tool_error_code_1.withCode)("no orientation frame is available for this turn.", "no-orientation-frame");
|
|
28
29
|
return JSON.stringify(ctx.orientationFrame, null, 2);
|
|
29
30
|
},
|
|
31
|
+
riskProfile: { mutates: "none", risk: "low" },
|
|
32
|
+
ax: { id: "tool:orientation_get", group: "turn-orientation", when: "Pick this when the latest message is terse, corrective or points back at something, to see what it refers to before changing anything.", effect: "read", idempotent: true, errors: [
|
|
33
|
+
{ code: "no-orientation-frame", means: "This turn has no orientation frame, as in a habit or private-runtime turn.", fix: "Read the conversation itself, and ask the person if what they meant is still unclear." },
|
|
34
|
+
] },
|
|
30
35
|
},
|
|
31
36
|
];
|
|
@@ -56,6 +56,7 @@ const obligations_1 = require("../arc/obligations");
|
|
|
56
56
|
const progress_story_1 = require("../heart/progress-story");
|
|
57
57
|
const habit_session_summary_1 = require("../heart/habits/habit-session-summary");
|
|
58
58
|
const cross_chat_delivery_1 = require("../heart/cross-chat-delivery");
|
|
59
|
+
const tool_error_code_1 = require("./tool-error-code");
|
|
59
60
|
const tool_arguments_1 = require("./tool-arguments");
|
|
60
61
|
const mail_import_discovery_1 = require("../heart/mail-import-discovery");
|
|
61
62
|
const outbound_1 = require("../senses/voice/outbound");
|
|
@@ -198,12 +199,17 @@ function renderCrossChatDeliveryStatus(target, result) {
|
|
|
198
199
|
: result.status === "blocked"
|
|
199
200
|
? "blocked"
|
|
200
201
|
: "failed";
|
|
201
|
-
|
|
202
|
+
const story = (0, progress_story_1.renderProgressStory)((0, progress_story_1.buildProgressStory)({
|
|
202
203
|
scope: "shared-work",
|
|
203
204
|
phase,
|
|
204
205
|
objective: `message to ${target}`,
|
|
205
206
|
outcomeText: `${lead}\n${result.detail}`,
|
|
206
207
|
}));
|
|
208
|
+
if (result.status === "blocked")
|
|
209
|
+
return (0, tool_error_code_1.withCode)(story, "delivery-blocked");
|
|
210
|
+
if (result.status === "failed")
|
|
211
|
+
return (0, tool_error_code_1.withCode)(story, "delivery-failed");
|
|
212
|
+
return story;
|
|
207
213
|
}
|
|
208
214
|
function normalizeHabitSendStatus(status) {
|
|
209
215
|
return status === "queued_for_later" ? "queued" : status;
|
|
@@ -650,6 +656,10 @@ exports.sessionToolDefinitions = [
|
|
|
650
656
|
? `${activeWork}\n\n${formatButlerOperationalVisibility(readButlerOperationalVisibility(), { section: args.section, offset: numeric(args.offset, 0, 0, 10_000), limit: numeric(args.limit, 10, 1, 20) })}`
|
|
651
657
|
: activeWork;
|
|
652
658
|
},
|
|
659
|
+
riskProfile: { mutates: "none", risk: "low" },
|
|
660
|
+
ax: { id: "tool:query_active_work", group: "turn-sessions", when: "Pick this first for any whole-self status question, to see every live session, coding lane and owed return at once.", effect: "read", idempotent: true, errors: [
|
|
661
|
+
{ code: "invalid-arguments", means: "section isn't one of the listed sections, or offset or limit isn't text.", fix: "Pass section as all, health, policy, awaits, telegram, events, actions or provider." },
|
|
662
|
+
] },
|
|
653
663
|
},
|
|
654
664
|
{
|
|
655
665
|
tool: {
|
|
@@ -702,6 +712,9 @@ exports.sessionToolDefinitions = [
|
|
|
702
712
|
reason: "reads habit run summaries from local receipts and session artifacts",
|
|
703
713
|
},
|
|
704
714
|
summaryKeys: ["runId", "habitName", "operationId", "which"],
|
|
715
|
+
ax: { id: "tool:session_summary", group: "turn-sessions", when: "Pick this to learn how a habit run went, by exact runId or by habit name and which run, without opening session files.", effect: "read", idempotent: true, errors: [
|
|
716
|
+
{ code: "invalid-arguments", means: "A selector isn't text or which isn't allowed; runId mixed with other selectors comes back as invalid_selector JSON.", fix: "Pass runId alone, or habitName or operationId with an optional which such as latest." },
|
|
717
|
+
] },
|
|
705
718
|
},
|
|
706
719
|
{
|
|
707
720
|
tool: {
|
|
@@ -738,7 +751,7 @@ exports.sessionToolDefinitions = [
|
|
|
738
751
|
level: "warn", component: "tools", event: "tool.session_path_rejected",
|
|
739
752
|
message: "session query rejected invalid coordinates", meta: { reason: "invalid friend or channel" },
|
|
740
753
|
});
|
|
741
|
-
return NO_SESSION_FOUND_MESSAGE;
|
|
754
|
+
return (0, tool_error_code_1.withCode)(NO_SESSION_FOUND_MESSAGE, "session-not-found");
|
|
742
755
|
}
|
|
743
756
|
(0, tool_arguments_1.assertRelationshipToolOwner)(ctx);
|
|
744
757
|
// Resolve friend name -> UUID if not already a UUID or "self"
|
|
@@ -751,7 +764,7 @@ exports.sessionToolDefinitions = [
|
|
|
751
764
|
}
|
|
752
765
|
if (mode === "status") {
|
|
753
766
|
if (friendId !== "self" || channel !== "inner") {
|
|
754
|
-
return "status mode is only available for self/private runtime.";
|
|
767
|
+
return (0, tool_error_code_1.withCode)("status mode is only available for self/private runtime.", "status-self-only");
|
|
755
768
|
}
|
|
756
769
|
const agentRoot = ctx?.agentRoot ?? (0, identity_1.getAgentRoot)(ctx?.agentName);
|
|
757
770
|
const sessionPath = (0, thoughts_1.getPrivateRuntimeSessionPath)(agentRoot);
|
|
@@ -778,7 +791,7 @@ exports.sessionToolDefinitions = [
|
|
|
778
791
|
level: "warn", component: "tools", event: "tool.session_path_rejected",
|
|
779
792
|
message: "session query rejected an unconfined path", meta: { reason: error.message },
|
|
780
793
|
});
|
|
781
|
-
return NO_SESSION_FOUND_MESSAGE;
|
|
794
|
+
return (0, tool_error_code_1.withCode)(NO_SESSION_FOUND_MESSAGE, "session-not-found");
|
|
782
795
|
}
|
|
783
796
|
const sessionTail = await summarizeSessionTailSafely({
|
|
784
797
|
sessionPath: sessFile,
|
|
@@ -790,13 +803,18 @@ exports.sessionToolDefinitions = [
|
|
|
790
803
|
summarize: ctx?.summarize,
|
|
791
804
|
});
|
|
792
805
|
if (sessionTail.kind === "missing") {
|
|
793
|
-
return NO_SESSION_FOUND_MESSAGE;
|
|
806
|
+
return (0, tool_error_code_1.withCode)(NO_SESSION_FOUND_MESSAGE, "session-not-found");
|
|
794
807
|
}
|
|
795
808
|
if (sessionTail.kind === "empty") {
|
|
796
809
|
return EMPTY_SESSION_MESSAGE;
|
|
797
810
|
}
|
|
798
811
|
return sessionTail.summary;
|
|
799
812
|
},
|
|
813
|
+
riskProfile: { mutates: "none", risk: "low" },
|
|
814
|
+
ax: { id: "tool:query_session", group: "turn-sessions", when: "Pick this to read the recent transcript of another chat by friend and channel, or your private runtime's progress with status mode.", effect: "read", idempotent: true, errors: [
|
|
815
|
+
{ code: "session-not-found", means: "No session exists for that friend, channel and key, or the coordinates aren't valid.", fix: "Check the friend's id with friend_list and the channel name, and leave key out unless you know it." },
|
|
816
|
+
{ code: "status-self-only", means: "mode status works only for friendId self on channel inner.", fix: "Use mode transcript for other chats, or friendId self with channel inner for status." },
|
|
817
|
+
] },
|
|
800
818
|
},
|
|
801
819
|
{
|
|
802
820
|
tool: {
|
|
@@ -1123,6 +1141,11 @@ exports.sessionToolDefinitions = [
|
|
|
1123
1141
|
return renderCrossChatDeliveryStatus(`${friendId} on ${channel}/${key}`, deliveryResult);
|
|
1124
1142
|
},
|
|
1125
1143
|
riskProfile: sendMessageRiskProfile,
|
|
1144
|
+
ax: { id: "tool:send_message", group: "turn-sessions", when: "Pick this to reach someone in a different chat or channel than this one, or a phone call by voice; to keep thinking privately, use ponder.", effect: "write", errors: [
|
|
1145
|
+
{ code: "delivery-blocked", means: "The message wasn't sent: no routable chat exists for that session, or the text carries internal markers.", fix: "Check the friend and channel with query_session, and remove internal notes from the content." },
|
|
1146
|
+
{ code: "delivery-failed", means: "The channel tried to send and failed, or the person can't be reached that way.", fix: "Try again once, or reach them on another channel they use." },
|
|
1147
|
+
{ code: "orientation-hold", means: "This turn is on a correction hold, so messages to other chats wait.", fix: "Call orientation_get, settle what the person meant, then send if it still fits." },
|
|
1148
|
+
] },
|
|
1126
1149
|
},
|
|
1127
1150
|
{
|
|
1128
1151
|
tool: {
|
|
@@ -1141,11 +1164,11 @@ exports.sessionToolDefinitions = [
|
|
|
1141
1164
|
},
|
|
1142
1165
|
handler: (args, ctx) => {
|
|
1143
1166
|
if (!ctx?.supportedReasoningEfforts || !ctx.setReasoningEffort) {
|
|
1144
|
-
return "reasoning effort adjustment is not available in this context.";
|
|
1167
|
+
return (0, tool_error_code_1.withCode)("reasoning effort adjustment is not available in this context.", "effort-unavailable");
|
|
1145
1168
|
}
|
|
1146
1169
|
const level = (args.level || "").trim();
|
|
1147
1170
|
if (!ctx.supportedReasoningEfforts.includes(level)) {
|
|
1148
|
-
return `invalid reasoning effort level "${level}". accepted levels: ${ctx.supportedReasoningEfforts.join(", ")}
|
|
1171
|
+
return (0, tool_error_code_1.withCode)(`invalid reasoning effort level "${level}". accepted levels: ${ctx.supportedReasoningEfforts.join(", ")}`, "invalid-effort-level");
|
|
1149
1172
|
}
|
|
1150
1173
|
ctx.setReasoningEffort(level);
|
|
1151
1174
|
(0, runtime_1.emitNervesEvent)({
|
|
@@ -1158,5 +1181,9 @@ exports.sessionToolDefinitions = [
|
|
|
1158
1181
|
},
|
|
1159
1182
|
requiredCapability: "reasoning-effort",
|
|
1160
1183
|
summaryKeys: ["level"],
|
|
1184
|
+
ax: { id: "tool:set_reasoning_effort", group: "turn-sessions", when: "Pick this to think harder on a knotty problem or lighter on routine work in the turns that follow.", effect: "write", idempotent: true, errors: [
|
|
1185
|
+
{ code: "effort-unavailable", means: "This model or context has no adjustable reasoning effort.", fix: "Carry on at the current effort." },
|
|
1186
|
+
{ code: "invalid-effort-level", means: "That level isn't one this model accepts; the message lists the accepted ones.", fix: "Call again with one of the listed levels." },
|
|
1187
|
+
] },
|
|
1161
1188
|
},
|
|
1162
1189
|
];
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.surfaceToolDefinition = exports.surfaceToolDef = void 0;
|
|
36
|
+
exports.toolCards = exports.surfaceToolDefinition = exports.surfaceToolDef = void 0;
|
|
37
37
|
exports.routeSurfaceToFriend = routeSurfaceToFriend;
|
|
38
38
|
const fs = __importStar(require("fs"));
|
|
39
39
|
const crypto_1 = require("crypto");
|
|
@@ -47,6 +47,7 @@ const bluebubbles_meta_guard_1 = require("../senses/bluebubbles-meta-guard");
|
|
|
47
47
|
const runtime_1 = require("../nerves/runtime");
|
|
48
48
|
const path = __importStar(require("path"));
|
|
49
49
|
const outbound_1 = require("../senses/voice/outbound");
|
|
50
|
+
const tool_error_code_1 = require("./tool-error-code");
|
|
50
51
|
/* v8 ignore start -- surface voice delivery hints are covered at the outbound voice bridge; this adapter only normalizes optional tool args @preserve */
|
|
51
52
|
function normalizeSurfaceDeliveryChannel(value) {
|
|
52
53
|
if (typeof value !== "string")
|
|
@@ -309,7 +310,7 @@ exports.surfaceToolDefinition = {
|
|
|
309
310
|
contentLength: rawContent.length,
|
|
310
311
|
},
|
|
311
312
|
});
|
|
312
|
-
return "failed — blocked: contains internal meta markers";
|
|
313
|
+
return (0, tool_error_code_1.withCode)("failed — blocked: contains internal meta markers", "delivery-blocked");
|
|
313
314
|
}
|
|
314
315
|
const queue = ctx?.delegatedOrigins ?? [];
|
|
315
316
|
const agentName = (() => { try {
|
|
@@ -390,4 +391,11 @@ exports.surfaceToolDefinition = {
|
|
|
390
391
|
reason: "queues or delivers surfaced responses and may fulfill obligations",
|
|
391
392
|
},
|
|
392
393
|
};
|
|
394
|
+
/** surface's Ouro AX card. The bare schema above is exported first, so the census reads the card from this list. */
|
|
395
|
+
exports.toolCards = [
|
|
396
|
+
{ id: "tool:surface", group: "turn-sessions", when: "Pick this to hand a finished thought back to whoever is waiting on it, by delegationId, or to reach out to a friend unprompted.", effect: "write", errors: [
|
|
397
|
+
{ code: "delivery-blocked", means: "The content carries internal meta markers, so nothing was delivered.", fix: "Rewrite the content as plain words for the person and surface it again." },
|
|
398
|
+
{ code: "orientation-hold", means: "This turn is on a correction hold, so surfacing waits.", fix: "Call orientation_get, settle what the person meant, then surface the thought if it still answers them." },
|
|
399
|
+
] },
|
|
400
|
+
];
|
|
393
401
|
/* v8 ignore stop */
|
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.1328",
|
|
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.1328",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"@ouro.bot/friends"
|
|
12
12
|
],
|