@ouro.bot/cli 0.1.0-alpha.7 → 0.1.0-alpha.70
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 +387 -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 +68 -23
- package/dist/heart/core.js +282 -92
- 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 +409 -0
- package/dist/heart/daemon/daemon-cli.js +1395 -248
- 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 +216 -10
- package/dist/heart/daemon/hatch-animation.js +10 -3
- package/dist/heart/daemon/hatch-flow.js +7 -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/skill-management-installer.js +94 -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/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 +126 -21
- package/dist/heart/kicks.js +1 -19
- package/dist/heart/model-capabilities.js +48 -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/github-copilot.js +149 -0
- 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 +358 -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/guardrails.js +279 -0
- package/dist/repertoire/mcp-client.js +254 -0
- package/dist/repertoire/mcp-manager.js +195 -0
- package/dist/repertoire/skills.js +3 -26
- 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 +642 -251
- package/dist/repertoire/tools-bluebubbles.js +93 -0
- package/dist/repertoire/tools-teams.js +58 -25
- package/dist/repertoire/tools.js +93 -52
- 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 +893 -45
- package/dist/senses/cli-layout.js +87 -0
- package/dist/senses/cli.js +348 -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 +333 -84
- package/dist/senses/pipeline.js +278 -0
- package/dist/senses/teams.js +573 -129
- package/dist/senses/trust-gate.js +112 -2
- package/package.json +14 -3
- package/subagents/README.md +4 -70
- package/dist/heart/daemon/specialist-session.js +0 -142
- package/dist/heart/daemon/subagent-installer.js +0 -125
- package/dist/inner-worker-entry.js +0 -4
- package/subagents/work-doer.md +0 -233
- package/subagents/work-merger.md +0 -624
- package/subagents/work-planner.md +0 -373
package/dist/heart/config.js
CHANGED
|
@@ -35,25 +35,30 @@ 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
|
+
exports.getGithubCopilotConfig = getGithubCopilotConfig;
|
|
43
44
|
exports.getTeamsConfig = getTeamsConfig;
|
|
45
|
+
exports.getTeamsSecondaryConfig = getTeamsSecondaryConfig;
|
|
44
46
|
exports.getContextConfig = getContextConfig;
|
|
45
47
|
exports.getOAuthConfig = getOAuthConfig;
|
|
48
|
+
exports.resolveOAuthForTenant = resolveOAuthForTenant;
|
|
46
49
|
exports.getTeamsChannelConfig = getTeamsChannelConfig;
|
|
47
50
|
exports.getBlueBubblesConfig = getBlueBubblesConfig;
|
|
48
51
|
exports.getBlueBubblesChannelConfig = getBlueBubblesChannelConfig;
|
|
49
52
|
exports.getIntegrationsConfig = getIntegrationsConfig;
|
|
50
53
|
exports.getOpenAIEmbeddingsApiKey = getOpenAIEmbeddingsApiKey;
|
|
51
54
|
exports.getLogsDir = getLogsDir;
|
|
55
|
+
exports.sanitizeKey = sanitizeKey;
|
|
56
|
+
exports.slugify = slugify;
|
|
57
|
+
exports.resolveSessionPath = resolveSessionPath;
|
|
52
58
|
exports.sessionPath = sessionPath;
|
|
53
59
|
exports.logPath = logPath;
|
|
54
60
|
const fs = __importStar(require("fs"));
|
|
55
61
|
const path = __importStar(require("path"));
|
|
56
|
-
const os = __importStar(require("os"));
|
|
57
62
|
const identity_1 = require("./identity");
|
|
58
63
|
const runtime_1 = require("../nerves/runtime");
|
|
59
64
|
const DEFAULT_SECRETS_TEMPLATE = {
|
|
@@ -66,6 +71,7 @@ const DEFAULT_SECRETS_TEMPLATE = {
|
|
|
66
71
|
endpoint: "",
|
|
67
72
|
deployment: "",
|
|
68
73
|
apiVersion: "2025-04-01-preview",
|
|
74
|
+
managedIdentityClientId: "",
|
|
69
75
|
},
|
|
70
76
|
minimax: {
|
|
71
77
|
model: "",
|
|
@@ -76,20 +82,32 @@ const DEFAULT_SECRETS_TEMPLATE = {
|
|
|
76
82
|
setupToken: "",
|
|
77
83
|
},
|
|
78
84
|
"openai-codex": {
|
|
79
|
-
model: "gpt-5.
|
|
85
|
+
model: "gpt-5.4",
|
|
80
86
|
oauthAccessToken: "",
|
|
81
87
|
},
|
|
88
|
+
"github-copilot": {
|
|
89
|
+
model: "claude-sonnet-4.6",
|
|
90
|
+
githubToken: "",
|
|
91
|
+
baseUrl: "",
|
|
92
|
+
},
|
|
82
93
|
},
|
|
83
94
|
teams: {
|
|
84
95
|
clientId: "",
|
|
85
96
|
clientSecret: "",
|
|
86
97
|
tenantId: "",
|
|
98
|
+
managedIdentityClientId: "",
|
|
87
99
|
},
|
|
88
100
|
oauth: {
|
|
89
101
|
graphConnectionName: "graph",
|
|
90
102
|
adoConnectionName: "ado",
|
|
91
103
|
githubConnectionName: "",
|
|
92
104
|
},
|
|
105
|
+
teamsSecondary: {
|
|
106
|
+
clientId: "",
|
|
107
|
+
clientSecret: "",
|
|
108
|
+
tenantId: "",
|
|
109
|
+
managedIdentityClientId: "",
|
|
110
|
+
},
|
|
93
111
|
teamsChannel: {
|
|
94
112
|
skipConfirmation: true,
|
|
95
113
|
port: 3978,
|
|
@@ -116,8 +134,10 @@ function defaultRuntimeConfig() {
|
|
|
116
134
|
minimax: { ...DEFAULT_SECRETS_TEMPLATE.providers.minimax },
|
|
117
135
|
anthropic: { ...DEFAULT_SECRETS_TEMPLATE.providers.anthropic },
|
|
118
136
|
"openai-codex": { ...DEFAULT_SECRETS_TEMPLATE.providers["openai-codex"] },
|
|
137
|
+
"github-copilot": { ...DEFAULT_SECRETS_TEMPLATE.providers["github-copilot"] },
|
|
119
138
|
},
|
|
120
139
|
teams: { ...DEFAULT_SECRETS_TEMPLATE.teams },
|
|
140
|
+
teamsSecondary: { ...DEFAULT_SECRETS_TEMPLATE.teamsSecondary },
|
|
121
141
|
oauth: { ...DEFAULT_SECRETS_TEMPLATE.oauth },
|
|
122
142
|
context: { ...identity_1.DEFAULT_AGENT_CONTEXT },
|
|
123
143
|
teamsChannel: { ...DEFAULT_SECRETS_TEMPLATE.teamsChannel },
|
|
@@ -126,7 +146,7 @@ function defaultRuntimeConfig() {
|
|
|
126
146
|
integrations: { ...DEFAULT_SECRETS_TEMPLATE.integrations },
|
|
127
147
|
};
|
|
128
148
|
}
|
|
129
|
-
let
|
|
149
|
+
let _runtimeConfigOverride = null;
|
|
130
150
|
let _testContextOverride = null;
|
|
131
151
|
function resolveConfigPath() {
|
|
132
152
|
return (0, identity_1.getAgentSecretsPath)();
|
|
@@ -148,15 +168,6 @@ function deepMerge(defaults, partial) {
|
|
|
148
168
|
return result;
|
|
149
169
|
}
|
|
150
170
|
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
171
|
const configPath = resolveConfigPath();
|
|
161
172
|
// Auto-create config directory if it doesn't exist
|
|
162
173
|
const configDir = path.dirname(configPath);
|
|
@@ -217,7 +228,10 @@ function loadConfig() {
|
|
|
217
228
|
},
|
|
218
229
|
});
|
|
219
230
|
}
|
|
220
|
-
|
|
231
|
+
const mergedConfig = deepMerge(defaultRuntimeConfig(), sanitizedFileData);
|
|
232
|
+
const config = _runtimeConfigOverride
|
|
233
|
+
? deepMerge(mergedConfig, _runtimeConfigOverride)
|
|
234
|
+
: mergedConfig;
|
|
221
235
|
(0, runtime_1.emitNervesEvent)({
|
|
222
236
|
event: "config.load",
|
|
223
237
|
component: "config/identity",
|
|
@@ -225,22 +239,22 @@ function loadConfig() {
|
|
|
225
239
|
meta: {
|
|
226
240
|
source: "disk",
|
|
227
241
|
used_defaults_only: Object.keys(fileData).length === 0,
|
|
242
|
+
override_applied: _runtimeConfigOverride !== null,
|
|
228
243
|
},
|
|
229
244
|
});
|
|
230
|
-
return
|
|
245
|
+
return config;
|
|
231
246
|
}
|
|
232
247
|
function resetConfigCache() {
|
|
233
|
-
|
|
248
|
+
_runtimeConfigOverride = null;
|
|
234
249
|
_testContextOverride = null;
|
|
235
250
|
}
|
|
236
|
-
function
|
|
237
|
-
loadConfig(); // ensure _cachedConfig exists
|
|
251
|
+
function patchRuntimeConfig(partial) {
|
|
238
252
|
const contextPatch = partial.context;
|
|
239
253
|
if (contextPatch) {
|
|
240
254
|
const base = _testContextOverride ?? identity_1.DEFAULT_AGENT_CONTEXT;
|
|
241
255
|
_testContextOverride = deepMerge(base, contextPatch);
|
|
242
256
|
}
|
|
243
|
-
|
|
257
|
+
_runtimeConfigOverride = deepMerge((_runtimeConfigOverride ?? {}), partial);
|
|
244
258
|
}
|
|
245
259
|
function getAzureConfig() {
|
|
246
260
|
const config = loadConfig();
|
|
@@ -258,10 +272,18 @@ function getOpenAICodexConfig() {
|
|
|
258
272
|
const config = loadConfig();
|
|
259
273
|
return { ...config.providers["openai-codex"] };
|
|
260
274
|
}
|
|
275
|
+
function getGithubCopilotConfig() {
|
|
276
|
+
const config = loadConfig();
|
|
277
|
+
return { ...config.providers["github-copilot"] };
|
|
278
|
+
}
|
|
261
279
|
function getTeamsConfig() {
|
|
262
280
|
const config = loadConfig();
|
|
263
281
|
return { ...config.teams };
|
|
264
282
|
}
|
|
283
|
+
function getTeamsSecondaryConfig() {
|
|
284
|
+
const config = loadConfig();
|
|
285
|
+
return { ...config.teamsSecondary };
|
|
286
|
+
}
|
|
265
287
|
function getContextConfig() {
|
|
266
288
|
if (_testContextOverride) {
|
|
267
289
|
return { ..._testContextOverride };
|
|
@@ -282,6 +304,16 @@ function getOAuthConfig() {
|
|
|
282
304
|
const config = loadConfig();
|
|
283
305
|
return { ...config.oauth };
|
|
284
306
|
}
|
|
307
|
+
/** Resolve OAuth connection names for a specific tenant, falling back to defaults. */
|
|
308
|
+
function resolveOAuthForTenant(tenantId) {
|
|
309
|
+
const base = getOAuthConfig();
|
|
310
|
+
const overrides = tenantId ? base.tenantOverrides?.[tenantId] : undefined;
|
|
311
|
+
return {
|
|
312
|
+
graphConnectionName: overrides?.graphConnectionName ?? base.graphConnectionName,
|
|
313
|
+
adoConnectionName: overrides?.adoConnectionName ?? base.adoConnectionName,
|
|
314
|
+
githubConnectionName: overrides?.githubConnectionName ?? base.githubConnectionName,
|
|
315
|
+
};
|
|
316
|
+
}
|
|
285
317
|
function getTeamsChannelConfig() {
|
|
286
318
|
const config = loadConfig();
|
|
287
319
|
const { skipConfirmation, flushIntervalMs, port } = config.teamsChannel;
|
|
@@ -315,16 +347,29 @@ function getOpenAIEmbeddingsApiKey() {
|
|
|
315
347
|
return getIntegrationsConfig().openaiEmbeddingsApiKey;
|
|
316
348
|
}
|
|
317
349
|
function getLogsDir() {
|
|
318
|
-
return path.join(
|
|
350
|
+
return path.join((0, identity_1.getAgentRoot)(), "state", "logs");
|
|
319
351
|
}
|
|
320
352
|
function sanitizeKey(key) {
|
|
321
353
|
return key.replace(/[/:]/g, "_");
|
|
322
354
|
}
|
|
323
|
-
function
|
|
324
|
-
|
|
325
|
-
|
|
355
|
+
function slugify(value) {
|
|
356
|
+
return value
|
|
357
|
+
.trim()
|
|
358
|
+
.toLowerCase()
|
|
359
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
360
|
+
.replace(/^-+/, "")
|
|
361
|
+
.replace(/-+$/, "");
|
|
362
|
+
}
|
|
363
|
+
function resolveSessionPath(friendId, channel, key, options) {
|
|
364
|
+
const dir = path.join((0, identity_1.getAgentRoot)(), "state", "sessions", friendId, channel);
|
|
365
|
+
if (options?.ensureDir) {
|
|
366
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
367
|
+
}
|
|
326
368
|
return path.join(dir, sanitizeKey(key) + ".json");
|
|
327
369
|
}
|
|
370
|
+
function sessionPath(friendId, channel, key) {
|
|
371
|
+
return resolveSessionPath(friendId, channel, key, { ensureDir: true });
|
|
372
|
+
}
|
|
328
373
|
function logPath(channel, key) {
|
|
329
374
|
return path.join(getLogsDir(), channel, sanitizeKey(key) + ".ndjson");
|
|
330
375
|
}
|