@ouro.bot/cli 0.1.0-alpha.1311 → 0.1.0-alpha.1312
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-rsvp.js +13 -4
- package/dist/repertoire/tools-travel.js +21 -4
- package/dist/repertoire/tools-vault.js +8 -3
- 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.1312",
|
|
6
|
+
"changes": [
|
|
7
|
+
"The weather, travel advisory, place search, vault setup and RSVP tools carry Ouro AX cards, and their errors end with a code the card explains."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1311",
|
|
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.1312</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,23 +38,24 @@ const fs = __importStar(require("node:fs"));
|
|
|
38
38
|
const runtime_1 = require("../nerves/runtime");
|
|
39
39
|
const query_1 = require("../rsvp/query");
|
|
40
40
|
const snapshot_1 = require("../rsvp/snapshot");
|
|
41
|
+
const tools_base_1 = require("./tools-base");
|
|
41
42
|
function readSnapshot(snapshotPath) {
|
|
42
43
|
if (!snapshotPath || snapshotPath.trim().length === 0) {
|
|
43
|
-
return { ok: false, reason: "missing", message: "RSVP snapshot not found." };
|
|
44
|
+
return { ok: false, reason: "missing", message: (0, tools_base_1.withCode)("RSVP snapshot not found.", "snapshot-not-found") };
|
|
44
45
|
}
|
|
45
46
|
try {
|
|
46
47
|
const raw = fs.readFileSync(snapshotPath, "utf-8");
|
|
47
48
|
const parsed = (0, snapshot_1.parseRsvpSnapshot)(JSON.parse(raw));
|
|
48
49
|
if (!parsed.ok) {
|
|
49
|
-
return { ok: false, reason: "invalid", message: "RSVP snapshot could not be read or failed integrity validation." };
|
|
50
|
+
return { ok: false, reason: "invalid", message: (0, tools_base_1.withCode)("RSVP snapshot could not be read or failed integrity validation.", "snapshot-invalid") };
|
|
50
51
|
}
|
|
51
52
|
return { ok: true, snapshot: parsed.snapshot };
|
|
52
53
|
}
|
|
53
54
|
catch (error) {
|
|
54
55
|
if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") {
|
|
55
|
-
return { ok: false, reason: "missing", message: "RSVP snapshot not found." };
|
|
56
|
+
return { ok: false, reason: "missing", message: (0, tools_base_1.withCode)("RSVP snapshot not found.", "snapshot-not-found") };
|
|
56
57
|
}
|
|
57
|
-
return { ok: false, reason: "invalid", message: "RSVP snapshot could not be read or failed integrity validation." };
|
|
58
|
+
return { ok: false, reason: "invalid", message: (0, tools_base_1.withCode)("RSVP snapshot could not be read or failed integrity validation.", "snapshot-invalid") };
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
function emitToolRead(toolName, result) {
|
|
@@ -107,6 +108,10 @@ exports.rsvpToolDefinitions = [
|
|
|
107
108
|
},
|
|
108
109
|
summaryKeys: ["snapshot_path", "query", "status"],
|
|
109
110
|
riskProfile: { mutates: "none", risk: "low", reason: "reads a local native RSVP snapshot" },
|
|
111
|
+
ax: { id: "tool:rsvp_query", group: "turn-rsvp", when: "Pick this to list which guests are pending, declined or coming, or to look one guest up; rsvp_summary gives only totals.", effect: "read", idempotent: true, errors: [
|
|
112
|
+
{ code: "snapshot-not-found", means: "snapshot_path is empty or no file is there.", fix: "Pass the absolute path of the agent's native RSVP snapshot JSON, then query again." },
|
|
113
|
+
{ code: "snapshot-invalid", means: "The file can't be read, isn't JSON, or fails the snapshot's integrity check, so no answer is given from it.", fix: "Don't answer from this file; tell the person, and suggest ouro rsvp doctor to check the snapshots." },
|
|
114
|
+
] },
|
|
110
115
|
},
|
|
111
116
|
{
|
|
112
117
|
tool: {
|
|
@@ -135,5 +140,9 @@ exports.rsvpToolDefinitions = [
|
|
|
135
140
|
},
|
|
136
141
|
summaryKeys: ["snapshot_path"],
|
|
137
142
|
riskProfile: { mutates: "none", risk: "low", reason: "reads a local native RSVP snapshot" },
|
|
143
|
+
ax: { id: "tool:rsvp_summary", group: "turn-rsvp", when: "Pick this for headcounts by reply and when the guest list was fetched, before reporting numbers; rsvp_query names guests.", effect: "read", idempotent: true, errors: [
|
|
144
|
+
{ code: "snapshot-not-found", means: "snapshot_path is empty or no file is there.", fix: "Pass the absolute path of the agent's native RSVP snapshot JSON, then summarize again." },
|
|
145
|
+
{ code: "snapshot-invalid", means: "The file can't be read, isn't JSON, or fails the snapshot's integrity check, so its counts can't be trusted.", fix: "Don't report counts from this file; tell the person, and suggest ouro rsvp doctor to check the snapshots." },
|
|
146
|
+
] },
|
|
138
147
|
},
|
|
139
148
|
];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.travelToolDefinitions = void 0;
|
|
4
|
+
const tools_base_1 = require("./tools-base");
|
|
4
5
|
const travel_api_client_1 = require("./travel-api-client");
|
|
5
6
|
const runtime_1 = require("../nerves/runtime");
|
|
6
7
|
exports.travelToolDefinitions = [
|
|
@@ -36,14 +37,20 @@ exports.travelToolDefinitions = [
|
|
|
36
37
|
const data = await (0, travel_api_client_1.getWeather)(parseFloat(args.lat), parseFloat(args.lon));
|
|
37
38
|
return JSON.stringify(data, null, 2);
|
|
38
39
|
}
|
|
39
|
-
return "Please provide either a city name or lat/lon coordinates.";
|
|
40
|
+
return (0, tools_base_1.withCode)("Please provide either a city name or lat/lon coordinates.", "missing-location");
|
|
40
41
|
}
|
|
41
42
|
catch (err) {
|
|
42
43
|
/* v8 ignore next -- defensive: callers throw Error instances @preserve */
|
|
43
|
-
return `Weather lookup error: ${err instanceof Error ? err.message : String(err)}
|
|
44
|
+
return (0, tools_base_1.withCode)(`Weather lookup error: ${err instanceof Error ? err.message : String(err)}`, "weather-lookup-failed");
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
summaryKeys: ["city", "lat", "lon"],
|
|
48
|
+
riskProfile: { mutates: "none", risk: "low", reason: "reads public weather data" },
|
|
49
|
+
ax: { id: "tool:weather_lookup", group: "turn-travel", when: "Pick this for conditions at one place right now and today's high and low, such as what to wear; it has no later forecast.", effect: "read", errors: [
|
|
50
|
+
{ code: "guardrail-blocked", means: "The person asking isn't a trusted friend, so the weather lookup didn't run.", fix: "Tell them a trusted friend of the agent has to ask; don't call it again in this conversation." },
|
|
51
|
+
{ code: "missing-location", means: "Neither city nor both lat and lon were given, so nothing was looked up.", fix: "Call again with city, or with lat and lon together (geocode_search finds them)." },
|
|
52
|
+
{ code: "weather-lookup-failed", means: "The weather service failed or found no such city; the text before the code says which.", fix: "Check the city's spelling or pass lat and lon from geocode_search, then call again." },
|
|
53
|
+
] },
|
|
47
54
|
},
|
|
48
55
|
{
|
|
49
56
|
tool: {
|
|
@@ -76,10 +83,15 @@ exports.travelToolDefinitions = [
|
|
|
76
83
|
}
|
|
77
84
|
catch (err) {
|
|
78
85
|
/* v8 ignore next -- defensive: callers throw Error instances @preserve */
|
|
79
|
-
return `Travel advisory error: ${err instanceof Error ? err.message : String(err)}
|
|
86
|
+
return (0, tools_base_1.withCode)(`Travel advisory error: ${err instanceof Error ? err.message : String(err)}`, "advisory-lookup-failed");
|
|
80
87
|
}
|
|
81
88
|
},
|
|
82
89
|
summaryKeys: ["country_code"],
|
|
90
|
+
riskProfile: { mutates: "none", risk: "low", reason: "reads a public travel advisory" },
|
|
91
|
+
ax: { id: "tool:travel_advisory", group: "turn-travel", when: "Pick this to check how risky a country is to visit before suggesting or booking a trip there.", effect: "read", errors: [
|
|
92
|
+
{ code: "advisory-lookup-failed", means: "The advisory service failed, or has no advisory for that code; the text before the code says which.", fix: "If no advisory was found, pass a two-letter ISO code such as FR or JP, not a name; if the service failed, say it's unavailable." },
|
|
93
|
+
{ code: "guardrail-blocked", means: "The person asking isn't a trusted friend, so no advisory was looked up.", fix: "Tell them a trusted friend of the agent has to ask; don't retry the advisory in this conversation." },
|
|
94
|
+
] },
|
|
83
95
|
},
|
|
84
96
|
{
|
|
85
97
|
tool: {
|
|
@@ -117,9 +129,14 @@ exports.travelToolDefinitions = [
|
|
|
117
129
|
}
|
|
118
130
|
catch (err) {
|
|
119
131
|
/* v8 ignore next -- defensive: callers throw Error instances @preserve */
|
|
120
|
-
return `Geocode error: ${err instanceof Error ? err.message : String(err)}
|
|
132
|
+
return (0, tools_base_1.withCode)(`Geocode error: ${err instanceof Error ? err.message : String(err)}`, "geocode-failed");
|
|
121
133
|
}
|
|
122
134
|
},
|
|
123
135
|
summaryKeys: ["query"],
|
|
136
|
+
riskProfile: { mutates: "none", risk: "low", reason: "reads public map data" },
|
|
137
|
+
ax: { id: "tool:geocode_search", group: "turn-travel", when: "Pick this to turn a place or address into coordinates, or to find places near a point, before weather_lookup or advice on getting around.", effect: "read", errors: [
|
|
138
|
+
{ code: "geocode-failed", means: "The map service failed to answer; the text before the code says how.", fix: "Wait a moment and call again, or shorten the query to a place name and city." },
|
|
139
|
+
{ code: "guardrail-blocked", means: "The person asking isn't a trusted friend, so no place was searched.", fix: "Tell them a trusted friend of the agent has to ask; don't search again in this conversation." },
|
|
140
|
+
] },
|
|
124
141
|
},
|
|
125
142
|
];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.vaultToolDefinitions = void 0;
|
|
4
|
+
const tools_base_1 = require("./tools-base");
|
|
4
5
|
const identity_1 = require("../heart/identity");
|
|
5
6
|
const runtime_1 = require("../nerves/runtime");
|
|
6
7
|
exports.vaultToolDefinitions = [
|
|
@@ -9,7 +10,7 @@ exports.vaultToolDefinitions = [
|
|
|
9
10
|
type: "function",
|
|
10
11
|
function: {
|
|
11
12
|
name: "vault_setup",
|
|
12
|
-
description: "
|
|
13
|
+
description: "Explain how a person sets up or unlocks this agent's credential vault. Returns the terminal commands to run; changes nothing.",
|
|
13
14
|
parameters: {
|
|
14
15
|
type: "object",
|
|
15
16
|
properties: {},
|
|
@@ -24,7 +25,7 @@ exports.vaultToolDefinitions = [
|
|
|
24
25
|
message: "vault_setup invoked",
|
|
25
26
|
meta: { tool: "vault_setup", agentName },
|
|
26
27
|
});
|
|
27
|
-
return [
|
|
28
|
+
return (0, tools_base_1.withCode)([
|
|
28
29
|
"Vault setup is human-required.",
|
|
29
30
|
"",
|
|
30
31
|
"Why I cannot do it here:",
|
|
@@ -33,8 +34,12 @@ exports.vaultToolDefinitions = [
|
|
|
33
34
|
"Do this in a terminal:",
|
|
34
35
|
` ouro vault create --agent ${agentName}`,
|
|
35
36
|
` ouro vault unlock --agent ${agentName}`,
|
|
36
|
-
].join("\n");
|
|
37
|
+
].join("\n"), "human-required");
|
|
37
38
|
},
|
|
38
39
|
summaryKeys: [],
|
|
40
|
+
ax: { id: "tool:vault_setup", group: "turn-vault", when: "Pick this when someone asks you to create or unlock your own vault; the reply gives them the terminal steps.", effect: "person-only", idempotent: true, errors: [
|
|
41
|
+
{ code: "human-required", means: "Creating or unlocking a vault needs a secret typed by a person, so this tool never does it itself.", fix: "Ask the person to run ouro vault create only if the agent has no vault yet, else ouro vault unlock; never ask for the secret." },
|
|
42
|
+
{ code: "guardrail-blocked", means: "Only the agent's family may set up its vault, and the person asking isn't family.", fix: "Don't pass on the vault commands; tell them a family member has to ask." },
|
|
43
|
+
] },
|
|
39
44
|
},
|
|
40
45
|
];
|
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.1312",
|
|
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.1312",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"@ouro.bot/friends"
|
|
12
12
|
],
|