@ouro.bot/cli 0.1.0-alpha.1450 → 0.1.0-alpha.1451
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
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "Each pull request writes its own change note under changes/; the release job on main gives each landed change its version and adds the notes here (scripts/release-version.cjs). On main this file stops at the last version set by hand; the published package has every release. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.1451",
|
|
6
|
+
"changes": [
|
|
7
|
+
"The shelf-claim guard no longer puts \"I haven't checked the library\" in front of a reply that did check.",
|
|
8
|
+
"When an agent ran the books CLI through a shell variable that the same command sets, the guard didn't see the lookup. For example: `B=…/books; $B library find …`, `\"$B\"`, `${B}` or `export B=…`. So the guard added the hedge to a correct reply that a person reads.",
|
|
9
|
+
"Now the guard resolves each variable a command set earlier in itself before it looks for the books CLI.",
|
|
10
|
+
"A variable the command doesn't set is still not counted.",
|
|
11
|
+
"Neither is one set only after its use, an alias (the shell never uses one set in the same command), a variable that points at something other than the books CLI, or a run that only removed a copy.",
|
|
12
|
+
"So a reply that never looked still gets the hedge."
|
|
13
|
+
]
|
|
14
|
+
},
|
|
4
15
|
{
|
|
5
16
|
"version": "0.1.0-alpha.1450",
|
|
6
17
|
"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.1451</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -21,6 +21,18 @@ const LIBRARY_LOOKUP_TOOLS = new Set(["media_search", "sanctuary_search_media_ca
|
|
|
21
21
|
const MIN_TITLE_LENGTH = 3;
|
|
22
22
|
/** The bundle's books CLI reading or changing the house book library: `./books get … --deliver`, `books library find …`. */
|
|
23
23
|
const BOOKS_COMMAND = /(?:^|[\s;&|(])(?:[\w.~/-]*\/)?books\s+(?:get|deliver|library\s+(?:find|add))\b/;
|
|
24
|
+
/** `NAME=value` and `export NAME=value` in a command. A value is quoted or runs to a separator. */
|
|
25
|
+
const ASSIGNMENT = /(?:^|[\s;&|(])(?:export\s+)?([A-Za-z_]\w*)=("[^"\n]*"|'[^'\n]*'|[^\s;&|()]+)/g;
|
|
26
|
+
const VARIABLE = /"?\$(?:\{([A-Za-z_]\w*)\}|([A-Za-z_]\w*))"?/g;
|
|
27
|
+
/**
|
|
28
|
+
* The command with each variable it set earlier put back in place, so `B=…/books; $B library find …` reads as the
|
|
29
|
+
* books CLI. A variable is resolved only from an assignment before its use; one the command never sets stays as it is.
|
|
30
|
+
*/
|
|
31
|
+
function resolveOwnVariables(command) {
|
|
32
|
+
const unquote = (value) => value.replace(/^(["'])(.*)\1$/, "$2");
|
|
33
|
+
const assignments = [...command.matchAll(ASSIGNMENT)].map((match) => ({ name: match[1], value: unquote(match[2]), end: match.index + match[0].length }));
|
|
34
|
+
return command.replace(VARIABLE, (whole, braced, bare, at) => assignments.filter((entry) => entry.name === (braced ?? bare) && entry.end <= at).at(-1)?.value ?? whole);
|
|
35
|
+
}
|
|
24
36
|
/** A reply about the gate's own line ("sorry, that note was wrong"): it corrects a disclosure, so it gets none of its own. */
|
|
25
37
|
const APOLOGY = /\b(?:sorry|apolog\w*|my\s+(?:mistake|bad)|ignore|disregard)\b|\bwas\s+wrong\b/i;
|
|
26
38
|
const DISCLOSURE_REF = /\bha(?:ve|d)n['’]?t\s+checked\s+the\s+library\b|\bcan['’]?t\s+promise\s+it['’]?s\s+on\s+the\s+shelf\b|\b(?:that|the|this)\s+(?:line|note|disclaimer|disclosure|warning)\b/i;
|
|
@@ -64,7 +76,7 @@ function titlesFrom(records) {
|
|
|
64
76
|
/** True when a books CLI run this turn succeeded and, if it was a search, found something: the book library backs the claim. */
|
|
65
77
|
function bookLibraryBacked(records) {
|
|
66
78
|
return records.some((record) => {
|
|
67
|
-
if (record.name !== "shell" || !BOOKS_COMMAND.test(record.args.command ?? "") || /^error:/i.test(record.result.trim()))
|
|
79
|
+
if (record.name !== "shell" || !BOOKS_COMMAND.test(resolveOwnVariables(record.args.command ?? "")) || /^error:/i.test(record.result.trim()))
|
|
68
80
|
return false;
|
|
69
81
|
let parsed;
|
|
70
82
|
try {
|
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.1451",
|
|
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.1451",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"@ouro.bot/friends"
|
|
12
12
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouro.bot/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.1451",
|
|
4
4
|
"description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
|
|
5
5
|
"homepage": "https://ouroboros.bot/",
|
|
6
6
|
"engines": {
|