@ouro.bot/cli 0.1.0-alpha.1689 → 0.1.0-alpha.1690

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,12 @@
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.1690",
6
+ "changes": [
7
+ "The Butler's container now prepares its packaged bundle at startup through its product registration, instead of the daemon calling Butler code directly. On the Butler's image it behaves as before. A daemon told to manage a packaged bundle (`--package-managed-agent`) that no product can prepare refuses to start, with the same roll-back guidance; that now includes an image whose `container-runtime.json` names no product. A daemon managing agents no product runs no longer checks Butler package management at all."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1689",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1689",
2
+ "runtimeVersion": "0.1.0-alpha.1690",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -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.1689</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1690</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -8,9 +8,11 @@ exports.failFastContainerCredentialBootstrapStartup = failFastContainerCredentia
8
8
  exports.failFastSanctuaryBundlePreparationStartup = failFastSanctuaryBundlePreparationStartup;
9
9
  exports.failFastButlerExternalEventsStartup = failFastButlerExternalEventsStartup;
10
10
  exports.startDaemonAfterContainerCredentialBootstrap = startDaemonAfterContainerCredentialBootstrap;
11
+ exports.productStartupFor = productStartupFor;
11
12
  const runtime_1 = require("../../nerves/runtime");
12
13
  const daemon_tombstone_1 = require("./daemon-tombstone");
13
14
  const router_1 = require("../external-events/router");
15
+ const active_1 = require("../product/active");
14
16
  const REDACTED_BOOTSTRAP_STARTUP_ERROR = "container credential bootstrap rejected; recoverable claim retained for reconciliation";
15
17
  const SANCTUARY_BUNDLE_RECOVERY_GUIDANCE = {
16
18
  restart_from_verified_release: "restart Ouro Butler from its verified release so the installed bundle can finish updating",
@@ -121,3 +123,25 @@ async function startDaemonAfterContainerCredentialBootstrap(input) {
121
123
  await input.startDaemon();
122
124
  return true;
123
125
  }
126
+ /**
127
+ * The startup of the product that runs this daemon's one managed agent, or null when there is none. A production daemon
128
+ * told to manage a packaged bundle (`--package-managed-agent`) with no product to prepare it refuses to start, since
129
+ * the bundle would boot unprepared.
130
+ */
131
+ function productStartupFor(input) {
132
+ const agent = (0, active_1.productAgentAmong)(input.managedAgents);
133
+ const startup = agent === null ? undefined : (0, active_1.productFor)(agent)?.startup?.(input);
134
+ if (startup)
135
+ return startup;
136
+ if (input.mode !== "production" || !input.argv.includes("--package-managed-agent"))
137
+ return null;
138
+ (0, runtime_1.emitNervesEvent)({
139
+ level: "error",
140
+ component: "daemon",
141
+ event: "daemon.product_startup_missing",
142
+ message: "a package-managed bundle has no product to prepare it",
143
+ meta: { managedAgents: [...input.managedAgents], agent },
144
+ });
145
+ const failure = createSanctuaryBundlePreparationFailure("roll_back_or_install_verified_release");
146
+ return { preflight: () => { throw failure; }, prepareManagedBundle: () => { throw failure; } };
147
+ }
@@ -85,7 +85,6 @@ const machine_identity_1 = require("../machine-identity");
85
85
  const vault_outage_1 = require("./vault-outage");
86
86
  const container_credential_bootstrap_1 = require("./container-credential-bootstrap");
87
87
  const daemon_bootstrap_startup_1 = require("./daemon-bootstrap-startup");
88
- const sanctuary_package_management_1 = require("./sanctuary-package-management");
89
88
  const sanctuary_acceptance_marker_1 = require("./sanctuary-acceptance-marker");
90
89
  const sanctuary_scheduler_liveness_1 = require("./sanctuary-scheduler-liveness");
91
90
  const sanctuary_scheduler_origin_1 = require("./sanctuary-scheduler-origin");
@@ -145,9 +144,11 @@ catch (failure) {
145
144
  throw failure;
146
145
  }
147
146
  const readinessAgents = (0, daemon_bootstrap_startup_1.providerReadinessAgents)(managedAgents, process.env.OURO_DAEMON_REQUIRED_AGENT);
148
- const sanctuaryPackageManagement = (0, sanctuary_package_management_1.resolveSanctuaryPackageManagementActivation)({ mode, argv: process.argv, managedAgents, repoRoot: (0, identity_1.getRepoRoot)(), bundlesRoot: (0, identity_1.getAgentBundlesRoot)(), runtimePackageVersion: (0, bundle_manifest_1.getPackageVersion)() });
147
+ // The product that runs the managed agent prepares its bundle (J2); a packaged bundle with no product to prepare it stops the start.
148
+ let productStartup = null;
149
149
  try {
150
- (0, sanctuary_package_management_1.requireSanctuaryPackageManagementDecision)(sanctuaryPackageManagement);
150
+ productStartup = (0, daemon_bootstrap_startup_1.productStartupFor)({ mode, argv: process.argv, managedAgents, repoRoot: (0, identity_1.getRepoRoot)(), bundlesRoot: (0, identity_1.getAgentBundlesRoot)(), runtimePackageVersion: (0, bundle_manifest_1.getPackageVersion)() });
151
+ productStartup?.preflight();
151
152
  }
152
153
  catch (failure) {
153
154
  (0, daemon_bootstrap_startup_1.failFastSanctuaryBundlePreparationStartup)({ failure, exit: (code) => process.exit(code) });
@@ -823,9 +824,9 @@ function scheduleStartupSentinelAfterProviderPreload(agent, preload) {
823
824
  }
824
825
  /* v8 ignore start -- habit wiring: lambdas delegate to processManager/fs; tested via HabitScheduler unit tests @preserve */
825
826
  void (0, daemon_bootstrap_startup_1.startDaemonAfterContainerCredentialBootstrap)({
826
- preflight: () => { (0, sanctuary_package_management_1.requireSanctuaryPackageManagementDecision)(sanctuaryPackageManagement); },
827
+ preflight: () => { productStartup?.preflight(); },
827
828
  loadBootstrap: () => (0, container_credential_bootstrap_1.loadContainerCredentialBootstrap)(managedAgents),
828
- prepareManagedBundle: () => { (0, sanctuary_package_management_1.prepareSanctuaryPackageManagedBundle)(sanctuaryPackageManagement); },
829
+ prepareManagedBundle: () => { productStartup?.prepareManagedBundle(); },
829
830
  prepareDaemon: prepareProviderRuntime,
830
831
  startDaemon: async () => {
831
832
  // Presence off here: publish that this machine left every roster before any sense starts under the home lease.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.product = void 0;
4
4
  const butler_agent_1 = require("../heart/butler-agent");
5
+ const sanctuary_package_management_1 = require("../heart/daemon/sanctuary-package-management");
5
6
  const runtime_1 = require("../nerves/runtime");
6
7
  /**
7
8
  * The Butler, registered with the harness through the product seam. The Unraid image names this module in
@@ -12,5 +13,13 @@ exports.product = {
12
13
  seamVersion: 1,
13
14
  id: "butler",
14
15
  agents: butler_agent_1.BUTLER_AGENT_NAMES,
16
+ // J2: the packaged starter bundle is checked and migrated into the live bundle before anything starts.
17
+ startup: (input) => {
18
+ const decision = (0, sanctuary_package_management_1.resolveSanctuaryPackageManagementActivation)({ ...input, argv: [...input.argv] });
19
+ return {
20
+ preflight: () => { (0, sanctuary_package_management_1.requireSanctuaryPackageManagementDecision)(decision); },
21
+ prepareManagedBundle: () => { (0, sanctuary_package_management_1.prepareSanctuaryPackageManagedBundle)(decision); },
22
+ };
23
+ },
15
24
  };
16
25
  (0, runtime_1.emitNervesEvent)({ component: "daemon", event: "daemon.butler_product_registered", message: "Butler product registered", meta: { agents: [...exports.product.agents] } });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1689",
3
+ "version": "0.1.0-alpha.1690",
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.1689",
9
+ "version": "0.1.0-alpha.1690",
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.1689",
3
+ "version": "0.1.0-alpha.1690",
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": {