@ouro.bot/cli 0.1.0-alpha.1327 → 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 +6 -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-surface.js +10 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
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
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1327",
|
|
6
12
|
"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
|
];
|
|
@@ -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
|
],
|