@ouro.bot/cli 0.1.0-alpha.1627 → 0.1.0-alpha.1628
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 +10 -3
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/heart/daemon/container-healthcheck.js +8 -1
- package/dist/heart/daemon/container-spec-auditor.js +5 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -2,10 +2,17 @@
|
|
|
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
4
|
{
|
|
5
|
-
"version": "0.1.0-alpha.
|
|
5
|
+
"version": "0.1.0-alpha.1628",
|
|
6
6
|
"changes": [
|
|
7
|
-
"The Butler's
|
|
8
|
-
"The Butler's
|
|
7
|
+
"The Butler's root-host tool (owner-approved commands on the Unraid host) is offered to the Butler whose bundle is `butler.ouro` as well as `sanctuary.ouro`. An agent whose name doesn't match its bundle folder still gets no host tool.",
|
|
8
|
+
"The Butler container's healthcheck checks the Butler under the name its bundle has on disk (`butler.ouro` or `sanctuary.ouro`), whichever Butler name the image passes it. With both bundles present, or neither, it fails as `missing agent` instead of guessing.",
|
|
9
|
+
"The container-spec auditor accepts an image that starts the Butler as `--package-managed-agent butler` as well as `sanctuary`. The entrypoint and arguments must name the same Butler, and any other agent name is still refused."
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"version": "0.1.0-alpha.1626",
|
|
14
|
+
"changes": [
|
|
15
|
+
"The Butler's scheduler now follows the name its bundle has. Its cron proof, its health-check liveness receipt, its crontab and the daemon's package-managed start all work for a bundle named `butler.ouro` as well as `sanctuary.ouro`. A daemon that finds both bundles refuses to start rather than guess which one is the Butler."
|
|
9
16
|
]
|
|
10
17
|
},
|
|
11
18
|
{
|
|
@@ -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.1628</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -46,16 +46,23 @@ const container_runtime_1 = require("./container-runtime");
|
|
|
46
46
|
const sanctuary_bundle_migration_1 = require("./sanctuary-bundle-migration");
|
|
47
47
|
const sanctuary_package_management_1 = require("./sanctuary-package-management");
|
|
48
48
|
const failure_code_1 = require("./cli-commands/failure-code");
|
|
49
|
+
const butler_agent_1 = require("../butler-agent");
|
|
49
50
|
function fail(reason) {
|
|
50
51
|
(0, runtime_1.emitNervesEvent)({ level: "error", component: "daemon", event: "daemon.container_healthcheck_error", message: "container healthcheck failed", meta: { reason } });
|
|
51
52
|
process.exitCode = 1;
|
|
52
53
|
throw Object.assign(new Error(reason), { code: reason === "missing agent" ? "missing-agent" : "unhealthy" });
|
|
53
54
|
}
|
|
55
|
+
/** The Butler's name is the one its bundle on disk has; with both bundles, or neither, there is no Butler to check. */
|
|
56
|
+
function butlerOnDisk(bundlesRoot) {
|
|
57
|
+
const present = butler_agent_1.BUTLER_AGENT_NAMES.filter((name) => fs.existsSync(path.join(bundlesRoot, `${name}.ouro`)));
|
|
58
|
+
return present.length === 1 ? present[0] : undefined;
|
|
59
|
+
}
|
|
54
60
|
function runContainerHealthcheck(options = {}) {
|
|
55
61
|
const argv = options.argv ?? process.argv;
|
|
56
62
|
const now = options.now ?? Date.now;
|
|
57
63
|
const index = argv.indexOf("--agent");
|
|
58
|
-
const
|
|
64
|
+
const given = index >= 0 ? argv[index + 1] : undefined;
|
|
65
|
+
const agent = (0, butler_agent_1.isButlerAgent)(given) ? butlerOnDisk((0, identity_1.getAgentBundlesRoot)()) : given;
|
|
59
66
|
if (!agent)
|
|
60
67
|
fail("missing agent");
|
|
61
68
|
const packageManagement = (0, sanctuary_package_management_1.resolveSanctuaryPackageManagementActivation)({ mode: "production", argv, managedAgents: [agent], repoRoot: (0, identity_1.getRepoRoot)(), bundlesRoot: (0, identity_1.getAgentBundlesRoot)(), runtimePackageVersion: (0, bundle_manifest_1.getPackageVersion)() });
|
|
@@ -58,8 +58,8 @@ const EXPECTED_TEMPLATE_URLS = new Set([
|
|
|
58
58
|
const EXPECTED_ICON = "https://raw.githubusercontent.com/ourostack/ouroboros/main/assets/ouroboros.png";
|
|
59
59
|
const EXACT_IMAGE = /^sha256:[a-f0-9]{64}$/u;
|
|
60
60
|
const VERSION_REFERENCE = /^ghcr\.io\/ourostack\/ouroboros-butler:[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?$/u;
|
|
61
|
-
|
|
62
|
-
const
|
|
61
|
+
// The image names the Butler `butler` from M2 on; images from before the rename name it `sanctuary`. Either runs its one bundle.
|
|
62
|
+
const PACKAGE_DAEMON_ARGS_BY_NAME = ["butler", "sanctuary"].map((name) => ["/opt/ouro/dist/heart/daemon/daemon-entry.js", "--package-managed-agent", name]);
|
|
63
63
|
const LEGACY_DAEMON_ARGS = ["/opt/ouro/dist/heart/daemon/daemon-entry.js"];
|
|
64
64
|
const LEGACY_ENTRYPOINT = ["node", ...LEGACY_DAEMON_ARGS];
|
|
65
65
|
function record(value) {
|
|
@@ -92,8 +92,9 @@ function auditSanctuaryContainerSpec(value, options) {
|
|
|
92
92
|
if (mountContract === "legacy-alpha742" && options.expectedImage !== LEGACY_ALPHA742_IMAGE)
|
|
93
93
|
violations.push("legacy mount exception requires the pinned alpha.742 image ID");
|
|
94
94
|
const acceptedMounts = mountContract === "legacy-alpha742" ? [LEGACY_ALPHA742_MOUNTS] : mountContract === "canonical-pre-gateway" ? [PRE_GATEWAY_MOUNTS] : gatewayMounts(options.syncEnabled === true);
|
|
95
|
-
const
|
|
96
|
-
const
|
|
95
|
+
const packageArgs = PACKAGE_DAEMON_ARGS_BY_NAME.find((args) => JSON.stringify(root.Args) === JSON.stringify(args)) ?? PACKAGE_DAEMON_ARGS_BY_NAME[1];
|
|
96
|
+
const expectedArgs = mountContract !== "legacy-alpha742" ? packageArgs : LEGACY_DAEMON_ARGS;
|
|
97
|
+
const expectedEntrypoint = mountContract !== "legacy-alpha742" ? ["node", ...packageArgs] : LEGACY_ENTRYPOINT;
|
|
97
98
|
if (root.Image !== options.expectedImage)
|
|
98
99
|
violations.push("image does not match the reviewed exact local Docker image ID");
|
|
99
100
|
if (root.Path !== "node")
|
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.1628",
|
|
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.1628",
|
|
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.1628",
|
|
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": {
|