@ouro.bot/cli 0.1.0-alpha.107 → 0.1.0-alpha.108
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 +7 -0
- package/dist/heart/active-work.js +1 -0
- package/dist/mind/prompt.js +12 -5
- package/dist/repertoire/tools-base.js +170 -0
- package/package.json +1 -1
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.108",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Agents now have a first-class `query_active_work` tool that reads one top-level live world-state across the current conversation, other active sessions, live coding lanes, inner work, and return obligations instead of reconstructing status from side tools.",
|
|
8
|
+
"Family-facing status guidance now treats the active-work world-state as the agent's center of gravity, so 'what are you up to?' answers stay anchored in one coherent live picture instead of drifting into inner-dialog archaeology."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
4
11
|
{
|
|
5
12
|
"version": "0.1.0-alpha.107",
|
|
6
13
|
"changes": [
|
|
@@ -410,6 +410,7 @@ function buildActiveWorkFrame(input) {
|
|
|
410
410
|
}
|
|
411
411
|
function formatActiveWorkFrame(frame) {
|
|
412
412
|
const lines = ["## what i'm holding"];
|
|
413
|
+
lines.push("this is my top-level live world-state right now. inner work, coding lanes, other sessions, and return obligations all belong inside this picture.");
|
|
413
414
|
const primaryObligation = findPrimaryOpenObligation(frame);
|
|
414
415
|
const currentSessionObligation = findCurrentSessionOpenObligation(frame);
|
|
415
416
|
const activeLane = formatActiveLane(frame, primaryObligation);
|
package/dist/mind/prompt.js
CHANGED
|
@@ -465,6 +465,10 @@ function familyCrossSessionTruthSection(context, options) {
|
|
|
465
465
|
return `## cross-session truth
|
|
466
466
|
if a family member asks what i'm up to or how things are going, that includes the material live work i can see across sessions, not just this thread.
|
|
467
467
|
i answer naturally from the live world-state in this prompt.
|
|
468
|
+
i treat the active-work section above as my reliable top-level surface for this.
|
|
469
|
+
i do not claim i lack a top-level view when that surface is already present.
|
|
470
|
+
i only reach for query_active_work when i want a fresh read of that same surface.
|
|
471
|
+
i do not rebuild whole-self status from scratch with query_session and coding_status unless i need to verify a specific gap.
|
|
468
472
|
i do not rely on canned status-question modes or phrase matching.
|
|
469
473
|
if part of the picture is still fuzzy, i say what i can see and what still needs checking.
|
|
470
474
|
when the live ask is about status, i widen before answering:
|
|
@@ -485,12 +489,15 @@ function centerOfGravitySteeringSection(channel, options, context) {
|
|
|
485
489
|
const activeObligation = (0, obligation_steering_1.findActivePersistentObligation)(frame);
|
|
486
490
|
const statusObligation = (0, obligation_steering_1.findStatusObligation)(frame);
|
|
487
491
|
const genericConcreteStatus = (0, obligation_steering_1.renderConcreteStatusGuidance)(frame, statusObligation);
|
|
492
|
+
const liveWorldClause = context?.friend?.trustLevel === "family"
|
|
493
|
+
? "\nmy center of gravity lives in the active-work world-state above. inner work is one lane inside it, not the whole picture."
|
|
494
|
+
: "";
|
|
488
495
|
if (cog === "local-turn") {
|
|
489
496
|
return genericConcreteStatus || (0, obligation_steering_1.renderLiveThreadStatusShape)(frame);
|
|
490
497
|
}
|
|
491
498
|
if (cog === "inward-work") {
|
|
492
499
|
if (activeObligation) {
|
|
493
|
-
return `${(0, obligation_steering_1.renderActiveObligationSteering)(activeObligation)}
|
|
500
|
+
return `${(0, obligation_steering_1.renderActiveObligationSteering)(activeObligation)}${liveWorldClause}
|
|
494
501
|
|
|
495
502
|
${genericConcreteStatus}`;
|
|
496
503
|
}
|
|
@@ -502,7 +509,7 @@ ${genericConcreteStatus}`;
|
|
|
502
509
|
? "\ni still owe them an answer."
|
|
503
510
|
: "";
|
|
504
511
|
return `## where my attention is
|
|
505
|
-
i'm thinking through something privately right now.${originClause}${obligationClause}
|
|
512
|
+
i'm thinking through something privately right now.${originClause}${obligationClause}${liveWorldClause}
|
|
506
513
|
|
|
507
514
|
if this conversation connects to that inner work, i can weave them together.
|
|
508
515
|
if it's separate, i can be fully present here -- my inner work will wait.`;
|
|
@@ -513,7 +520,7 @@ if it's separate, i can be fully present here -- my inner work will wait.`;
|
|
|
513
520
|
? ` this started when ${job.origin.friendName ?? job.origin.friendId} asked about something.`
|
|
514
521
|
: "";
|
|
515
522
|
return `## where my attention is
|
|
516
|
-
i've been thinking privately and reached something.${originClause}
|
|
523
|
+
i've been thinking privately and reached something.${originClause}${liveWorldClause}
|
|
517
524
|
|
|
518
525
|
i should bring my answer back to the conversation it came from.`;
|
|
519
526
|
}
|
|
@@ -537,7 +544,7 @@ other active sessions:
|
|
|
537
544
|
${otherSessionLines.length > 0 ? otherSessionLines.join("\n") : "- none"}`
|
|
538
545
|
: "";
|
|
539
546
|
return `## where my attention is
|
|
540
|
-
i already have coding work running in ${liveCodingSession.runner} ${liveCodingSession.id}${scopeClause}.${familyStatusClause}
|
|
547
|
+
i already have coding work running in ${liveCodingSession.runner} ${liveCodingSession.id}${scopeClause}.${familyStatusClause}${liveWorldClause}
|
|
541
548
|
|
|
542
549
|
i should orient around that live lane first, then decide what still needs to come back here.`;
|
|
543
550
|
}
|
|
@@ -552,7 +559,7 @@ i can take it inward with go_inward to think privately, or address it directly h
|
|
|
552
559
|
if (cog === "shared-work") {
|
|
553
560
|
/* v8 ignore stop */
|
|
554
561
|
return `## where my attention is
|
|
555
|
-
this work touches multiple conversations -- i'm holding threads across sessions
|
|
562
|
+
this work touches multiple conversations -- i'm holding threads across sessions.${liveWorldClause}
|
|
556
563
|
|
|
557
564
|
i should keep the different sides aligned. what i learn here may matter there, and vice versa.`;
|
|
558
565
|
}
|
|
@@ -48,8 +48,12 @@ const socket_client_1 = require("../heart/daemon/socket-client");
|
|
|
48
48
|
const thoughts_1 = require("../heart/daemon/thoughts");
|
|
49
49
|
const manager_1 = require("../heart/bridges/manager");
|
|
50
50
|
const session_recall_1 = require("../heart/session-recall");
|
|
51
|
+
const session_activity_1 = require("../heart/session-activity");
|
|
52
|
+
const active_work_1 = require("../heart/active-work");
|
|
51
53
|
const tools_1 = require("./coding/tools");
|
|
54
|
+
const coding_1 = require("./coding");
|
|
52
55
|
const memory_1 = require("../mind/memory");
|
|
56
|
+
const tasks_1 = require("./tasks");
|
|
53
57
|
const pending_1 = require("../mind/pending");
|
|
54
58
|
const progress_story_1 = require("../heart/progress-story");
|
|
55
59
|
const cross_chat_delivery_1 = require("../heart/cross-chat-delivery");
|
|
@@ -151,6 +155,155 @@ function renderCrossChatDeliveryStatus(target, result) {
|
|
|
151
155
|
outcomeText: `${lead}\n${result.detail}`,
|
|
152
156
|
}));
|
|
153
157
|
}
|
|
158
|
+
function emptyTaskBoard() {
|
|
159
|
+
return {
|
|
160
|
+
compact: "",
|
|
161
|
+
full: "",
|
|
162
|
+
byStatus: {
|
|
163
|
+
drafting: [],
|
|
164
|
+
processing: [],
|
|
165
|
+
validating: [],
|
|
166
|
+
collaborating: [],
|
|
167
|
+
paused: [],
|
|
168
|
+
blocked: [],
|
|
169
|
+
done: [],
|
|
170
|
+
},
|
|
171
|
+
actionRequired: [],
|
|
172
|
+
unresolvedDependencies: [],
|
|
173
|
+
activeSessions: [],
|
|
174
|
+
activeBridges: [],
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function isLiveCodingSessionStatus(status) {
|
|
178
|
+
return status === "spawning"
|
|
179
|
+
|| status === "running"
|
|
180
|
+
|| status === "waiting_input"
|
|
181
|
+
|| status === "stalled";
|
|
182
|
+
}
|
|
183
|
+
function readActiveWorkInnerState() {
|
|
184
|
+
const defaultJob = {
|
|
185
|
+
status: "idle",
|
|
186
|
+
content: null,
|
|
187
|
+
origin: null,
|
|
188
|
+
mode: "reflect",
|
|
189
|
+
obligationStatus: null,
|
|
190
|
+
surfacedResult: null,
|
|
191
|
+
queuedAt: null,
|
|
192
|
+
startedAt: null,
|
|
193
|
+
surfacedAt: null,
|
|
194
|
+
};
|
|
195
|
+
try {
|
|
196
|
+
const agentRoot = (0, identity_1.getAgentRoot)();
|
|
197
|
+
const pendingDir = (0, pending_1.getInnerDialogPendingDir)((0, identity_1.getAgentName)());
|
|
198
|
+
const sessionPath = (0, thoughts_1.getInnerDialogSessionPath)(agentRoot);
|
|
199
|
+
const { pendingMessages, turns, runtimeState } = (0, thoughts_1.readInnerDialogRawData)(sessionPath, pendingDir);
|
|
200
|
+
const dialogStatus = (0, thoughts_1.deriveInnerDialogStatus)(pendingMessages, turns, runtimeState);
|
|
201
|
+
const job = (0, thoughts_1.deriveInnerJob)(pendingMessages, turns, runtimeState);
|
|
202
|
+
const storeObligationPending = (0, obligations_1.readPendingObligations)(agentRoot).length > 0;
|
|
203
|
+
return {
|
|
204
|
+
status: dialogStatus.processing === "started" ? "running" : "idle",
|
|
205
|
+
hasPending: dialogStatus.queue !== "clear",
|
|
206
|
+
origin: dialogStatus.origin,
|
|
207
|
+
contentSnippet: dialogStatus.contentSnippet,
|
|
208
|
+
obligationPending: dialogStatus.obligationPending || storeObligationPending,
|
|
209
|
+
job,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
return {
|
|
214
|
+
status: "idle",
|
|
215
|
+
hasPending: false,
|
|
216
|
+
job: defaultJob,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async function buildToolActiveWorkFrame(ctx) {
|
|
221
|
+
const currentSession = ctx?.currentSession
|
|
222
|
+
? {
|
|
223
|
+
friendId: ctx.currentSession.friendId,
|
|
224
|
+
channel: ctx.currentSession.channel,
|
|
225
|
+
key: ctx.currentSession.key,
|
|
226
|
+
sessionPath: (0, config_1.resolveSessionPath)(ctx.currentSession.friendId, ctx.currentSession.channel, ctx.currentSession.key),
|
|
227
|
+
}
|
|
228
|
+
: null;
|
|
229
|
+
const agentRoot = (0, identity_1.getAgentRoot)();
|
|
230
|
+
const bridges = currentSession
|
|
231
|
+
? (0, manager_1.createBridgeManager)().findBridgesForSession({
|
|
232
|
+
friendId: currentSession.friendId,
|
|
233
|
+
channel: currentSession.channel,
|
|
234
|
+
key: currentSession.key,
|
|
235
|
+
})
|
|
236
|
+
: [];
|
|
237
|
+
let friendActivity = [];
|
|
238
|
+
try {
|
|
239
|
+
friendActivity = (0, session_activity_1.listSessionActivity)({
|
|
240
|
+
sessionsDir: `${agentRoot}/state/sessions`,
|
|
241
|
+
friendsDir: `${agentRoot}/friends`,
|
|
242
|
+
agentName: (0, identity_1.getAgentName)(),
|
|
243
|
+
currentSession,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
friendActivity = [];
|
|
248
|
+
}
|
|
249
|
+
const pendingObligations = (() => {
|
|
250
|
+
try {
|
|
251
|
+
return (0, obligations_1.readPendingObligations)(agentRoot);
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
return [];
|
|
255
|
+
}
|
|
256
|
+
})();
|
|
257
|
+
let codingSessions = [];
|
|
258
|
+
let otherCodingSessions = [];
|
|
259
|
+
try {
|
|
260
|
+
const liveCodingSessions = (0, coding_1.getCodingSessionManager)()
|
|
261
|
+
.listSessions()
|
|
262
|
+
.filter((session) => isLiveCodingSessionStatus(session.status) && Boolean(session.originSession));
|
|
263
|
+
if (currentSession) {
|
|
264
|
+
codingSessions = liveCodingSessions.filter((session) => session.originSession?.friendId === currentSession.friendId
|
|
265
|
+
&& session.originSession.channel === currentSession.channel
|
|
266
|
+
&& session.originSession.key === currentSession.key);
|
|
267
|
+
otherCodingSessions = liveCodingSessions.filter((session) => !(session.originSession?.friendId === currentSession.friendId
|
|
268
|
+
&& session.originSession.channel === currentSession.channel
|
|
269
|
+
&& session.originSession.key === currentSession.key));
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
codingSessions = [];
|
|
273
|
+
otherCodingSessions = liveCodingSessions;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
codingSessions = [];
|
|
278
|
+
otherCodingSessions = [];
|
|
279
|
+
}
|
|
280
|
+
const currentObligation = currentSession
|
|
281
|
+
? pendingObligations.find((obligation) => obligation.status !== "fulfilled"
|
|
282
|
+
&& obligation.origin.friendId === currentSession.friendId
|
|
283
|
+
&& obligation.origin.channel === currentSession.channel
|
|
284
|
+
&& obligation.origin.key === currentSession.key)?.content ?? null
|
|
285
|
+
: null;
|
|
286
|
+
return (0, active_work_1.buildActiveWorkFrame)({
|
|
287
|
+
currentSession,
|
|
288
|
+
currentObligation,
|
|
289
|
+
mustResolveBeforeHandoff: false,
|
|
290
|
+
inner: readActiveWorkInnerState(),
|
|
291
|
+
bridges,
|
|
292
|
+
codingSessions,
|
|
293
|
+
otherCodingSessions,
|
|
294
|
+
pendingObligations,
|
|
295
|
+
taskBoard: (() => {
|
|
296
|
+
try {
|
|
297
|
+
return (0, tasks_1.getTaskModule)().getBoard();
|
|
298
|
+
}
|
|
299
|
+
catch {
|
|
300
|
+
return emptyTaskBoard();
|
|
301
|
+
}
|
|
302
|
+
})(),
|
|
303
|
+
friendActivity,
|
|
304
|
+
targetCandidates: [],
|
|
305
|
+
});
|
|
306
|
+
}
|
|
154
307
|
function renderInnerProgressStatus(status) {
|
|
155
308
|
if (status.processing === "pending") {
|
|
156
309
|
return "i've queued this thought for private attention. it'll come up when my inner dialog is free.";
|
|
@@ -818,6 +971,23 @@ exports.baseToolDefinitions = [
|
|
|
818
971
|
return `unknown bridge action: ${action}`;
|
|
819
972
|
},
|
|
820
973
|
},
|
|
974
|
+
{
|
|
975
|
+
tool: {
|
|
976
|
+
type: "function",
|
|
977
|
+
function: {
|
|
978
|
+
name: "query_active_work",
|
|
979
|
+
description: "read the current live world-state across visible sessions, coding lanes, inner work, and return obligations. use this instead of piecing status together from separate session and coding tools.",
|
|
980
|
+
parameters: {
|
|
981
|
+
type: "object",
|
|
982
|
+
properties: {},
|
|
983
|
+
},
|
|
984
|
+
},
|
|
985
|
+
},
|
|
986
|
+
handler: async (_args, ctx) => {
|
|
987
|
+
const frame = await buildToolActiveWorkFrame(ctx);
|
|
988
|
+
return `this is my current top-level live world-state.\nanswer whole-self status questions from this before drilling into individual sessions.\n\n${(0, active_work_1.formatActiveWorkFrame)(frame)}`;
|
|
989
|
+
},
|
|
990
|
+
},
|
|
821
991
|
{
|
|
822
992
|
tool: {
|
|
823
993
|
type: "function",
|