@ouro.bot/cli 0.1.0-alpha.211 → 0.1.0-alpha.213
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/README.md +6 -6
- package/changelog.json +12 -0
- package/dist/heart/core.js +0 -19
- package/dist/heart/daemon/daemon.js +1 -1
- package/dist/heart/daemon/sense-manager.js +1 -1
- package/dist/senses/{bluebubbles-client.js → bluebubbles/client.js} +8 -8
- package/dist/senses/{bluebubbles-entry.js → bluebubbles/entry.js} +6 -6
- package/dist/senses/{bluebubbles-inbound-log.js → bluebubbles/inbound-log.js} +3 -3
- package/dist/senses/{bluebubbles.js → bluebubbles/index.js} +40 -40
- package/dist/senses/{bluebubbles-media.js → bluebubbles/media.js} +2 -2
- package/dist/senses/{bluebubbles-model.js → bluebubbles/model.js} +1 -1
- package/dist/senses/{bluebubbles-mutation-log.js → bluebubbles/mutation-log.js} +3 -3
- package/dist/senses/{bluebubbles-runtime-state.js → bluebubbles/runtime-state.js} +2 -2
- package/dist/senses/{bluebubbles-session-cleanup.js → bluebubbles/session-cleanup.js} +1 -1
- package/package.json +2 -3
- package/subagents/README.md +0 -7
package/README.md
CHANGED
|
@@ -33,14 +33,16 @@ Current provider ids:
|
|
|
33
33
|
|
|
34
34
|
The shared harness lives in `src/`:
|
|
35
35
|
|
|
36
|
+
- `src/arc/`
|
|
37
|
+
Durable continuity state — obligations, cares, episodes, intentions, presence, and attention types. The agent's sense of ongoing story.
|
|
36
38
|
- `src/heart/`
|
|
37
|
-
Core runtime, provider adapters, daemon, bootstrap, identity, and entrypoints.
|
|
39
|
+
Core runtime, provider adapters, daemon, bootstrap, identity, and entrypoints. Organized into topic subdirectories: daemon/ (lifecycle), outlook/ (calendar), habits/ (scheduling), hatch/ (agent creation), versioning/ (updates), auth/, mcp/, providers/, bridges/.
|
|
38
40
|
- `src/mind/`
|
|
39
|
-
Prompt assembly, session persistence, bundle manifest enforcement, phrases, formatting, diary (memory), journal, and friend resolution.
|
|
41
|
+
Prompt assembly, session persistence, bundle manifest enforcement, phrases, formatting, diary (memory), associative recall, embedding providers, journal, obligation steering, and friend resolution.
|
|
40
42
|
- `src/repertoire/`
|
|
41
|
-
Tool registry, coding orchestration, task tools, and integration clients.
|
|
43
|
+
Tool registry (split into category modules: files, shell, memory, bridge, session, continuity, flow, surface, config, and sense-specific tools), coding orchestration, task tools, shared API client, and integration clients (Graph, ADO, GitHub).
|
|
42
44
|
- `src/senses/`
|
|
43
|
-
CLI, Teams, BlueBubbles, MCP, activity transport, inner-dialog orchestration, and contextual heartbeat.
|
|
45
|
+
CLI (with TUI in senses/cli/), Teams, BlueBubbles (in senses/bluebubbles/), MCP, activity transport, inner-dialog orchestration, and contextual heartbeat.
|
|
44
46
|
- `src/nerves/`
|
|
45
47
|
Structured runtime logging and coverage-audit infrastructure.
|
|
46
48
|
- `src/__tests__/`
|
|
@@ -52,8 +54,6 @@ Other important top-level paths:
|
|
|
52
54
|
Packaged specialist bundle used by `ouro hatch`.
|
|
53
55
|
- `skills/`
|
|
54
56
|
Harness-level skills shipped with the repo (e.g., `configure-dev-tools.md`). These are available to every agent and serve as fallbacks when an agent doesn't have its own version. Agent-specific skills live in the bundle at `~/AgentBundles/<agent>.ouro/skills/`.
|
|
55
|
-
- `subagents/`
|
|
56
|
-
Workflow skills have moved to [github.com/ouroborosbot/ouroboros-skills](https://github.com/ouroborosbot/ouroboros-skills). Use the skill-management skill for installation and updates.
|
|
57
57
|
- `scripts/teams-sense/`
|
|
58
58
|
Operator scripts for the Teams deployment path.
|
|
59
59
|
- `docs/`
|
package/changelog.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
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.213",
|
|
6
|
+
"changes": [
|
|
7
|
+
"cleanup: remove vestigial subagents/ directory and package.json files entry (content already in ouroboros-skills repo). Remove backward-compat re-exports from heart/core.ts (tools, execTool, summarizeArgs, getToolsForChannel, streamChatCompletion, streamResponsesApi, toResponsesInput, toResponsesTools, buildSystem, Channel, hasToolIntent — no consumers used them). Update ARCHITECTURE.md, README.md, and CONTRIBUTING.md to reflect the full audit restructuring: new arc/ subsystem, heart/ topic subdirectories, split tool modules, BlueBubbles directory, scopes list."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.212",
|
|
12
|
+
"changes": [
|
|
13
|
+
"refactor: consolidate BlueBubbles sense into senses/bluebubbles/ directory — move 9 flat files (bluebubbles.ts, bluebubbles-client.ts, bluebubbles-model.ts, bluebubbles-media.ts, bluebubbles-inbound-log.ts, bluebubbles-mutation-log.ts, bluebubbles-runtime-state.ts, bluebubbles-session-cleanup.ts, bluebubbles-entry.ts) into senses/bluebubbles/ with shorter names (index.ts, client.ts, model.ts, etc.). All imports updated across 20+ files including test files, sense-manager, daemon, and package.json."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.211",
|
|
6
18
|
"changes": [
|
package/dist/heart/core.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hasToolIntent = exports.buildSystem = exports.toResponsesTools = exports.toResponsesInput = exports.streamResponsesApi = exports.streamChatCompletion = exports.getToolsForChannel = exports.summarizeArgs = exports.execTool = exports.tools = void 0;
|
|
4
3
|
exports.createProviderRegistry = createProviderRegistry;
|
|
5
4
|
exports.resetProviderRuntime = resetProviderRuntime;
|
|
6
5
|
exports.getModel = getModel;
|
|
@@ -147,21 +146,6 @@ function getProviderDisplayLabel(facing = "human") {
|
|
|
147
146
|
};
|
|
148
147
|
return providerLabelBuilders[provider]();
|
|
149
148
|
}
|
|
150
|
-
// Re-export tools, execTool, summarizeArgs from ./tools for backward compat
|
|
151
|
-
var tools_3 = require("../repertoire/tools");
|
|
152
|
-
Object.defineProperty(exports, "tools", { enumerable: true, get: function () { return tools_3.tools; } });
|
|
153
|
-
Object.defineProperty(exports, "execTool", { enumerable: true, get: function () { return tools_3.execTool; } });
|
|
154
|
-
Object.defineProperty(exports, "summarizeArgs", { enumerable: true, get: function () { return tools_3.summarizeArgs; } });
|
|
155
|
-
Object.defineProperty(exports, "getToolsForChannel", { enumerable: true, get: function () { return tools_3.getToolsForChannel; } });
|
|
156
|
-
// Re-export streaming functions for backward compat
|
|
157
|
-
var streaming_1 = require("./streaming");
|
|
158
|
-
Object.defineProperty(exports, "streamChatCompletion", { enumerable: true, get: function () { return streaming_1.streamChatCompletion; } });
|
|
159
|
-
Object.defineProperty(exports, "streamResponsesApi", { enumerable: true, get: function () { return streaming_1.streamResponsesApi; } });
|
|
160
|
-
Object.defineProperty(exports, "toResponsesInput", { enumerable: true, get: function () { return streaming_1.toResponsesInput; } });
|
|
161
|
-
Object.defineProperty(exports, "toResponsesTools", { enumerable: true, get: function () { return streaming_1.toResponsesTools; } });
|
|
162
|
-
// Re-export prompt functions for backward compat
|
|
163
|
-
var prompt_2 = require("../mind/prompt");
|
|
164
|
-
Object.defineProperty(exports, "buildSystem", { enumerable: true, get: function () { return prompt_2.buildSystem; } });
|
|
165
149
|
// Sole-call tools must be the only tool call in a turn. When they appear
|
|
166
150
|
// alongside other tools, the sole-call tool is rejected with this message.
|
|
167
151
|
const SOLE_CALL_REJECTION = {
|
|
@@ -264,9 +248,6 @@ function getSettleRetryError(mustResolveBeforeHandoff, intent, sawSteeringFollow
|
|
|
264
248
|
}
|
|
265
249
|
return null;
|
|
266
250
|
}
|
|
267
|
-
// Re-export kick utilities for backward compat
|
|
268
|
-
var kicks_1 = require("./kicks");
|
|
269
|
-
Object.defineProperty(exports, "hasToolIntent", { enumerable: true, get: function () { return kicks_1.hasToolIntent; } });
|
|
270
251
|
function upsertSystemPrompt(messages, systemText) {
|
|
271
252
|
const systemMessage = { role: "system", content: systemText };
|
|
272
253
|
if (messages[0]?.role === "system") {
|
|
@@ -90,7 +90,7 @@ function killOrphanProcesses() {
|
|
|
90
90
|
// Only match daemon-owned entry points, NOT mcp-serve or other external processes
|
|
91
91
|
if (line.includes("mcp-serve") || line.includes("mcp serve"))
|
|
92
92
|
continue;
|
|
93
|
-
if (!line.includes("agent-entry.js") && !line.includes("daemon-entry.js") && !line.includes("bluebubbles
|
|
93
|
+
if (!line.includes("agent-entry.js") && !line.includes("daemon-entry.js") && !line.includes("bluebubbles/entry.js") && !line.includes("teams-entry.js"))
|
|
94
94
|
continue;
|
|
95
95
|
const pid = parseInt(line.trim(), 10);
|
|
96
96
|
if (!isNaN(pid) && pid !== process.pid)
|
|
@@ -248,7 +248,7 @@ class DaemonSenseManager {
|
|
|
248
248
|
.map((sense) => ({
|
|
249
249
|
name: `${agent}:${sense}`,
|
|
250
250
|
agentArg: agent,
|
|
251
|
-
entry: sense === "teams" ? "senses/teams-entry.js" : "senses/bluebubbles
|
|
251
|
+
entry: sense === "teams" ? "senses/teams-entry.js" : "senses/bluebubbles/entry.js",
|
|
252
252
|
channel: sense,
|
|
253
253
|
autoStart: true,
|
|
254
254
|
}));
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createBlueBubblesClient = createBlueBubblesClient;
|
|
4
4
|
const node_crypto_1 = require("node:crypto");
|
|
5
|
-
const config_1 = require("
|
|
6
|
-
const identity_1 = require("
|
|
7
|
-
const runtime_1 = require("
|
|
8
|
-
const
|
|
9
|
-
const
|
|
5
|
+
const config_1 = require("../../heart/config");
|
|
6
|
+
const identity_1 = require("../../heart/identity");
|
|
7
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
8
|
+
const model_1 = require("./model");
|
|
9
|
+
const media_1 = require("./media");
|
|
10
10
|
function buildBlueBubblesApiUrl(baseUrl, endpoint, password) {
|
|
11
11
|
const root = baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`;
|
|
12
12
|
const url = new URL(endpoint.replace(/^\//, ""), root);
|
|
@@ -423,13 +423,13 @@ function createBlueBubblesClient(config = (0, config_1.getBlueBubblesConfig)(),
|
|
|
423
423
|
});
|
|
424
424
|
return repaired;
|
|
425
425
|
}
|
|
426
|
-
const normalized = (0,
|
|
426
|
+
const normalized = (0, model_1.normalizeBlueBubblesEvent)({
|
|
427
427
|
type: event.eventType,
|
|
428
428
|
data,
|
|
429
429
|
});
|
|
430
430
|
const recoveredMessage = event.kind === "mutation"
|
|
431
431
|
&& !event.shouldNotifyAgent
|
|
432
|
-
? (0,
|
|
432
|
+
? (0, model_1.normalizeBlueBubblesEvent)({
|
|
433
433
|
type: "new-message",
|
|
434
434
|
data,
|
|
435
435
|
})
|
|
@@ -440,7 +440,7 @@ function createBlueBubblesClient(config = (0, config_1.getBlueBubblesConfig)(),
|
|
|
440
440
|
if (hydrated.kind === "message" &&
|
|
441
441
|
hydrated.balloonBundleId !== "com.apple.messages.URLBalloonProvider" &&
|
|
442
442
|
hydrated.attachments.length > 0) {
|
|
443
|
-
const media = await (0,
|
|
443
|
+
const media = await (0, media_1.hydrateBlueBubblesAttachments)(hydrated.attachments, config, channelConfig, {
|
|
444
444
|
preferAudioInput: providerSupportsAudioInput((0, identity_1.loadAgentConfig)().humanFacing.provider),
|
|
445
445
|
});
|
|
446
446
|
const transcriptSuffix = media.transcriptAdditions.map((entry) => `[${entry}]`).join("\n");
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Thin entrypoint for `npm run bluebubbles` / `node dist/senses/bluebubbles
|
|
3
|
-
// Separated from
|
|
2
|
+
// Thin entrypoint for `npm run bluebubbles` / `node dist/senses/bluebubbles/entry.js --agent <name>`.
|
|
3
|
+
// Separated from index.ts so the BlueBubbles adapter stays testable.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
if (!process.argv.includes("--agent")) {
|
|
6
6
|
// eslint-disable-next-line no-console -- pre-boot guard: --agent check before imports
|
|
7
|
-
console.error("Missing required --agent <name> argument.\nUsage: node dist/senses/bluebubbles
|
|
7
|
+
console.error("Missing required --agent <name> argument.\nUsage: node dist/senses/bluebubbles/entry.js --agent ouroboros");
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
const runtime_logging_1 = require("
|
|
10
|
+
const index_1 = require("./index");
|
|
11
|
+
const runtime_logging_1 = require("../../heart/daemon/runtime-logging");
|
|
12
12
|
(0, runtime_logging_1.configureDaemonRuntimeLogger)("bluebubbles");
|
|
13
|
-
(0,
|
|
13
|
+
(0, index_1.startBlueBubblesApp)();
|
|
@@ -38,9 +38,9 @@ exports.hasRecordedBlueBubblesInbound = hasRecordedBlueBubblesInbound;
|
|
|
38
38
|
exports.recordBlueBubblesInbound = recordBlueBubblesInbound;
|
|
39
39
|
const fs = __importStar(require("node:fs"));
|
|
40
40
|
const path = __importStar(require("node:path"));
|
|
41
|
-
const config_1 = require("
|
|
42
|
-
const identity_1 = require("
|
|
43
|
-
const runtime_1 = require("
|
|
41
|
+
const config_1 = require("../../heart/config");
|
|
42
|
+
const identity_1 = require("../../heart/identity");
|
|
43
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
44
44
|
function getBlueBubblesInboundLogPath(agentName, sessionKey) {
|
|
45
45
|
return path.join((0, identity_1.getAgentRoot)(agentName), "state", "senses", "bluebubbles", "inbound", `${(0, config_1.sanitizeKey)(sessionKey)}.ndjson`);
|
|
46
46
|
}
|
|
@@ -44,32 +44,32 @@ exports.startBlueBubblesApp = startBlueBubblesApp;
|
|
|
44
44
|
const fs = __importStar(require("node:fs"));
|
|
45
45
|
const http = __importStar(require("node:http"));
|
|
46
46
|
const path = __importStar(require("node:path"));
|
|
47
|
-
const core_1 = require("
|
|
48
|
-
const config_1 = require("
|
|
49
|
-
const identity_1 = require("
|
|
50
|
-
const turn_coordinator_1 = require("
|
|
51
|
-
const context_1 = require("
|
|
52
|
-
const tokens_1 = require("
|
|
53
|
-
const group_context_1 = require("
|
|
54
|
-
const resolver_1 = require("
|
|
55
|
-
const store_file_1 = require("
|
|
56
|
-
const types_1 = require("
|
|
57
|
-
const channel_1 = require("
|
|
58
|
-
const pending_1 = require("
|
|
59
|
-
const prompt_1 = require("
|
|
60
|
-
const mcp_manager_1 = require("
|
|
47
|
+
const core_1 = require("../../heart/core");
|
|
48
|
+
const config_1 = require("../../heart/config");
|
|
49
|
+
const identity_1 = require("../../heart/identity");
|
|
50
|
+
const turn_coordinator_1 = require("../../heart/turn-coordinator");
|
|
51
|
+
const context_1 = require("../../mind/context");
|
|
52
|
+
const tokens_1 = require("../../mind/friends/tokens");
|
|
53
|
+
const group_context_1 = require("../../mind/friends/group-context");
|
|
54
|
+
const resolver_1 = require("../../mind/friends/resolver");
|
|
55
|
+
const store_file_1 = require("../../mind/friends/store-file");
|
|
56
|
+
const types_1 = require("../../mind/friends/types");
|
|
57
|
+
const channel_1 = require("../../mind/friends/channel");
|
|
58
|
+
const pending_1 = require("../../mind/pending");
|
|
59
|
+
const prompt_1 = require("../../mind/prompt");
|
|
60
|
+
const mcp_manager_1 = require("../../repertoire/mcp-manager");
|
|
61
61
|
// getPhrases removed — no longer needed after debug-activity cleanup
|
|
62
|
-
const runtime_1 = require("
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const tool_activity_callbacks_1 = require("
|
|
70
|
-
const commands_1 = require("
|
|
71
|
-
const trust_gate_1 = require("
|
|
72
|
-
const pipeline_1 = require("
|
|
62
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
63
|
+
const model_1 = require("./model");
|
|
64
|
+
const client_1 = require("./client");
|
|
65
|
+
const inbound_log_1 = require("./inbound-log");
|
|
66
|
+
const mutation_log_1 = require("./mutation-log");
|
|
67
|
+
const runtime_state_1 = require("./runtime-state");
|
|
68
|
+
const session_cleanup_1 = require("./session-cleanup");
|
|
69
|
+
const tool_activity_callbacks_1 = require("../../heart/tool-activity-callbacks");
|
|
70
|
+
const commands_1 = require("../commands");
|
|
71
|
+
const trust_gate_1 = require("../trust-gate");
|
|
72
|
+
const pipeline_1 = require("../pipeline");
|
|
73
73
|
const bbFailoverStates = new Map();
|
|
74
74
|
// Enrich reaction text with the original message content for context.
|
|
75
75
|
// If originalText is provided and non-empty, format as: baseText to: "truncated"
|
|
@@ -128,8 +128,8 @@ const defaultDeps = {
|
|
|
128
128
|
postTurn: context_1.postTurn,
|
|
129
129
|
sessionPath: config_1.sessionPath,
|
|
130
130
|
accumulateFriendTokens: tokens_1.accumulateFriendTokens,
|
|
131
|
-
createClient: () => (0,
|
|
132
|
-
recordMutation:
|
|
131
|
+
createClient: () => (0, client_1.createBlueBubblesClient)(),
|
|
132
|
+
recordMutation: mutation_log_1.recordBlueBubblesMutation,
|
|
133
133
|
createFriendStore: () => new store_file_1.FileFriendStore(path.join((0, identity_1.getAgentRoot)(), "friends")),
|
|
134
134
|
createFriendResolver: (store, params) => new resolver_1.FriendResolver(store, params),
|
|
135
135
|
createServer: http.createServer,
|
|
@@ -618,7 +618,7 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
618
618
|
const friendId = context.friend.id;
|
|
619
619
|
const sessPath = resolvedDeps.sessionPath(friendId, "bluebubbles", event.chat.sessionKey);
|
|
620
620
|
try {
|
|
621
|
-
(0,
|
|
621
|
+
(0, session_cleanup_1.findObsoleteBlueBubblesThreadSessions)(sessPath);
|
|
622
622
|
}
|
|
623
623
|
catch (error) {
|
|
624
624
|
(0, runtime_1.emitNervesEvent)({
|
|
@@ -641,7 +641,7 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
641
641
|
: [{ role: "system", content: await resolvedDeps.buildSystem("bluebubbles", { mcpManager }, context) }];
|
|
642
642
|
if (event.kind === "message") {
|
|
643
643
|
const agentName = resolvedDeps.getAgentName();
|
|
644
|
-
if ((0,
|
|
644
|
+
if ((0, inbound_log_1.hasRecordedBlueBubblesInbound)(agentName, event.chat.sessionKey, event.messageGuid)) {
|
|
645
645
|
(0, runtime_1.emitNervesEvent)({
|
|
646
646
|
component: "senses",
|
|
647
647
|
event: "senses.bluebubbles_recovery_skip",
|
|
@@ -656,9 +656,9 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
656
656
|
}
|
|
657
657
|
// Record EARLY to prevent duplicate processing. BB webhooks can retry
|
|
658
658
|
// before the first turn completes — recording after the turn is too late.
|
|
659
|
-
(0,
|
|
659
|
+
(0, inbound_log_1.recordBlueBubblesInbound)(agentName, event, source);
|
|
660
660
|
if (source !== "webhook" && sessionLikelyContainsMessage(event, existing?.messages ?? sessionMessages)) {
|
|
661
|
-
(0,
|
|
661
|
+
(0, inbound_log_1.recordBlueBubblesInbound)(agentName, event, "recovery-bootstrap");
|
|
662
662
|
(0, runtime_1.emitNervesEvent)({
|
|
663
663
|
component: "senses",
|
|
664
664
|
event: "senses.bluebubbles_recovery_skip",
|
|
@@ -814,7 +814,7 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
816
|
if (event.kind === "message") {
|
|
817
|
-
(0,
|
|
817
|
+
(0, inbound_log_1.recordBlueBubblesInbound)(resolvedDeps.getAgentName(), event, source);
|
|
818
818
|
}
|
|
819
819
|
return {
|
|
820
820
|
handled: true,
|
|
@@ -825,7 +825,7 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
825
825
|
// Gate allowed — flush the agent's reply
|
|
826
826
|
await callbacks.flush();
|
|
827
827
|
if (event.kind === "message") {
|
|
828
|
-
(0,
|
|
828
|
+
(0, inbound_log_1.recordBlueBubblesInbound)(resolvedDeps.getAgentName(), event, source);
|
|
829
829
|
}
|
|
830
830
|
(0, runtime_1.emitNervesEvent)({
|
|
831
831
|
component: "senses",
|
|
@@ -859,12 +859,12 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
859
859
|
async function handleBlueBubblesEvent(payload, deps = {}) {
|
|
860
860
|
const resolvedDeps = { ...defaultDeps, ...deps };
|
|
861
861
|
const client = resolvedDeps.createClient();
|
|
862
|
-
const event = await client.repairEvent((0,
|
|
862
|
+
const event = await client.repairEvent((0, model_1.normalizeBlueBubblesEvent)(payload));
|
|
863
863
|
return handleBlueBubblesNormalizedEvent(event, resolvedDeps, "webhook");
|
|
864
864
|
}
|
|
865
865
|
function countPendingRecoveryCandidates(agentName) {
|
|
866
|
-
return (0,
|
|
867
|
-
.filter((entry) => !(0,
|
|
866
|
+
return (0, mutation_log_1.listBlueBubblesRecoveryCandidates)(agentName)
|
|
867
|
+
.filter((entry) => !(0, inbound_log_1.hasRecordedBlueBubblesInbound)(agentName, entry.sessionKey, entry.messageGuid))
|
|
868
868
|
.length;
|
|
869
869
|
}
|
|
870
870
|
async function syncBlueBubblesRuntime(deps = {}) {
|
|
@@ -875,7 +875,7 @@ async function syncBlueBubblesRuntime(deps = {}) {
|
|
|
875
875
|
try {
|
|
876
876
|
await client.checkHealth();
|
|
877
877
|
const recovery = await recoverMissedBlueBubblesMessages(resolvedDeps);
|
|
878
|
-
(0,
|
|
878
|
+
(0, runtime_state_1.writeBlueBubblesRuntimeState)(agentName, {
|
|
879
879
|
upstreamStatus: recovery.pending > 0 || recovery.failed > 0 ? "error" : "ok",
|
|
880
880
|
detail: recovery.failed > 0
|
|
881
881
|
? `recovery failures: ${recovery.failed}`
|
|
@@ -888,7 +888,7 @@ async function syncBlueBubblesRuntime(deps = {}) {
|
|
|
888
888
|
});
|
|
889
889
|
}
|
|
890
890
|
catch (error) {
|
|
891
|
-
(0,
|
|
891
|
+
(0, runtime_state_1.writeBlueBubblesRuntimeState)(agentName, {
|
|
892
892
|
upstreamStatus: "error",
|
|
893
893
|
detail: error instanceof Error ? error.message : String(error),
|
|
894
894
|
lastCheckedAt: checkedAt,
|
|
@@ -901,8 +901,8 @@ async function recoverMissedBlueBubblesMessages(deps = {}) {
|
|
|
901
901
|
const agentName = resolvedDeps.getAgentName();
|
|
902
902
|
const client = resolvedDeps.createClient();
|
|
903
903
|
const result = { recovered: 0, skipped: 0, pending: 0, failed: 0 };
|
|
904
|
-
for (const candidate of (0,
|
|
905
|
-
if ((0,
|
|
904
|
+
for (const candidate of (0, mutation_log_1.listBlueBubblesRecoveryCandidates)(agentName)) {
|
|
905
|
+
if ((0, inbound_log_1.hasRecordedBlueBubblesInbound)(agentName, candidate.sessionKey, candidate.messageGuid)) {
|
|
906
906
|
result.skipped++;
|
|
907
907
|
continue;
|
|
908
908
|
}
|
|
@@ -38,8 +38,8 @@ const node_child_process_1 = require("node:child_process");
|
|
|
38
38
|
const fs = __importStar(require("node:fs/promises"));
|
|
39
39
|
const os = __importStar(require("node:os"));
|
|
40
40
|
const path = __importStar(require("node:path"));
|
|
41
|
-
const runtime_1 = require("
|
|
42
|
-
const identity_1 = require("
|
|
41
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
42
|
+
const identity_1 = require("../../heart/identity");
|
|
43
43
|
const MAX_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
44
44
|
const AUDIO_EXTENSIONS = new Set([".mp3", ".wav", ".m4a", ".caf", ".ogg"]);
|
|
45
45
|
const IMAGE_EXTENSIONS = new Set([".jpg", ".jpeg", ".png", ".gif", ".webp", ".heic", ".heif"]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeBlueBubblesEvent = normalizeBlueBubblesEvent;
|
|
4
|
-
const runtime_1 = require("
|
|
4
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
5
5
|
function asRecord(value) {
|
|
6
6
|
return value && typeof value === "object" && !Array.isArray(value)
|
|
7
7
|
? value
|
|
@@ -38,9 +38,9 @@ exports.recordBlueBubblesMutation = recordBlueBubblesMutation;
|
|
|
38
38
|
exports.listBlueBubblesRecoveryCandidates = listBlueBubblesRecoveryCandidates;
|
|
39
39
|
const fs = __importStar(require("node:fs"));
|
|
40
40
|
const path = __importStar(require("node:path"));
|
|
41
|
-
const runtime_1 = require("
|
|
42
|
-
const identity_1 = require("
|
|
43
|
-
const config_1 = require("
|
|
41
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
42
|
+
const identity_1 = require("../../heart/identity");
|
|
43
|
+
const config_1 = require("../../heart/config");
|
|
44
44
|
function getBlueBubblesMutationLogPath(agentName, sessionKey) {
|
|
45
45
|
return path.join((0, identity_1.getAgentRoot)(agentName), "state", "senses", "bluebubbles", "mutations", `${(0, config_1.sanitizeKey)(sessionKey)}.ndjson`);
|
|
46
46
|
}
|
|
@@ -38,8 +38,8 @@ exports.readBlueBubblesRuntimeState = readBlueBubblesRuntimeState;
|
|
|
38
38
|
exports.writeBlueBubblesRuntimeState = writeBlueBubblesRuntimeState;
|
|
39
39
|
const fs = __importStar(require("node:fs"));
|
|
40
40
|
const path = __importStar(require("node:path"));
|
|
41
|
-
const identity_1 = require("
|
|
42
|
-
const runtime_1 = require("
|
|
41
|
+
const identity_1 = require("../../heart/identity");
|
|
42
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
43
43
|
const DEFAULT_RUNTIME_STATE = {
|
|
44
44
|
upstreamStatus: "unknown",
|
|
45
45
|
detail: "startup health probe pending",
|
|
@@ -36,7 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.findObsoleteBlueBubblesThreadSessions = findObsoleteBlueBubblesThreadSessions;
|
|
37
37
|
const fs = __importStar(require("node:fs"));
|
|
38
38
|
const path = __importStar(require("node:path"));
|
|
39
|
-
const runtime_1 = require("
|
|
39
|
+
const runtime_1 = require("../../nerves/runtime");
|
|
40
40
|
function findObsoleteBlueBubblesThreadSessions(trunkSessionPath) {
|
|
41
41
|
const normalized = trunkSessionPath.trim();
|
|
42
42
|
if (!normalized.endsWith(".json"))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouro.bot/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.213",
|
|
4
4
|
"main": "dist/heart/daemon/ouro-entry.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"cli": "dist/heart/daemon/ouro-bot-entry.js",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/",
|
|
12
12
|
"SerpentGuide.ouro/",
|
|
13
|
-
"subagents/",
|
|
14
13
|
"skills/",
|
|
15
14
|
"assets/",
|
|
16
15
|
"changelog.json"
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
"daemon": "tsc && node dist/heart/daemon/daemon-entry.js",
|
|
26
25
|
"ouro": "tsc && node dist/heart/daemon/ouro-entry.js",
|
|
27
26
|
"teams": "tsc && node dist/senses/teams-entry.js --agent ouroboros",
|
|
28
|
-
"bluebubbles": "tsc && node dist/senses/bluebubbles
|
|
27
|
+
"bluebubbles": "tsc && node dist/senses/bluebubbles/entry.js --agent ouroboros",
|
|
29
28
|
"test": "vitest run",
|
|
30
29
|
"test:coverage:vitest": "vitest run --coverage",
|
|
31
30
|
"test:coverage": "node scripts/run-coverage-gate.cjs",
|
package/subagents/README.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Workflow Skills (Moved)
|
|
2
|
-
|
|
3
|
-
The workflow skills (`work-planner`, `work-doer`, `work-merger`) have moved to the shared skills repository:
|
|
4
|
-
|
|
5
|
-
**https://github.com/ouroborosbot/ouroboros-skills**
|
|
6
|
-
|
|
7
|
-
To install or update these skills, use the **skill-management** skill from that repo. It covers browsing available skills, installing them into your agent's local skills directory, and keeping them up to date.
|