@ouro.bot/cli 0.1.0-alpha.897 → 0.1.0-alpha.898

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,13 @@
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.898",
6
+ "changes": [
7
+ "Shepherd now also runs on Herdr. A return is a pane leaving 'working' for 'idle', 'done' or 'blocked' in Herdr's own pane.agent_status_changed events and still there after a 3-second grace period, keyed by Herdr's state_change_seq. Replies go through agent.prompt (pasted, then Enter) and pane.send_keys, and Shepherd's status shows as the pane's state label. Attach it with a 'herdr' record in the machine runtime config (optional herdr.socketPath, default ~/.config/herdr/herdr.sock); cmux wins when both are set. Herdr's states do not say whether background work is running, so on Herdr the judge decides 'working' from the screen.",
8
+ "Review fixes: Shepherd reads only Herdr's visible screen (reading scrollback scrolled the agent's UI), presses keys with agent.send_keys, ignores a passing 'unknown' state, rebuilds its state from pane.list on every new subscription (so a pane that stopped while unsubscribed is still a return), follows a pane that moved to a new id, and never types into the focused pane. The repair hint now names the Herdr record too."
9
+ ]
10
+ },
4
11
  {
5
12
  "version": "0.1.0-alpha.897",
6
13
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.897",
2
+ "runtimeVersion": "0.1.0-alpha.898",
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.897</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.898</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.shepherdRepairHint = shepherdRepairHint;
37
37
  exports.shepherdConfigFacts = shepherdConfigFacts;
38
38
  exports.shepherdSenseStatus = shepherdSenseStatus;
39
+ exports.defaultHerdrSocketPath = defaultHerdrSocketPath;
39
40
  exports.defaultCmuxSocketPath = defaultCmuxSocketPath;
40
41
  exports.resolveShepherdConnection = resolveShepherdConnection;
41
42
  const fs = __importStar(require("node:fs"));
@@ -43,7 +44,7 @@ const os = __importStar(require("node:os"));
43
44
  const path = __importStar(require("node:path"));
44
45
  const runtime_1 = require("../nerves/runtime");
45
46
  function shepherdRepairHint(agent) {
46
- return `human-required: in a cmux terminal run 'ouro vault config set --agent ${agent} --scope machine --key cmux.socketCapability --value "$CMUX_SOCKET_CAPABILITY"' (or set cmux.socketPassword when cmux is in password mode), then 'ouro up'.`;
47
+ return `human-required: in a cmux terminal run 'ouro vault config set --agent ${agent} --scope machine --key cmux.socketCapability --value "$CMUX_SOCKET_CAPABILITY"' (or set cmux.socketPassword when cmux is in password mode), then 'ouro up'. On Herdr instead: 'ouro vault config set --agent ${agent} --scope machine --key herdr.socketPath --value "$HOME/.config/herdr/herdr.sock"', then 'ouro up'.`;
47
48
  }
48
49
  function text(record, key) {
49
50
  const value = record?.[key];
@@ -67,6 +68,8 @@ function cmuxAuth(cmux) {
67
68
  function shepherdConfigFacts(machinePayload) {
68
69
  const cmux = hostRecord(machinePayload, "cmux");
69
70
  const auth = cmuxAuth(cmux);
71
+ if (!auth && hostRecord(machinePayload, "herdr"))
72
+ return { configured: true, detail: "herdr socket" };
70
73
  if (!auth)
71
74
  return cmux ? { configured: false, detail: "missing cmux.socketCapability" } : { configured: false, optional: true, detail: "no terminal host attached on this machine" };
72
75
  return { configured: true, detail: `cmux socket auth: ${auth.kind === "none" ? "automation mode" : auth.kind}` };
@@ -80,6 +83,10 @@ function shepherdSenseStatus(enabled, machinePayload) {
80
83
  return "ready";
81
84
  return facts.optional ? "not_attached" : "needs_config";
82
85
  }
86
+ /** Herdr's default session socket. */
87
+ function defaultHerdrSocketPath(homeDir = os.homedir()) {
88
+ return path.join(homeDir, ".config", "herdr", "herdr.sock");
89
+ }
83
90
  /** cmux's own default: `~/.local/state/cmux/cmux-<uid>.sock`, then the older unscoped `cmux.sock`. */
84
91
  function defaultCmuxSocketPath(homeDir = os.homedir(), uid = process.getuid?.() ?? 0, exists = fs.existsSync) {
85
92
  const dir = path.join(homeDir, ".local", "state", "cmux");
@@ -89,14 +96,18 @@ function defaultCmuxSocketPath(homeDir = os.homedir(), uid = process.getuid?.()
89
96
  }
90
97
  function resolveShepherdConnection(agent, machinePayload, defaultSocketPath = defaultCmuxSocketPath) {
91
98
  const cmux = hostRecord(machinePayload, "cmux");
99
+ const herdr = hostRecord(machinePayload, "herdr");
92
100
  const auth = cmuxAuth(cmux);
101
+ const host = auth ? "cmux" : herdr ? "herdr" : "none";
93
102
  (0, runtime_1.emitNervesEvent)({
94
103
  component: "senses",
95
104
  event: "senses.shepherd_connection_resolved",
96
105
  message: "resolved Shepherd terminal host connection settings",
97
- meta: { agent, host: auth ? "cmux" : "none", auth: auth?.kind ?? "missing" },
106
+ meta: { agent, host, auth: auth?.kind ?? "missing" },
98
107
  });
99
- if (!auth)
100
- return { ok: false, error: `no terminal host is attached on this machine; ${shepherdRepairHint(agent)}` };
101
- return { ok: true, connection: { host: "cmux", socketPath: text(cmux, "socketPath") || defaultSocketPath(), auth } };
108
+ if (auth)
109
+ return { ok: true, connection: { host: "cmux", socketPath: text(cmux, "socketPath") || defaultSocketPath(), auth } };
110
+ if (herdr)
111
+ return { ok: true, connection: { host: "herdr", socketPath: text(herdr, "socketPath") || defaultHerdrSocketPath() } };
112
+ return { ok: false, error: `no terminal host is attached on this machine; ${shepherdRepairHint(agent)}` };
102
113
  }
@@ -40,8 +40,7 @@ const path = __importStar(require("node:path"));
40
40
  const runtime_credentials_1 = require("../heart/runtime-credentials");
41
41
  const shepherd_config_1 = require("../heart/shepherd-config");
42
42
  const runtime_1 = require("../nerves/runtime");
43
- const client_1 = require("../senses/shepherd/client");
44
- const cmux_1 = require("../senses/shepherd/cmux");
43
+ const host_1 = require("../senses/shepherd/host");
45
44
  const redact_1 = require("../senses/shepherd/redact");
46
45
  const returns_1 = require("../senses/shepherd/returns");
47
46
  /**
@@ -68,7 +67,7 @@ function shepherdToolsEnabled(agentRoot) {
68
67
  function hostFor(agentName) {
69
68
  const machine = (0, runtime_credentials_1.readMachineRuntimeCredentialConfig)(agentName);
70
69
  const resolved = (0, shepherd_config_1.resolveShepherdConnection)(agentName, machine.ok ? machine.config : {});
71
- return resolved.ok ? (0, cmux_1.createCmuxHost)((0, client_1.createCmuxClient)(resolved.connection, { agentName })) : resolved.error;
70
+ return resolved.ok ? (0, host_1.createShepherdHost)(resolved.connection, { agentName }) : resolved.error;
72
71
  }
73
72
  async function withHost(tool, ctx, run) {
74
73
  if (!ctx?.agentName || !ctx.agentRoot)
@@ -0,0 +1,311 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.HERDR_METADATA_SOURCE = void 0;
37
+ exports.herdrRequest = herdrRequest;
38
+ exports.createHerdrHost = createHerdrHost;
39
+ const net = __importStar(require("node:net"));
40
+ const runtime_1 = require("../../nerves/runtime");
41
+ const cmux_1 = require("./cmux");
42
+ /**
43
+ * The Herdr host. Herdr detects every agent in its panes itself and publishes each change of its
44
+ * semantic state as `pane.agent_status_changed` (idle, working, blocked, done, unknown). A return is
45
+ * a pane leaving `working` for `idle`, `done` or `blocked` and still there after the grace period,
46
+ * keyed by Herdr's own `state_change_seq`. Herdr types a prompt with `agent.prompt` (bracketed paste
47
+ * then Enter) and shows Shepherd's status as the pane's state label.
48
+ */
49
+ exports.HERDR_METADATA_SOURCE = "ouro.shepherd";
50
+ const GRACE_MS = 3_000;
51
+ const TIMEOUT_MS = 10_000;
52
+ const RETURN_STATES = new Set(["idle", "done", "blocked"]);
53
+ const RECONNECT_DELAYS_MS = [1_000, 2_000, 5_000, 10_000, 30_000];
54
+ const HERDR_KEYS = { enter: "enter", escape: "esc", up: "up", down: "down", tab: "tab", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", y: "y", n: "n" };
55
+ function isRecord(value) {
56
+ return !!value && typeof value === "object" && !Array.isArray(value);
57
+ }
58
+ function str(value) {
59
+ return typeof value === "string" && value.length > 0 ? value : null;
60
+ }
61
+ /** One NDJSON connection: each line Herdr sends goes to `onLine` until the socket closes. */
62
+ function connectLines(socketPath, onLine, onClose) {
63
+ const socket = net.createConnection(socketPath);
64
+ let buffer = "";
65
+ let failure;
66
+ socket.setEncoding("utf-8");
67
+ socket.on("data", (chunk) => {
68
+ buffer += chunk;
69
+ let newline = buffer.indexOf("\n");
70
+ while (newline >= 0) {
71
+ const raw = buffer.slice(0, newline);
72
+ buffer = buffer.slice(newline + 1);
73
+ newline = buffer.indexOf("\n");
74
+ try {
75
+ const parsed = JSON.parse(raw);
76
+ if (isRecord(parsed))
77
+ onLine(parsed);
78
+ }
79
+ catch {
80
+ // A line that is not JSON is ignored.
81
+ }
82
+ }
83
+ });
84
+ socket.on("error", (error) => { failure = error; });
85
+ socket.on("close", () => onClose(failure));
86
+ return { send: (line) => socket.write(`${JSON.stringify(line)}\n`), close: () => socket.destroy() };
87
+ }
88
+ let requestCount = 0;
89
+ /** One request on its own connection. */
90
+ function herdrRequest(socketPath, method, params, timeoutMs = TIMEOUT_MS) {
91
+ return new Promise((resolve, reject) => {
92
+ const id = `ouro_${++requestCount}`;
93
+ let settled = false;
94
+ const settle = (fn) => {
95
+ if (settled)
96
+ return;
97
+ settled = true;
98
+ clearTimeout(timer);
99
+ connection.close();
100
+ fn();
101
+ };
102
+ const timer = setTimeout(() => settle(() => reject(new Error(`herdr ${method} timed out`))), timeoutMs);
103
+ const connection = connectLines(socketPath, (line) => {
104
+ if (line.id !== id)
105
+ return;
106
+ const error = isRecord(line.error) ? line.error : null;
107
+ settle(() => error ? reject(new Error(`herdr ${method}: ${str(error.message) ?? str(error.code) ?? "error"}`)) : resolve(isRecord(line.result) ? line.result : {}));
108
+ }, (error) => settle(() => reject(new Error(`herdr ${method}: ${error?.message ?? "connection closed"}`))));
109
+ connection.send({ id, method, params });
110
+ });
111
+ }
112
+ function createHerdrHost(connection, options = {}) {
113
+ const schedule = options.schedule ?? cmux_1.realSchedule;
114
+ const call = (method, params) => herdrRequest(connection.socketPath, method, params);
115
+ async function panes() {
116
+ const result = await call("pane.list", {});
117
+ return Array.isArray(result.panes) ? result.panes.filter(isRecord) : [];
118
+ }
119
+ return {
120
+ name: "herdr",
121
+ async list() {
122
+ return (await panes()).map((pane) => ({
123
+ id: str(pane.pane_id) ?? "",
124
+ ref: str(pane.pane_id) ?? "",
125
+ workspace: str(pane.workspace_id),
126
+ title: str(pane.title) ?? str(pane.terminal_title_stripped) ?? str(pane.label) ?? "",
127
+ agent: str(pane.agent),
128
+ focused: pane.focused === true,
129
+ }));
130
+ },
131
+ async read(sessionId) {
132
+ // The visible screen only: reading recent scrollback makes Herdr scroll the agent's UI.
133
+ const result = await call("pane.read", { pane_id: sessionId, source: "visible", strip_ansi: true });
134
+ const read = isRecord(result.read) ? result.read : {};
135
+ return typeof read.text === "string" ? read.text : "";
136
+ },
137
+ async prompt(sessionId, line) {
138
+ // Herdr pastes the text as one block and then presses Enter; a blocked agent is refused without input.
139
+ await call("agent.prompt", { target: sessionId, text: line });
140
+ (0, runtime_1.emitNervesEvent)({ component: "senses", event: "senses.shepherd_herdr_prompted", message: "typed a line into a Herdr pane", meta: { chars: line.length } });
141
+ },
142
+ async key(sessionId, key) {
143
+ await call("agent.send_keys", { target: sessionId, keys: [HERDR_KEYS[key]] });
144
+ },
145
+ async signal(sessionId, status, notification) {
146
+ await call("pane.report_metadata", status
147
+ ? { pane_id: sessionId, source: exports.HERDR_METADATA_SOURCE, state_labels: { idle: status, done: status, blocked: status }, tokens: { ouro: status } }
148
+ : { pane_id: sessionId, source: exports.HERDR_METADATA_SOURCE, clear_state_labels: true, tokens: { ouro: null } });
149
+ if (notification)
150
+ await call("notification.show", { title: notification.title, body: notification.body });
151
+ },
152
+ watch(handlers) {
153
+ let closed = false;
154
+ let attempt = 0;
155
+ let stream = null;
156
+ let cancelReconnect = null;
157
+ let refresh = false;
158
+ const status = new Map();
159
+ const pending = new Map();
160
+ const cancelPending = (paneId) => {
161
+ pending.get(paneId)?.();
162
+ pending.delete(paneId);
163
+ };
164
+ /** A return only if the pane is still out of `working` after the grace period, keyed by Herdr's own sequence. */
165
+ const settled = (paneId) => {
166
+ cancelPending(paneId);
167
+ pending.set(paneId, schedule(() => {
168
+ pending.delete(paneId);
169
+ void call("agent.get", { target: paneId }).then((result) => {
170
+ const agent = isRecord(result.agent) ? result.agent : {};
171
+ if (!RETURN_STATES.has(str(agent.agent_status) ?? ""))
172
+ return;
173
+ const seq = typeof agent.state_change_seq === "number" ? agent.state_change_seq : null;
174
+ handlers.returned({
175
+ sessionId: paneId,
176
+ transitionId: `herdr:${paneId}:${seq ?? `t${Date.now()}`}`,
177
+ agent: str(agent.agent),
178
+ cwd: str(agent.foreground_cwd) ?? str(agent.cwd),
179
+ lastBody: null,
180
+ // Herdr's states do not say whether background work is running; the judge reads the screen.
181
+ backgroundWork: null,
182
+ });
183
+ }, (error) => {
184
+ (0, runtime_1.emitNervesEvent)({ level: "warn", component: "senses", event: "senses.shepherd_herdr_read_error", message: "could not read a Herdr agent after it stopped", meta: { error: error.message } });
185
+ });
186
+ }, GRACE_MS));
187
+ };
188
+ /**
189
+ * The cache keeps each pane's last known state; `unknown` (a passing detection gap) changes nothing, so working, unknown,
190
+ * idle still counts as working to idle.
191
+ */
192
+ const observed = (paneId, next) => {
193
+ if (next === "unknown")
194
+ return;
195
+ const previous = status.get(paneId);
196
+ status.set(paneId, next);
197
+ if (next === "working")
198
+ cancelPending(paneId);
199
+ else if (previous === "working" && RETURN_STATES.has(next))
200
+ settled(paneId);
201
+ };
202
+ const onEvent = (line) => {
203
+ // Herdr names events `pane.focused` in subscriptions and `pane_focused` on the wire; both are accepted.
204
+ const name = (str(line.event) ?? "").replace(".", "_");
205
+ const data = isRecord(line.data) ? line.data : {};
206
+ if (name === "pane_moved") {
207
+ // A moved pane can get a new id: carry its state over and subscribe again under the new id.
208
+ const from = str(data.previous_pane_id);
209
+ const to = isRecord(data.pane) ? str(data.pane.pane_id) : null;
210
+ if (from && to && from !== to) {
211
+ cancelPending(from);
212
+ const known = status.get(from);
213
+ status.delete(from);
214
+ if (known)
215
+ status.set(to, known);
216
+ }
217
+ refresh = true;
218
+ stream?.close();
219
+ return;
220
+ }
221
+ const paneId = str(data.pane_id);
222
+ if (!paneId)
223
+ return;
224
+ if (name === "pane_focused")
225
+ return handlers.focused(paneId);
226
+ if (name === "pane_created" || name === "pane_closed") {
227
+ if (name === "pane_closed") {
228
+ cancelPending(paneId);
229
+ status.delete(paneId);
230
+ }
231
+ // Agent-status subscriptions name each pane, so a new or closed pane needs a new subscription.
232
+ refresh = true;
233
+ stream?.close();
234
+ return;
235
+ }
236
+ if (name !== "pane_agent_status_changed")
237
+ return;
238
+ observed(paneId, str(data.agent_status) ?? "unknown");
239
+ };
240
+ const reconnect = (error) => {
241
+ stream = null;
242
+ if (closed)
243
+ return;
244
+ if (refresh) {
245
+ refresh = false;
246
+ return void subscribe();
247
+ }
248
+ const delay = RECONNECT_DELAYS_MS[Math.min(attempt, RECONNECT_DELAYS_MS.length - 1)];
249
+ attempt += 1;
250
+ (0, runtime_1.emitNervesEvent)({ level: "warn", component: "senses", event: "senses.shepherd_herdr_closed", message: "Herdr event subscription closed; resubscribing", meta: { delay, error: error?.message ?? null } });
251
+ cancelReconnect = schedule(() => void subscribe(), delay);
252
+ };
253
+ const subscribe = async () => {
254
+ cancelReconnect = null;
255
+ let current;
256
+ try {
257
+ current = await panes();
258
+ }
259
+ catch (error) {
260
+ return reconnect(error);
261
+ }
262
+ if (closed)
263
+ return;
264
+ // Status changes while unsubscribed are not replayed: the fresh list replaces the cache, and a pane that stopped
265
+ // working in the gap is handled as if its event had arrived.
266
+ const ids = new Set(current.flatMap((pane) => str(pane.pane_id) ?? []));
267
+ for (const id of [...status.keys()]) {
268
+ if (ids.has(id))
269
+ continue;
270
+ status.delete(id);
271
+ cancelPending(id);
272
+ }
273
+ for (const pane of current) {
274
+ const id = str(pane.pane_id);
275
+ if (!id)
276
+ continue;
277
+ const next = str(pane.agent_status) ?? "unknown";
278
+ if (status.has(id))
279
+ observed(id, next);
280
+ else if (next !== "unknown")
281
+ status.set(id, next);
282
+ }
283
+ const subscriptions = [
284
+ { type: "pane.created" }, { type: "pane.closed" }, { type: "pane.focused" }, { type: "pane.moved" },
285
+ ...current.flatMap((pane) => str(pane.pane_id) ? [{ type: "pane.agent_status_changed", pane_id: pane.pane_id }] : []),
286
+ ];
287
+ stream = connectLines(connection.socketPath, (line) => {
288
+ if (isRecord(line.result) && line.result.type === "subscription_started") {
289
+ attempt = 0;
290
+ (0, runtime_1.emitNervesEvent)({ component: "senses", event: "senses.shepherd_herdr_connected", message: "Herdr event subscription started", meta: { panes: subscriptions.length - 4 } });
291
+ return;
292
+ }
293
+ // `events_lost` or a rejected subscription closes the connection; the reconnect reads panes again.
294
+ if (line.event !== undefined)
295
+ onEvent(line);
296
+ }, reconnect);
297
+ stream.send({ id: "ouro_events", method: "events.subscribe", params: { subscriptions } });
298
+ };
299
+ void subscribe();
300
+ return {
301
+ close() {
302
+ closed = true;
303
+ cancelReconnect?.();
304
+ for (const cancel of pending.values())
305
+ cancel();
306
+ stream?.close();
307
+ },
308
+ };
309
+ },
310
+ };
311
+ }
@@ -1,2 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createShepherdHost = createShepherdHost;
4
+ const runtime_1 = require("../../nerves/runtime");
5
+ const client_1 = require("./client");
6
+ const cmux_1 = require("./cmux");
7
+ const herdr_1 = require("./herdr");
8
+ /** The host for this machine's connection. */
9
+ function createShepherdHost(connection, options) {
10
+ (0, runtime_1.emitNervesEvent)({ component: "senses", event: "senses.shepherd_host_created", message: "opened the Shepherd terminal host", meta: { host: connection.host } });
11
+ return connection.host === "herdr"
12
+ ? (0, herdr_1.createHerdrHost)(connection, { schedule: options.schedule })
13
+ : (0, cmux_1.createCmuxHost)((0, client_1.createCmuxClient)(connection, { agentName: options.agentName }), { now: options.now, schedule: options.schedule });
14
+ }
@@ -51,8 +51,8 @@ const runtime_credentials_1 = require("../../heart/runtime-credentials");
51
51
  const shepherd_config_1 = require("../../heart/shepherd-config");
52
52
  const pending_1 = require("../../mind/pending");
53
53
  const runtime_1 = require("../../nerves/runtime");
54
- const client_1 = require("./client");
55
54
  const cmux_1 = require("./cmux");
55
+ const host_1 = require("./host");
56
56
  const judge_1 = require("./judge");
57
57
  const redact_1 = require("./redact");
58
58
  const returns_1 = require("./returns");
@@ -161,7 +161,7 @@ async function startShepherdSenseApp(options) {
161
161
  const resolved = (0, shepherd_config_1.resolveShepherdConnection)(agent, machine.ok ? machine.config : {});
162
162
  if (!resolved.ok)
163
163
  throw new Error(resolved.error);
164
- const host = (options.createHost ?? ((connection) => (0, cmux_1.createCmuxHost)((0, client_1.createCmuxClient)(connection, { agentName: agent }), { now, schedule })))(resolved.connection);
164
+ const host = (options.createHost ?? ((connection) => (0, host_1.createShepherdHost)(connection, { agentName: agent, now, schedule })))(resolved.connection);
165
165
  const judge = options.judge ?? (0, judge_1.createShepherdJudge)(() => (0, core_1.getProviderRuntime)("agent", { agentName: agent, agentRoot }), exports.JUDGE_TIMEOUT_MS);
166
166
  const escalate = options.escalate ?? ((content) => queueEscalation(agent, content, now()));
167
167
  const wake = options.wake ?? ((ids) => wakeForEscalations(agent, ids));
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.897",
3
+ "version": "0.1.0-alpha.898",
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.897",
9
+ "version": "0.1.0-alpha.898",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@azure/identity": "^4.13.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.897",
3
+ "version": "0.1.0-alpha.898",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },