@ouro.bot/cli 0.1.0-alpha.602 → 0.1.0-alpha.604

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": "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.604",
6
+ "changes": [
7
+ "Inner tab in mailbox UI surfaces the return-obligation queue (queuedCount/runningCount/oldestActiveAt) so the panel stops claiming 'No pending inner work' when dozens of held items are actively being re-injected."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.602",
6
12
  "changes": [
@@ -117,6 +117,7 @@ function buildInnerView(inner, viewer) {
117
117
  hasPending: inner.hasPending,
118
118
  origin: inner.origin,
119
119
  obligationStatus: inner.obligationStatus,
120
+ returnObligationQueue: inner.returnObligationQueue,
120
121
  };
121
122
  }
122
123
  return {
@@ -124,6 +125,7 @@ function buildInnerView(inner, viewer) {
124
125
  status: inner.status,
125
126
  summary: inner.surfacedSummary,
126
127
  hasPending: inner.hasPending,
128
+ returnObligationQueue: inner.returnObligationQueue,
127
129
  };
128
130
  }
129
131
  function buildRecentActivity(agent) {
@@ -186,6 +186,12 @@ function readInnerSummary(agentRoot) {
186
186
  ?? runtimeState?.startedAt
187
187
  ?? runtimeState?.lastCompletedAt
188
188
  ?? null;
189
+ // Read the return-obligation queue so the Inner tab can show what the
190
+ // agent is actually holding right now. Before this, the "Inner work"
191
+ // panel only consulted the pending-messages dir (inbox-style); it
192
+ // reported "No pending inner work" even when dozens of held items were
193
+ // sitting in arc/obligations/inner/ waiting to be reinjected next turn.
194
+ const returnObligationQueue = readReturnObligationQueueSummary(agentRoot);
189
195
  return {
190
196
  summary: {
191
197
  visibility: mailbox_types_1.MAILBOX_DEFAULT_INNER_VISIBILITY,
@@ -195,11 +201,48 @@ function readInnerSummary(agentRoot) {
195
201
  origin: job.origin,
196
202
  obligationStatus: job.obligationStatus,
197
203
  latestActivityAt,
204
+ returnObligationQueue,
198
205
  },
199
206
  issues: [],
200
207
  latestActivityAt,
201
208
  };
202
209
  }
210
+ function readReturnObligationQueueSummary(agentRoot) {
211
+ const dir = path.join(agentRoot, "arc", "obligations", "inner");
212
+ let names = [];
213
+ try {
214
+ names = fs.readdirSync(dir).filter((name) => name.endsWith(".json"));
215
+ }
216
+ catch {
217
+ return { queuedCount: 0, runningCount: 0, oldestActiveAt: null };
218
+ }
219
+ let queuedCount = 0;
220
+ let runningCount = 0;
221
+ let oldestActiveAt = null;
222
+ for (const name of names) {
223
+ let parsed = null;
224
+ try {
225
+ parsed = JSON.parse(fs.readFileSync(path.join(dir, name), "utf-8"));
226
+ }
227
+ catch {
228
+ continue;
229
+ }
230
+ if (!parsed)
231
+ continue;
232
+ const status = parsed.status;
233
+ if (status === "queued")
234
+ queuedCount += 1;
235
+ else if (status === "running")
236
+ runningCount += 1;
237
+ else
238
+ continue;
239
+ const createdAt = typeof parsed.createdAt === "number" ? parsed.createdAt : null;
240
+ if (createdAt !== null && (oldestActiveAt === null || createdAt < oldestActiveAt)) {
241
+ oldestActiveAt = createdAt;
242
+ }
243
+ }
244
+ return { queuedCount, runningCount, oldestActiveAt };
245
+ }
203
246
  function readCodingSummary(agentRoot) {
204
247
  const stateFilePath = path.join(agentRoot, "state", "coding", "sessions.json");
205
248
  const issues = [];