@ouro.bot/cli 0.1.0-alpha.208 → 0.1.0-alpha.209

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.
Files changed (38) hide show
  1. package/changelog.json +6 -0
  2. package/dist/heart/daemon/cli-defaults.js +11 -11
  3. package/dist/heart/daemon/cli-exec.js +6 -6
  4. package/dist/heart/daemon/daemon-entry.js +2 -2
  5. package/dist/heart/daemon/daemon.js +7 -7
  6. package/dist/heart/daemon/ouro-bot-entry.js +1 -1
  7. package/dist/heart/{daemon → habits}/habit-scheduler.js +1 -1
  8. package/dist/heart/{daemon → hatch}/hatch-flow.js +2 -2
  9. package/dist/heart/{daemon → mcp}/mcp-server.js +3 -3
  10. package/dist/heart/{daemon → outlook}/outlook-read.js +3 -3
  11. package/dist/heart/provider-ping.js +1 -1
  12. package/dist/heart/{daemon → versioning}/ouro-bot-global-installer.js +1 -1
  13. package/dist/heart/{daemon → versioning}/ouro-bot-wrapper.js +1 -1
  14. package/dist/mind/prompt.js +1 -1
  15. package/dist/senses/cli.js +1 -1
  16. package/dist/senses/inner-dialog-worker.js +1 -1
  17. package/dist/senses/inner-dialog.js +1 -1
  18. package/dist/senses/pipeline.js +1 -1
  19. package/package.json +1 -1
  20. /package/dist/heart/{daemon → auth}/auth-flow.js +0 -0
  21. /package/dist/heart/{daemon → habits}/habit-migration.js +0 -0
  22. /package/dist/heart/{daemon → habits}/habit-parser.js +0 -0
  23. /package/dist/heart/{daemon → hatch}/hatch-animation.js +0 -0
  24. /package/dist/heart/{daemon → hatch}/hatch-specialist.js +0 -0
  25. /package/dist/heart/{daemon → hatch}/specialist-orchestrator.js +0 -0
  26. /package/dist/heart/{daemon → hatch}/specialist-prompt.js +0 -0
  27. /package/dist/heart/{daemon → hatch}/specialist-tools.js +0 -0
  28. /package/dist/heart/{daemon → outlook}/outlook-http.js +0 -0
  29. /package/dist/heart/{daemon → outlook}/outlook-render.js +0 -0
  30. /package/dist/heart/{daemon → outlook}/outlook-types.js +0 -0
  31. /package/dist/heart/{daemon → outlook}/outlook-view.js +0 -0
  32. /package/dist/heart/{daemon → versioning}/ouro-path-installer.js +0 -0
  33. /package/dist/heart/{daemon → versioning}/ouro-uti.js +0 -0
  34. /package/dist/heart/{daemon → versioning}/ouro-version-manager.js +0 -0
  35. /package/dist/heart/{daemon → versioning}/staged-restart.js +0 -0
  36. /package/dist/heart/{daemon → versioning}/update-checker.js +0 -0
  37. /package/dist/heart/{daemon → versioning}/update-hooks.js +0 -0
  38. /package/dist/heart/{daemon → versioning}/wrapper-publish-guard.js +0 -0
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.209",
6
+ "changes": [
7
+ "refactor: restructure daemon/ directory — move outlook files to heart/outlook/, habit files to heart/habits/, hatch/specialist files to heart/hatch/, versioning/update files to heart/versioning/, auth-flow to heart/auth/, mcp-server to heart/mcp/. daemon/ reduced from 60 to 36 core daemon-lifecycle files."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.208",
6
12
  "changes": [
@@ -51,22 +51,22 @@ const os = __importStar(require("os"));
51
51
  const path = __importStar(require("path"));
52
52
  const identity_1 = require("../identity");
53
53
  const runtime_1 = require("../../nerves/runtime");
54
- const ouro_path_installer_1 = require("./ouro-path-installer");
55
- const ouro_uti_1 = require("./ouro-uti");
56
- const ouro_version_manager_1 = require("./ouro-version-manager");
54
+ const ouro_path_installer_1 = require("../versioning/ouro-path-installer");
55
+ const ouro_uti_1 = require("../versioning/ouro-uti");
56
+ const ouro_version_manager_1 = require("../versioning/ouro-version-manager");
57
57
  const skill_management_installer_1 = require("./skill-management-installer");
58
- const hatch_flow_1 = require("./hatch-flow");
59
- const specialist_orchestrator_1 = require("./specialist-orchestrator");
60
- const specialist_prompt_1 = require("./specialist-prompt");
61
- const specialist_tools_1 = require("./specialist-tools");
58
+ const hatch_flow_1 = require("../hatch/hatch-flow");
59
+ const specialist_orchestrator_1 = require("../hatch/specialist-orchestrator");
60
+ const specialist_prompt_1 = require("../hatch/specialist-prompt");
61
+ const specialist_tools_1 = require("../hatch/specialist-tools");
62
62
  const runtime_mode_1 = require("./runtime-mode");
63
63
  const agent_discovery_1 = require("./agent-discovery");
64
64
  const bundle_manifest_1 = require("../../mind/bundle-manifest");
65
- const ouro_bot_global_installer_1 = require("./ouro-bot-global-installer");
65
+ const ouro_bot_global_installer_1 = require("../versioning/ouro-bot-global-installer");
66
66
  const launchd_1 = require("./launchd");
67
67
  const socket_client_1 = require("./socket-client");
68
68
  const session_activity_1 = require("../session-activity");
69
- const auth_flow_1 = require("./auth-flow");
69
+ const auth_flow_1 = require("../auth/auth-flow");
70
70
  const cli_parse_1 = require("./cli-parse");
71
71
  // ── Default implementations ──
72
72
  function defaultStartDaemonProcess(socketPath) {
@@ -375,7 +375,7 @@ async function defaultRunSerpentGuide() {
375
375
  const identitiesDir = path.join(bundleSourceDir, "psyche", "identities");
376
376
  const identity = (0, specialist_orchestrator_1.pickRandomIdentity)(identitiesDir);
377
377
  // Load identity-specific spinner phrases (falls back to DEFAULT_AGENT_PHRASES)
378
- const { loadIdentityPhrases } = await Promise.resolve().then(() => __importStar(require("./specialist-orchestrator")));
378
+ const { loadIdentityPhrases } = await Promise.resolve().then(() => __importStar(require("../hatch/specialist-orchestrator")));
379
379
  const phrases = loadIdentityPhrases(bundleSourceDir, identity.fileName);
380
380
  const resolvedModel = providerConfig.model || providerConfig.deployment || "";
381
381
  setAgentConfigOverride({
@@ -498,7 +498,7 @@ function createDefaultOuroCliDeps(socketPath = socket_client_1.DEFAULT_DAEMON_SO
498
498
  /* v8 ignore stop */
499
499
  /* v8 ignore start -- CLI version management defaults: integration code @preserve */
500
500
  checkForCliUpdate: async () => {
501
- const { checkForUpdate } = await Promise.resolve().then(() => __importStar(require("./update-checker")));
501
+ const { checkForUpdate } = await Promise.resolve().then(() => __importStar(require("../versioning/update-checker")));
502
502
  return checkForUpdate((0, bundle_manifest_1.getPackageVersion)(), {
503
503
  fetchRegistryJson: async () => {
504
504
  const res = await fetch("https://registry.npmjs.org/@ouro.bot/cli");
@@ -55,15 +55,15 @@ const store_file_1 = require("../../mind/friends/store-file");
55
55
  const runtime_metadata_1 = require("./runtime-metadata");
56
56
  const runtime_mode_1 = require("./runtime-mode");
57
57
  const daemon_runtime_sync_1 = require("./daemon-runtime-sync");
58
- const update_hooks_1 = require("./update-hooks");
58
+ const update_hooks_1 = require("../versioning/update-hooks");
59
59
  const bundle_meta_1 = require("./hooks/bundle-meta");
60
60
  const agent_config_v2_1 = require("./hooks/agent-config-v2");
61
61
  const bundle_manifest_1 = require("../../mind/bundle-manifest");
62
62
  const tasks_1 = require("../../repertoire/tasks");
63
63
  const thoughts_1 = require("./thoughts");
64
64
  const launchd_1 = require("./launchd");
65
- const auth_flow_1 = require("./auth-flow");
66
- const ouro_version_manager_1 = require("./ouro-version-manager");
65
+ const auth_flow_1 = require("../auth/auth-flow");
66
+ const ouro_version_manager_1 = require("../versioning/ouro-version-manager");
67
67
  const cli_parse_1 = require("./cli-parse");
68
68
  const cli_parse_2 = require("./cli-parse");
69
69
  const cli_render_1 = require("./cli-render");
@@ -1202,7 +1202,7 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
1202
1202
  /* v8 ignore start — mcp-serve block binds to process.stdin/stdout; tested via mcp-server unit tests */
1203
1203
  // ── mcp-serve: start MCP server in-process on stdin/stdout ──
1204
1204
  if (command.kind === "mcp-serve") {
1205
- const { createMcpServer } = await Promise.resolve().then(() => __importStar(require("./mcp-server")));
1205
+ const { createMcpServer } = await Promise.resolve().then(() => __importStar(require("../mcp/mcp-server")));
1206
1206
  const friendId = command.friendId ?? `local-${os.userInfo().username}`;
1207
1207
  const mcpSocketPath = command.socketOverride ?? deps.socketPath;
1208
1208
  const server = createMcpServer({
@@ -1272,7 +1272,7 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
1272
1272
  }
1273
1273
  // ── habit subcommands (local, no daemon socket needed) ──
1274
1274
  if (command.kind === "habit.list" || command.kind === "habit.create") {
1275
- const { parseHabitFile, renderHabitFile } = await Promise.resolve().then(() => __importStar(require("./habit-parser")));
1275
+ const { parseHabitFile, renderHabitFile } = await Promise.resolve().then(() => __importStar(require("../habits/habit-parser")));
1276
1276
  /* v8 ignore start -- production default: uses real bundle root @preserve */
1277
1277
  const agentName = command.agent ?? (0, identity_1.getAgentName)();
1278
1278
  const bundleRoot = deps.agentBundleRoot ?? path.join((0, identity_1.getAgentBundlesRoot)(), `${agentName}.ouro`);
@@ -1347,7 +1347,7 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
1347
1347
  if (command.kind === "auth.run") {
1348
1348
  const provider = command.provider ?? (0, auth_flow_1.readAgentConfigForAgent)(command.agent).config.humanFacing.provider;
1349
1349
  /* v8 ignore next -- tests always inject runAuthFlow; default is for production @preserve */
1350
- const authRunner = deps.runAuthFlow ?? (await Promise.resolve().then(() => __importStar(require("./auth-flow")))).runRuntimeAuthFlow;
1350
+ const authRunner = deps.runAuthFlow ?? (await Promise.resolve().then(() => __importStar(require("../auth/auth-flow")))).runRuntimeAuthFlow;
1351
1351
  const result = await authRunner({
1352
1352
  agentName: command.agent,
1353
1353
  provider,
@@ -49,8 +49,8 @@ const sense_manager_1 = require("./sense-manager");
49
49
  const agent_discovery_1 = require("./agent-discovery");
50
50
  const identity_1 = require("../identity");
51
51
  const runtime_mode_1 = require("./runtime-mode");
52
- const habit_scheduler_1 = require("./habit-scheduler");
53
- const habit_migration_1 = require("./habit-migration");
52
+ const habit_scheduler_1 = require("../habits/habit-scheduler");
53
+ const habit_migration_1 = require("../habits/habit-migration");
54
54
  const os_cron_deps_1 = require("./os-cron-deps");
55
55
  const os_cron_1 = require("./os-cron");
56
56
  const daemon_tombstone_1 = require("./daemon-tombstone");
@@ -45,21 +45,21 @@ const identity_1 = require("../identity");
45
45
  const runtime_1 = require("../../nerves/runtime");
46
46
  const runtime_metadata_1 = require("./runtime-metadata");
47
47
  const runtime_mode_1 = require("./runtime-mode");
48
- const update_hooks_1 = require("./update-hooks");
48
+ const update_hooks_1 = require("../versioning/update-hooks");
49
49
  const bundle_meta_1 = require("./hooks/bundle-meta");
50
50
  const agent_config_v2_1 = require("./hooks/agent-config-v2");
51
51
  const bundle_manifest_1 = require("../../mind/bundle-manifest");
52
- const update_checker_1 = require("./update-checker");
53
- const staged_restart_1 = require("./staged-restart");
52
+ const update_checker_1 = require("../versioning/update-checker");
53
+ const staged_restart_1 = require("../versioning/staged-restart");
54
54
  const child_process_1 = require("child_process");
55
55
  const pending_1 = require("../../mind/pending");
56
56
  const agent_service_1 = require("./agent-service");
57
57
  const channel_1 = require("../../mind/friends/channel");
58
58
  const mcp_manager_1 = require("../../repertoire/mcp-manager");
59
- const outlook_http_1 = require("./outlook-http");
60
- const outlook_types_1 = require("./outlook-types");
61
- const outlook_read_1 = require("./outlook-read");
62
- const outlook_view_1 = require("./outlook-view");
59
+ const outlook_http_1 = require("../outlook/outlook-http");
60
+ const outlook_types_1 = require("../outlook/outlook-types");
61
+ const outlook_read_1 = require("../outlook/outlook-read");
62
+ const outlook_view_1 = require("../outlook/outlook-view");
63
63
  const PIDFILE_PATH = path.join(os.homedir(), ".ouro-cli", "daemon.pids");
64
64
  /**
65
65
  * Kill all ouro processes from the previous daemon instance using the pidfile.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const runtime_1 = require("../../nerves/runtime");
5
5
  const runtime_logging_1 = require("./runtime-logging");
6
- const ouro_bot_wrapper_1 = require("./ouro-bot-wrapper");
6
+ const ouro_bot_wrapper_1 = require("../versioning/ouro-bot-wrapper");
7
7
  (0, runtime_logging_1.configureDaemonRuntimeLogger)("ouro-bot");
8
8
  (0, runtime_1.emitNervesEvent)({
9
9
  component: "daemon",
@@ -37,7 +37,7 @@ exports.HabitScheduler = void 0;
37
37
  const path = __importStar(require("path"));
38
38
  const runtime_1 = require("../../nerves/runtime");
39
39
  const habit_parser_1 = require("./habit-parser");
40
- const cadence_1 = require("./cadence");
40
+ const cadence_1 = require("../daemon/cadence");
41
41
  const WATCH_DEBOUNCE_MS = 200;
42
42
  class HabitScheduler {
43
43
  agent;
@@ -41,8 +41,8 @@ const path = __importStar(require("path"));
41
41
  const identity_1 = require("../identity");
42
42
  const config_1 = require("../config");
43
43
  const runtime_1 = require("../../nerves/runtime");
44
- const auth_flow_1 = require("./auth-flow");
45
- const habit_parser_1 = require("./habit-parser");
44
+ const auth_flow_1 = require("../auth/auth-flow");
45
+ const habit_parser_1 = require("../habits/habit-parser");
46
46
  const hatch_specialist_1 = require("./hatch-specialist");
47
47
  function requiredCredentialKeys(provider) {
48
48
  return identity_1.PROVIDER_CREDENTIALS[provider].required;
@@ -35,10 +35,10 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.createMcpServer = createMcpServer;
37
37
  exports.getToolSchemas = getToolSchemas;
38
- const socket_client_1 = require("./socket-client");
39
- const agentService = __importStar(require("./agent-service"));
38
+ const socket_client_1 = require("../daemon/socket-client");
39
+ const agentService = __importStar(require("../daemon/agent-service"));
40
40
  const runtime_1 = require("../../nerves/runtime");
41
- const session_id_resolver_1 = require("./session-id-resolver");
41
+ const session_id_resolver_1 = require("../daemon/session-id-resolver");
42
42
  const pending_1 = require("../../mind/pending");
43
43
  /**
44
44
  * Maps MCP tool names to daemon command kinds.
@@ -61,9 +61,9 @@ const obligations_1 = require("../obligations");
61
61
  const session_activity_1 = require("../session-activity");
62
62
  const board_1 = require("../../repertoire/tasks/board");
63
63
  const scanner_1 = require("../../repertoire/tasks/scanner");
64
- const agent_discovery_1 = require("./agent-discovery");
65
- const runtime_metadata_1 = require("./runtime-metadata");
66
- const thoughts_1 = require("./thoughts");
64
+ const agent_discovery_1 = require("../daemon/agent-discovery");
65
+ const runtime_metadata_1 = require("../daemon/runtime-metadata");
66
+ const thoughts_1 = require("../daemon/thoughts");
67
67
  const outlook_types_1 = require("./outlook-types");
68
68
  const presence_1 = require("../presence");
69
69
  const cares_1 = require("../cares");
@@ -9,7 +9,7 @@ const azure_1 = require("./providers/azure");
9
9
  const minimax_1 = require("./providers/minimax");
10
10
  const openai_codex_1 = require("./providers/openai-codex");
11
11
  const github_copilot_1 = require("./providers/github-copilot");
12
- const auth_flow_1 = require("./daemon/auth-flow");
12
+ const auth_flow_1 = require("./auth/auth-flow");
13
13
  const runtime_1 = require("../nerves/runtime");
14
14
  const PING_TIMEOUT_MS = 10_000;
15
15
  /**
@@ -38,7 +38,7 @@ const child_process_1 = require("child_process");
38
38
  const fs = __importStar(require("fs"));
39
39
  const path = __importStar(require("path"));
40
40
  const runtime_1 = require("../../nerves/runtime");
41
- const runtime_metadata_1 = require("./runtime-metadata");
41
+ const runtime_metadata_1 = require("../daemon/runtime-metadata");
42
42
  function normalizeOutput(output) {
43
43
  return (typeof output === "string" ? output : output.toString("utf-8")).trim();
44
44
  }
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.runOuroBotWrapper = runOuroBotWrapper;
37
37
  const runtime_1 = require("../../nerves/runtime");
38
- const daemon_cli_1 = require("./daemon-cli");
38
+ const daemon_cli_1 = require("../daemon/daemon-cli");
39
39
  async function defaultLoadCanonicalRunner() {
40
40
  // Use the subpath export so we get the daemon-cli module directly,
41
41
  // NOT the root entry point which has side-effects (immediately runs the CLI).
@@ -58,7 +58,7 @@ exports.buildSystem = buildSystem;
58
58
  const fs = __importStar(require("fs"));
59
59
  const path = __importStar(require("path"));
60
60
  const core_1 = require("../heart/core");
61
- const ouro_version_manager_1 = require("../heart/daemon/ouro-version-manager");
61
+ const ouro_version_manager_1 = require("../heart/versioning/ouro-version-manager");
62
62
  const tools_1 = require("../repertoire/tools");
63
63
  const skills_1 = require("../repertoire/skills");
64
64
  const identity_1 = require("../heart/identity");
@@ -70,7 +70,7 @@ const trust_gate_1 = require("./trust-gate");
70
70
  const pipeline_1 = require("./pipeline");
71
71
  const channel_1 = require("../mind/friends/channel");
72
72
  const session_lock_1 = require("./session-lock");
73
- const update_hooks_1 = require("../heart/daemon/update-hooks");
73
+ const update_hooks_1 = require("../heart/versioning/update-hooks");
74
74
  const bundle_meta_1 = require("../heart/daemon/hooks/bundle-meta");
75
75
  const agent_config_v2_1 = require("../heart/daemon/hooks/agent-config-v2");
76
76
  const bundle_manifest_1 = require("../mind/bundle-manifest");
@@ -41,7 +41,7 @@ const inner_dialog_1 = require("./inner-dialog");
41
41
  const runtime_1 = require("../nerves/runtime");
42
42
  const identity_1 = require("../heart/identity");
43
43
  const pending_1 = require("../mind/pending");
44
- const habit_parser_1 = require("../heart/daemon/habit-parser");
44
+ const habit_parser_1 = require("../heart/habits/habit-parser");
45
45
  function createInnerDialogWorker(runTurn = (options) => (0, inner_dialog_1.runInnerDialogTurn)(options), hasPendingWork = () => (0, pending_1.hasPendingMessages)((0, pending_1.getInnerDialogPendingDir)((0, identity_1.getAgentName)()))) {
46
46
  let running = false;
47
47
  const queue = [];
@@ -68,7 +68,7 @@ const session_activity_1 = require("../heart/session-activity");
68
68
  const bluebubbles_1 = require("./bluebubbles");
69
69
  const habit_turn_message_1 = require("./habit-turn-message");
70
70
  const journal_index_1 = require("../mind/journal-index");
71
- const habit_parser_1 = require("../heart/daemon/habit-parser");
71
+ const habit_parser_1 = require("../heart/habits/habit-parser");
72
72
  const cadence_1 = require("../heart/daemon/cadence");
73
73
  const daemon_health_1 = require("../heart/daemon/daemon-health");
74
74
  const DEFAULT_INNER_DIALOG_INSTINCTS = [
@@ -53,7 +53,7 @@ const delegation_1 = require("../heart/delegation");
53
53
  const obligations_1 = require("../heart/obligations");
54
54
  const provider_failover_1 = require("../heart/provider-failover");
55
55
  const provider_ping_1 = require("../heart/provider-ping");
56
- const auth_flow_1 = require("../heart/daemon/auth-flow");
56
+ const auth_flow_1 = require("../heart/auth/auth-flow");
57
57
  const tempo_1 = require("../heart/tempo");
58
58
  const temporal_view_1 = require("../heart/temporal-view");
59
59
  const start_of_turn_packet_1 = require("../heart/start-of-turn-packet");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.208",
3
+ "version": "0.1.0-alpha.209",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes