@ouro.bot/cli 0.1.0-alpha.6 → 0.1.0-alpha.60
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/AdoptionSpecialist.ouro/agent.json +70 -9
- package/AdoptionSpecialist.ouro/psyche/SOUL.md +5 -2
- package/AdoptionSpecialist.ouro/psyche/identities/monty.md +2 -2
- package/README.md +147 -205
- package/assets/ouroboros.png +0 -0
- package/changelog.json +325 -0
- package/dist/heart/active-work.js +178 -0
- package/dist/heart/bridges/manager.js +358 -0
- package/dist/heart/bridges/state-machine.js +135 -0
- package/dist/heart/bridges/store.js +123 -0
- package/dist/heart/config.js +57 -23
- package/dist/heart/core.js +236 -90
- package/dist/heart/cross-chat-delivery.js +146 -0
- package/dist/heart/daemon/agent-discovery.js +81 -0
- package/dist/heart/daemon/auth-flow.js +351 -0
- package/dist/heart/daemon/daemon-cli.js +1173 -227
- package/dist/heart/daemon/daemon-entry.js +55 -6
- package/dist/heart/daemon/daemon-runtime-sync.js +212 -0
- package/dist/heart/daemon/daemon.js +189 -10
- package/dist/heart/daemon/hatch-animation.js +10 -3
- package/dist/heart/daemon/hatch-flow.js +4 -82
- package/dist/heart/daemon/hooks/bundle-meta.js +92 -0
- package/dist/heart/daemon/launchd.js +159 -0
- package/dist/heart/daemon/log-tailer.js +4 -3
- package/dist/heart/daemon/message-router.js +17 -8
- package/dist/heart/daemon/ouro-bot-entry.js +0 -0
- package/dist/heart/daemon/ouro-bot-global-installer.js +128 -0
- package/dist/heart/daemon/ouro-entry.js +0 -0
- package/dist/heart/daemon/ouro-path-installer.js +178 -0
- package/dist/heart/daemon/ouro-uti.js +11 -2
- package/dist/heart/daemon/process-manager.js +14 -1
- package/dist/heart/daemon/run-hooks.js +37 -0
- package/dist/heart/daemon/runtime-logging.js +58 -15
- package/dist/heart/daemon/runtime-metadata.js +219 -0
- package/dist/heart/daemon/runtime-mode.js +67 -0
- package/dist/heart/daemon/sense-manager.js +307 -0
- package/dist/heart/daemon/socket-client.js +202 -0
- package/dist/heart/daemon/specialist-orchestrator.js +53 -84
- package/dist/heart/daemon/specialist-prompt.js +64 -5
- package/dist/heart/daemon/specialist-tools.js +213 -58
- package/dist/heart/daemon/staged-restart.js +114 -0
- package/dist/heart/daemon/subagent-installer.js +48 -7
- package/dist/heart/daemon/thoughts.js +379 -0
- package/dist/heart/daemon/update-checker.js +111 -0
- package/dist/heart/daemon/update-hooks.js +138 -0
- package/dist/heart/daemon/wrapper-publish-guard.js +86 -0
- package/dist/heart/delegation.js +62 -0
- package/dist/heart/identity.js +122 -19
- package/dist/heart/kicks.js +1 -19
- package/dist/heart/model-capabilities.js +40 -0
- package/dist/heart/progress-story.js +42 -0
- package/dist/heart/providers/anthropic.js +74 -9
- package/dist/heart/providers/azure.js +86 -7
- package/dist/heart/providers/minimax.js +4 -0
- package/dist/heart/providers/openai-codex.js +12 -3
- package/dist/heart/safe-workspace.js +228 -0
- package/dist/heart/sense-truth.js +61 -0
- package/dist/heart/session-activity.js +169 -0
- package/dist/heart/session-recall.js +116 -0
- package/dist/heart/streaming.js +100 -22
- package/dist/heart/target-resolution.js +123 -0
- package/dist/heart/turn-coordinator.js +28 -0
- package/dist/mind/associative-recall.js +14 -2
- package/dist/mind/bundle-manifest.js +70 -0
- package/dist/mind/context.js +27 -11
- package/dist/mind/first-impressions.js +16 -2
- package/dist/mind/friends/channel.js +35 -0
- package/dist/mind/friends/group-context.js +144 -0
- package/dist/mind/friends/store-file.js +19 -0
- package/dist/mind/friends/trust-explanation.js +74 -0
- package/dist/mind/friends/types.js +8 -0
- package/dist/mind/memory.js +27 -26
- package/dist/mind/pending.js +72 -9
- package/dist/mind/phrases.js +1 -0
- package/dist/mind/prompt.js +299 -77
- package/dist/mind/token-estimate.js +8 -12
- package/dist/nerves/cli-logging.js +15 -2
- package/dist/nerves/coverage/run-artifacts.js +1 -1
- package/dist/repertoire/ado-client.js +4 -2
- package/dist/repertoire/coding/feedback.js +134 -0
- package/dist/repertoire/coding/index.js +4 -1
- package/dist/repertoire/coding/manager.js +62 -4
- package/dist/repertoire/coding/spawner.js +3 -3
- package/dist/repertoire/coding/tools.js +41 -2
- package/dist/repertoire/data/ado-endpoints.json +188 -0
- package/dist/repertoire/tasks/board.js +12 -0
- package/dist/repertoire/tasks/index.js +23 -9
- package/dist/repertoire/tasks/transitions.js +1 -2
- package/dist/repertoire/tools-base.js +629 -251
- package/dist/repertoire/tools-bluebubbles.js +93 -0
- package/dist/repertoire/tools-teams.js +58 -25
- package/dist/repertoire/tools.js +92 -48
- package/dist/senses/bluebubbles-client.js +210 -5
- package/dist/senses/bluebubbles-entry.js +2 -0
- package/dist/senses/bluebubbles-inbound-log.js +109 -0
- package/dist/senses/bluebubbles-media.js +339 -0
- package/dist/senses/bluebubbles-model.js +12 -4
- package/dist/senses/bluebubbles-mutation-log.js +45 -5
- package/dist/senses/bluebubbles-runtime-state.js +109 -0
- package/dist/senses/bluebubbles-session-cleanup.js +72 -0
- package/dist/senses/bluebubbles.js +890 -45
- package/dist/senses/cli-layout.js +87 -0
- package/dist/senses/cli.js +345 -144
- package/dist/senses/continuity.js +94 -0
- package/dist/senses/debug-activity.js +148 -0
- package/dist/senses/inner-dialog-worker.js +47 -18
- package/dist/senses/inner-dialog.js +330 -84
- package/dist/senses/pipeline.js +278 -0
- package/dist/senses/teams.js +570 -129
- package/dist/senses/trust-gate.js +112 -2
- package/package.json +14 -3
- package/subagents/README.md +46 -33
- package/subagents/work-doer.md +28 -24
- package/subagents/work-merger.md +24 -30
- package/subagents/work-planner.md +44 -27
- package/dist/heart/daemon/specialist-session.js +0 -142
- package/dist/inner-worker-entry.js +0 -4
package/dist/heart/config.js
CHANGED
|
@@ -35,25 +35,29 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.loadConfig = loadConfig;
|
|
37
37
|
exports.resetConfigCache = resetConfigCache;
|
|
38
|
-
exports.
|
|
38
|
+
exports.patchRuntimeConfig = patchRuntimeConfig;
|
|
39
39
|
exports.getAzureConfig = getAzureConfig;
|
|
40
40
|
exports.getMinimaxConfig = getMinimaxConfig;
|
|
41
41
|
exports.getAnthropicConfig = getAnthropicConfig;
|
|
42
42
|
exports.getOpenAICodexConfig = getOpenAICodexConfig;
|
|
43
43
|
exports.getTeamsConfig = getTeamsConfig;
|
|
44
|
+
exports.getTeamsSecondaryConfig = getTeamsSecondaryConfig;
|
|
44
45
|
exports.getContextConfig = getContextConfig;
|
|
45
46
|
exports.getOAuthConfig = getOAuthConfig;
|
|
47
|
+
exports.resolveOAuthForTenant = resolveOAuthForTenant;
|
|
46
48
|
exports.getTeamsChannelConfig = getTeamsChannelConfig;
|
|
47
49
|
exports.getBlueBubblesConfig = getBlueBubblesConfig;
|
|
48
50
|
exports.getBlueBubblesChannelConfig = getBlueBubblesChannelConfig;
|
|
49
51
|
exports.getIntegrationsConfig = getIntegrationsConfig;
|
|
50
52
|
exports.getOpenAIEmbeddingsApiKey = getOpenAIEmbeddingsApiKey;
|
|
51
53
|
exports.getLogsDir = getLogsDir;
|
|
54
|
+
exports.sanitizeKey = sanitizeKey;
|
|
55
|
+
exports.slugify = slugify;
|
|
56
|
+
exports.resolveSessionPath = resolveSessionPath;
|
|
52
57
|
exports.sessionPath = sessionPath;
|
|
53
58
|
exports.logPath = logPath;
|
|
54
59
|
const fs = __importStar(require("fs"));
|
|
55
60
|
const path = __importStar(require("path"));
|
|
56
|
-
const os = __importStar(require("os"));
|
|
57
61
|
const identity_1 = require("./identity");
|
|
58
62
|
const runtime_1 = require("../nerves/runtime");
|
|
59
63
|
const DEFAULT_SECRETS_TEMPLATE = {
|
|
@@ -66,6 +70,7 @@ const DEFAULT_SECRETS_TEMPLATE = {
|
|
|
66
70
|
endpoint: "",
|
|
67
71
|
deployment: "",
|
|
68
72
|
apiVersion: "2025-04-01-preview",
|
|
73
|
+
managedIdentityClientId: "",
|
|
69
74
|
},
|
|
70
75
|
minimax: {
|
|
71
76
|
model: "",
|
|
@@ -76,7 +81,7 @@ const DEFAULT_SECRETS_TEMPLATE = {
|
|
|
76
81
|
setupToken: "",
|
|
77
82
|
},
|
|
78
83
|
"openai-codex": {
|
|
79
|
-
model: "gpt-5.
|
|
84
|
+
model: "gpt-5.4",
|
|
80
85
|
oauthAccessToken: "",
|
|
81
86
|
},
|
|
82
87
|
},
|
|
@@ -84,12 +89,19 @@ const DEFAULT_SECRETS_TEMPLATE = {
|
|
|
84
89
|
clientId: "",
|
|
85
90
|
clientSecret: "",
|
|
86
91
|
tenantId: "",
|
|
92
|
+
managedIdentityClientId: "",
|
|
87
93
|
},
|
|
88
94
|
oauth: {
|
|
89
95
|
graphConnectionName: "graph",
|
|
90
96
|
adoConnectionName: "ado",
|
|
91
97
|
githubConnectionName: "",
|
|
92
98
|
},
|
|
99
|
+
teamsSecondary: {
|
|
100
|
+
clientId: "",
|
|
101
|
+
clientSecret: "",
|
|
102
|
+
tenantId: "",
|
|
103
|
+
managedIdentityClientId: "",
|
|
104
|
+
},
|
|
93
105
|
teamsChannel: {
|
|
94
106
|
skipConfirmation: true,
|
|
95
107
|
port: 3978,
|
|
@@ -118,6 +130,7 @@ function defaultRuntimeConfig() {
|
|
|
118
130
|
"openai-codex": { ...DEFAULT_SECRETS_TEMPLATE.providers["openai-codex"] },
|
|
119
131
|
},
|
|
120
132
|
teams: { ...DEFAULT_SECRETS_TEMPLATE.teams },
|
|
133
|
+
teamsSecondary: { ...DEFAULT_SECRETS_TEMPLATE.teamsSecondary },
|
|
121
134
|
oauth: { ...DEFAULT_SECRETS_TEMPLATE.oauth },
|
|
122
135
|
context: { ...identity_1.DEFAULT_AGENT_CONTEXT },
|
|
123
136
|
teamsChannel: { ...DEFAULT_SECRETS_TEMPLATE.teamsChannel },
|
|
@@ -126,7 +139,7 @@ function defaultRuntimeConfig() {
|
|
|
126
139
|
integrations: { ...DEFAULT_SECRETS_TEMPLATE.integrations },
|
|
127
140
|
};
|
|
128
141
|
}
|
|
129
|
-
let
|
|
142
|
+
let _runtimeConfigOverride = null;
|
|
130
143
|
let _testContextOverride = null;
|
|
131
144
|
function resolveConfigPath() {
|
|
132
145
|
return (0, identity_1.getAgentSecretsPath)();
|
|
@@ -148,15 +161,6 @@ function deepMerge(defaults, partial) {
|
|
|
148
161
|
return result;
|
|
149
162
|
}
|
|
150
163
|
function loadConfig() {
|
|
151
|
-
if (_cachedConfig) {
|
|
152
|
-
(0, runtime_1.emitNervesEvent)({
|
|
153
|
-
event: "config.load",
|
|
154
|
-
component: "config/identity",
|
|
155
|
-
message: "config loaded from cache",
|
|
156
|
-
meta: { source: "cache" },
|
|
157
|
-
});
|
|
158
|
-
return _cachedConfig;
|
|
159
|
-
}
|
|
160
164
|
const configPath = resolveConfigPath();
|
|
161
165
|
// Auto-create config directory if it doesn't exist
|
|
162
166
|
const configDir = path.dirname(configPath);
|
|
@@ -217,7 +221,10 @@ function loadConfig() {
|
|
|
217
221
|
},
|
|
218
222
|
});
|
|
219
223
|
}
|
|
220
|
-
|
|
224
|
+
const mergedConfig = deepMerge(defaultRuntimeConfig(), sanitizedFileData);
|
|
225
|
+
const config = _runtimeConfigOverride
|
|
226
|
+
? deepMerge(mergedConfig, _runtimeConfigOverride)
|
|
227
|
+
: mergedConfig;
|
|
221
228
|
(0, runtime_1.emitNervesEvent)({
|
|
222
229
|
event: "config.load",
|
|
223
230
|
component: "config/identity",
|
|
@@ -225,22 +232,22 @@ function loadConfig() {
|
|
|
225
232
|
meta: {
|
|
226
233
|
source: "disk",
|
|
227
234
|
used_defaults_only: Object.keys(fileData).length === 0,
|
|
235
|
+
override_applied: _runtimeConfigOverride !== null,
|
|
228
236
|
},
|
|
229
237
|
});
|
|
230
|
-
return
|
|
238
|
+
return config;
|
|
231
239
|
}
|
|
232
240
|
function resetConfigCache() {
|
|
233
|
-
|
|
241
|
+
_runtimeConfigOverride = null;
|
|
234
242
|
_testContextOverride = null;
|
|
235
243
|
}
|
|
236
|
-
function
|
|
237
|
-
loadConfig(); // ensure _cachedConfig exists
|
|
244
|
+
function patchRuntimeConfig(partial) {
|
|
238
245
|
const contextPatch = partial.context;
|
|
239
246
|
if (contextPatch) {
|
|
240
247
|
const base = _testContextOverride ?? identity_1.DEFAULT_AGENT_CONTEXT;
|
|
241
248
|
_testContextOverride = deepMerge(base, contextPatch);
|
|
242
249
|
}
|
|
243
|
-
|
|
250
|
+
_runtimeConfigOverride = deepMerge((_runtimeConfigOverride ?? {}), partial);
|
|
244
251
|
}
|
|
245
252
|
function getAzureConfig() {
|
|
246
253
|
const config = loadConfig();
|
|
@@ -262,6 +269,10 @@ function getTeamsConfig() {
|
|
|
262
269
|
const config = loadConfig();
|
|
263
270
|
return { ...config.teams };
|
|
264
271
|
}
|
|
272
|
+
function getTeamsSecondaryConfig() {
|
|
273
|
+
const config = loadConfig();
|
|
274
|
+
return { ...config.teamsSecondary };
|
|
275
|
+
}
|
|
265
276
|
function getContextConfig() {
|
|
266
277
|
if (_testContextOverride) {
|
|
267
278
|
return { ..._testContextOverride };
|
|
@@ -282,6 +293,16 @@ function getOAuthConfig() {
|
|
|
282
293
|
const config = loadConfig();
|
|
283
294
|
return { ...config.oauth };
|
|
284
295
|
}
|
|
296
|
+
/** Resolve OAuth connection names for a specific tenant, falling back to defaults. */
|
|
297
|
+
function resolveOAuthForTenant(tenantId) {
|
|
298
|
+
const base = getOAuthConfig();
|
|
299
|
+
const overrides = tenantId ? base.tenantOverrides?.[tenantId] : undefined;
|
|
300
|
+
return {
|
|
301
|
+
graphConnectionName: overrides?.graphConnectionName ?? base.graphConnectionName,
|
|
302
|
+
adoConnectionName: overrides?.adoConnectionName ?? base.adoConnectionName,
|
|
303
|
+
githubConnectionName: overrides?.githubConnectionName ?? base.githubConnectionName,
|
|
304
|
+
};
|
|
305
|
+
}
|
|
285
306
|
function getTeamsChannelConfig() {
|
|
286
307
|
const config = loadConfig();
|
|
287
308
|
const { skipConfirmation, flushIntervalMs, port } = config.teamsChannel;
|
|
@@ -315,16 +336,29 @@ function getOpenAIEmbeddingsApiKey() {
|
|
|
315
336
|
return getIntegrationsConfig().openaiEmbeddingsApiKey;
|
|
316
337
|
}
|
|
317
338
|
function getLogsDir() {
|
|
318
|
-
return path.join(
|
|
339
|
+
return path.join((0, identity_1.getAgentRoot)(), "state", "logs");
|
|
319
340
|
}
|
|
320
341
|
function sanitizeKey(key) {
|
|
321
342
|
return key.replace(/[/:]/g, "_");
|
|
322
343
|
}
|
|
323
|
-
function
|
|
324
|
-
|
|
325
|
-
|
|
344
|
+
function slugify(value) {
|
|
345
|
+
return value
|
|
346
|
+
.trim()
|
|
347
|
+
.toLowerCase()
|
|
348
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
349
|
+
.replace(/^-+/, "")
|
|
350
|
+
.replace(/-+$/, "");
|
|
351
|
+
}
|
|
352
|
+
function resolveSessionPath(friendId, channel, key, options) {
|
|
353
|
+
const dir = path.join((0, identity_1.getAgentRoot)(), "state", "sessions", friendId, channel);
|
|
354
|
+
if (options?.ensureDir) {
|
|
355
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
356
|
+
}
|
|
326
357
|
return path.join(dir, sanitizeKey(key) + ".json");
|
|
327
358
|
}
|
|
359
|
+
function sessionPath(friendId, channel, key) {
|
|
360
|
+
return resolveSessionPath(friendId, channel, key, { ensureDir: true });
|
|
361
|
+
}
|
|
328
362
|
function logPath(channel, key) {
|
|
329
363
|
return path.join(getLogsDir(), channel, sanitizeKey(key) + ".ndjson");
|
|
330
364
|
}
|