@ouro.bot/cli 0.1.0-alpha.96 → 0.1.0-alpha.98

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,19 @@
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.98",
6
+ "changes": [
7
+ "ouro versions now shows 'published' status when the installed version matches the latest published alpha, instead of the less informative 'up to date'."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.97",
12
+ "changes": [
13
+ "Obligation-bound coding sessions now wake inner dialog when they complete, fail, stall, or need input, so the agent can keep a self-fix loop moving without waiting for the human to nudge it after child work changes state.",
14
+ "That wake stays scoped to real return-loop work instead of every coding progress line, which keeps the live chat visible without turning normal coding chatter into constant reruns."
15
+ ]
16
+ },
4
17
  {
5
18
  "version": "0.1.0-alpha.96",
6
19
  "changes": [
@@ -1948,25 +1948,38 @@ async function runOuroCli(args, deps = createDefaultOuroCliDeps()) {
1948
1948
  deps.writeStdout(message);
1949
1949
  return message;
1950
1950
  }
1951
- // ── versions command (local, no daemon socket needed) ──
1951
+ // ── versions command (local install list + published update truth, no daemon socket needed) ──
1952
1952
  if (command.kind === "versions") {
1953
1953
  const versions = deps.listCliVersions?.() ?? [];
1954
- if (versions.length === 0) {
1955
- const message = "no versions installed";
1956
- deps.writeStdout(message);
1957
- return message;
1958
- }
1959
1954
  const current = deps.getCurrentCliVersion?.();
1960
1955
  const previous = deps.getPreviousCliVersion?.();
1961
- const lines = versions.map((v) => {
1962
- let line = v;
1963
- if (v === current)
1964
- line += " * current";
1965
- if (v === previous)
1966
- line += " (previous)";
1967
- return line;
1968
- });
1969
- const message = lines.join("\n");
1956
+ const localSection = versions.length === 0
1957
+ ? "no versions installed"
1958
+ : versions.map((v) => {
1959
+ let line = v;
1960
+ if (v === current)
1961
+ line += " * current";
1962
+ if (v === previous)
1963
+ line += " (previous)";
1964
+ return line;
1965
+ }).join("\n");
1966
+ const sections = [localSection];
1967
+ if (deps.checkForCliUpdate) {
1968
+ try {
1969
+ const updateResult = await deps.checkForCliUpdate();
1970
+ if (updateResult.latestVersion) {
1971
+ sections.push(`published alpha: ${updateResult.latestVersion} (${updateResult.available ? "update available" : "up to date"})`);
1972
+ }
1973
+ else if (updateResult.error) {
1974
+ sections.push(`published alpha: unavailable (${updateResult.error})`);
1975
+ }
1976
+ }
1977
+ catch (err) {
1978
+ const reason = err instanceof Error ? err.message : String(err);
1979
+ sections.push(`published alpha: unavailable (${reason})`);
1980
+ }
1981
+ }
1982
+ const message = sections.join("\n\n");
1970
1983
  deps.writeStdout(message);
1971
1984
  return message;
1972
1985
  }
@@ -3,9 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.formatCodingTail = formatCodingTail;
4
4
  exports.attachCodingSessionFeedback = attachCodingSessionFeedback;
5
5
  const identity_1 = require("../../heart/identity");
6
+ const socket_client_1 = require("../../heart/daemon/socket-client");
6
7
  const obligations_1 = require("../../heart/obligations");
7
8
  const runtime_1 = require("../../nerves/runtime");
8
9
  const TERMINAL_UPDATE_KINDS = new Set(["completed", "failed", "killed"]);
10
+ const OBLIGATION_WAKE_UPDATE_KINDS = new Set([
11
+ "waiting_input",
12
+ "stalled",
13
+ "completed",
14
+ "failed",
15
+ "killed",
16
+ ]);
9
17
  function clip(text, maxLength = 280) {
10
18
  const trimmed = text.trim();
11
19
  if (trimmed.length <= maxLength)
@@ -124,6 +132,27 @@ function syncObligationFromUpdate(update) {
124
132
  // Detached feedback should still reach the human even if obligation sync is unavailable.
125
133
  }
126
134
  }
135
+ async function wakeInnerDialogForObligation(update) {
136
+ if (!update.session.obligationId || !OBLIGATION_WAKE_UPDATE_KINDS.has(update.kind)) {
137
+ return;
138
+ }
139
+ try {
140
+ await (0, socket_client_1.requestInnerWake)((0, identity_1.getAgentName)());
141
+ }
142
+ catch (error) {
143
+ (0, runtime_1.emitNervesEvent)({
144
+ level: "warn",
145
+ component: "repertoire",
146
+ event: "repertoire.coding_feedback_wake_error",
147
+ message: "coding feedback wake request failed",
148
+ meta: {
149
+ sessionId: update.session.id,
150
+ kind: update.kind,
151
+ reason: error instanceof Error ? error.message : String(error),
152
+ },
153
+ });
154
+ }
155
+ }
127
156
  function formatCodingTail(session) {
128
157
  const stdout = session.stdoutTail.trim() || "(empty)";
129
158
  const stderr = session.stderrTail.trim() || "(empty)";
@@ -143,7 +172,7 @@ function formatCodingTail(session) {
143
172
  function attachCodingSessionFeedback(manager, session, target) {
144
173
  let lastMessage = "";
145
174
  let closed = false;
146
- let unsubscribe = () => { };
175
+ let unsubscribe = null;
147
176
  const sendMessage = (message) => {
148
177
  if (closed || !message || message === lastMessage) {
149
178
  return;
@@ -168,13 +197,14 @@ function attachCodingSessionFeedback(manager, session, target) {
168
197
  unsubscribe = manager.subscribe(session.id, async (update) => {
169
198
  syncObligationFromUpdate(update);
170
199
  sendMessage(formatUpdateMessage(update));
200
+ await wakeInnerDialogForObligation(update);
171
201
  if (TERMINAL_UPDATE_KINDS.has(update.kind)) {
172
202
  closed = true;
173
- unsubscribe();
203
+ unsubscribe?.();
174
204
  }
175
205
  });
176
206
  return () => {
177
207
  closed = true;
178
- unsubscribe();
208
+ unsubscribe?.();
179
209
  };
180
210
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.96",
3
+ "version": "0.1.0-alpha.98",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",