nemoris 0.1.0

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 (223) hide show
  1. package/.env.example +49 -0
  2. package/LICENSE +21 -0
  3. package/README.md +209 -0
  4. package/SECURITY.md +119 -0
  5. package/bin/nemoris +46 -0
  6. package/config/agents/agent.toml.example +28 -0
  7. package/config/agents/default.toml +22 -0
  8. package/config/agents/orchestrator.toml +18 -0
  9. package/config/delivery.toml +73 -0
  10. package/config/embeddings.toml +5 -0
  11. package/config/identity/default-purpose.md +1 -0
  12. package/config/identity/default-soul.md +3 -0
  13. package/config/identity/orchestrator-purpose.md +1 -0
  14. package/config/identity/orchestrator-soul.md +1 -0
  15. package/config/improvement-targets.toml +15 -0
  16. package/config/jobs/heartbeat-check.toml +30 -0
  17. package/config/jobs/memory-rollup.toml +46 -0
  18. package/config/jobs/workspace-health.toml +63 -0
  19. package/config/mcp.toml +16 -0
  20. package/config/output-contracts.toml +17 -0
  21. package/config/peers.toml +32 -0
  22. package/config/peers.toml.example +32 -0
  23. package/config/policies/memory-default.toml +10 -0
  24. package/config/policies/memory-heartbeat.toml +5 -0
  25. package/config/policies/memory-ops.toml +10 -0
  26. package/config/policies/tools-heartbeat-minimal.toml +8 -0
  27. package/config/policies/tools-interactive-safe.toml +8 -0
  28. package/config/policies/tools-ops-bounded.toml +8 -0
  29. package/config/policies/tools-orchestrator.toml +7 -0
  30. package/config/providers/anthropic.toml +15 -0
  31. package/config/providers/ollama.toml +5 -0
  32. package/config/providers/openai-codex.toml +9 -0
  33. package/config/providers/openrouter.toml +5 -0
  34. package/config/router.toml +22 -0
  35. package/config/runtime.toml +114 -0
  36. package/config/skills/self-improvement.toml +15 -0
  37. package/config/skills/telegram-onboarding-spec.md +240 -0
  38. package/config/skills/workspace-monitor.toml +15 -0
  39. package/config/task-router.toml +42 -0
  40. package/install.sh +50 -0
  41. package/package.json +90 -0
  42. package/src/auth/auth-profiles.js +169 -0
  43. package/src/auth/openai-codex-oauth.js +285 -0
  44. package/src/battle.js +449 -0
  45. package/src/cli/help.js +265 -0
  46. package/src/cli/output-filter.js +49 -0
  47. package/src/cli/runtime-control.js +704 -0
  48. package/src/cli-main.js +2763 -0
  49. package/src/cli.js +78 -0
  50. package/src/config/loader.js +332 -0
  51. package/src/config/schema-validator.js +214 -0
  52. package/src/config/toml-lite.js +8 -0
  53. package/src/daemon/action-handlers.js +71 -0
  54. package/src/daemon/healing-tick.js +87 -0
  55. package/src/daemon/health-probes.js +90 -0
  56. package/src/daemon/notifier.js +57 -0
  57. package/src/daemon/nurse.js +218 -0
  58. package/src/daemon/repair-log.js +106 -0
  59. package/src/daemon/rule-staging.js +90 -0
  60. package/src/daemon/rules.js +29 -0
  61. package/src/daemon/telegram-commands.js +54 -0
  62. package/src/daemon/updater.js +85 -0
  63. package/src/jobs/job-runner.js +78 -0
  64. package/src/mcp/consumer.js +129 -0
  65. package/src/memory/active-recall.js +171 -0
  66. package/src/memory/backend-manager.js +97 -0
  67. package/src/memory/backends/file-backend.js +38 -0
  68. package/src/memory/backends/qmd-backend.js +219 -0
  69. package/src/memory/embedding-guards.js +24 -0
  70. package/src/memory/embedding-index.js +118 -0
  71. package/src/memory/embedding-service.js +179 -0
  72. package/src/memory/file-index.js +177 -0
  73. package/src/memory/memory-signature.js +5 -0
  74. package/src/memory/memory-store.js +648 -0
  75. package/src/memory/retrieval-planner.js +66 -0
  76. package/src/memory/scoring.js +145 -0
  77. package/src/memory/simhash.js +78 -0
  78. package/src/memory/sqlite-active-store.js +824 -0
  79. package/src/memory/write-policy.js +36 -0
  80. package/src/onboarding/aliases.js +33 -0
  81. package/src/onboarding/auth/api-key.js +224 -0
  82. package/src/onboarding/auth/ollama-detect.js +42 -0
  83. package/src/onboarding/clack-prompter.js +77 -0
  84. package/src/onboarding/doctor.js +530 -0
  85. package/src/onboarding/lock.js +42 -0
  86. package/src/onboarding/model-catalog.js +344 -0
  87. package/src/onboarding/phases/auth.js +589 -0
  88. package/src/onboarding/phases/build.js +130 -0
  89. package/src/onboarding/phases/choose.js +82 -0
  90. package/src/onboarding/phases/detect.js +98 -0
  91. package/src/onboarding/phases/hatch.js +216 -0
  92. package/src/onboarding/phases/identity.js +79 -0
  93. package/src/onboarding/phases/ollama.js +345 -0
  94. package/src/onboarding/phases/scaffold.js +99 -0
  95. package/src/onboarding/phases/telegram.js +377 -0
  96. package/src/onboarding/phases/validate.js +204 -0
  97. package/src/onboarding/phases/verify.js +206 -0
  98. package/src/onboarding/platform.js +482 -0
  99. package/src/onboarding/status-bar.js +95 -0
  100. package/src/onboarding/templates.js +794 -0
  101. package/src/onboarding/toml-writer.js +38 -0
  102. package/src/onboarding/tui.js +250 -0
  103. package/src/onboarding/uninstall.js +153 -0
  104. package/src/onboarding/wizard.js +499 -0
  105. package/src/providers/anthropic.js +168 -0
  106. package/src/providers/base.js +247 -0
  107. package/src/providers/circuit-breaker.js +136 -0
  108. package/src/providers/ollama.js +163 -0
  109. package/src/providers/openai-codex.js +149 -0
  110. package/src/providers/openrouter.js +136 -0
  111. package/src/providers/registry.js +36 -0
  112. package/src/providers/router.js +16 -0
  113. package/src/runtime/bootstrap-cache.js +47 -0
  114. package/src/runtime/capabilities-prompt.js +25 -0
  115. package/src/runtime/completion-ping.js +99 -0
  116. package/src/runtime/config-validator.js +121 -0
  117. package/src/runtime/context-ledger.js +360 -0
  118. package/src/runtime/cutover-readiness.js +42 -0
  119. package/src/runtime/daemon.js +729 -0
  120. package/src/runtime/delivery-ack.js +195 -0
  121. package/src/runtime/delivery-adapters/local-file.js +41 -0
  122. package/src/runtime/delivery-adapters/openclaw-cli.js +94 -0
  123. package/src/runtime/delivery-adapters/openclaw-peer.js +98 -0
  124. package/src/runtime/delivery-adapters/shadow.js +13 -0
  125. package/src/runtime/delivery-adapters/standalone-http.js +98 -0
  126. package/src/runtime/delivery-adapters/telegram.js +104 -0
  127. package/src/runtime/delivery-adapters/tui.js +128 -0
  128. package/src/runtime/delivery-manager.js +807 -0
  129. package/src/runtime/delivery-store.js +168 -0
  130. package/src/runtime/dependency-health.js +118 -0
  131. package/src/runtime/envelope.js +114 -0
  132. package/src/runtime/evaluation.js +1089 -0
  133. package/src/runtime/exec-approvals.js +216 -0
  134. package/src/runtime/executor.js +500 -0
  135. package/src/runtime/failure-ping.js +67 -0
  136. package/src/runtime/flows.js +83 -0
  137. package/src/runtime/guards.js +45 -0
  138. package/src/runtime/handoff.js +51 -0
  139. package/src/runtime/identity-cache.js +28 -0
  140. package/src/runtime/improvement-engine.js +109 -0
  141. package/src/runtime/improvement-harness.js +581 -0
  142. package/src/runtime/input-sanitiser.js +72 -0
  143. package/src/runtime/interaction-contract.js +347 -0
  144. package/src/runtime/lane-readiness.js +226 -0
  145. package/src/runtime/migration.js +323 -0
  146. package/src/runtime/model-resolution.js +78 -0
  147. package/src/runtime/network.js +64 -0
  148. package/src/runtime/notification-store.js +97 -0
  149. package/src/runtime/notifier.js +256 -0
  150. package/src/runtime/orchestrator.js +53 -0
  151. package/src/runtime/orphan-reaper.js +41 -0
  152. package/src/runtime/output-contract-schema.js +139 -0
  153. package/src/runtime/output-contract-validator.js +439 -0
  154. package/src/runtime/peer-readiness.js +69 -0
  155. package/src/runtime/peer-registry.js +133 -0
  156. package/src/runtime/pilot-status.js +108 -0
  157. package/src/runtime/prompt-builder.js +261 -0
  158. package/src/runtime/provider-attempt.js +582 -0
  159. package/src/runtime/report-fallback.js +71 -0
  160. package/src/runtime/result-normalizer.js +183 -0
  161. package/src/runtime/retention.js +74 -0
  162. package/src/runtime/review.js +244 -0
  163. package/src/runtime/route-job.js +15 -0
  164. package/src/runtime/run-store.js +38 -0
  165. package/src/runtime/schedule.js +88 -0
  166. package/src/runtime/scheduler-state.js +434 -0
  167. package/src/runtime/scheduler.js +656 -0
  168. package/src/runtime/session-compactor.js +182 -0
  169. package/src/runtime/session-search.js +155 -0
  170. package/src/runtime/slack-inbound.js +249 -0
  171. package/src/runtime/ssrf.js +102 -0
  172. package/src/runtime/status-aggregator.js +330 -0
  173. package/src/runtime/task-contract.js +140 -0
  174. package/src/runtime/task-packet.js +107 -0
  175. package/src/runtime/task-router.js +140 -0
  176. package/src/runtime/telegram-inbound.js +1565 -0
  177. package/src/runtime/token-counter.js +134 -0
  178. package/src/runtime/token-estimator.js +59 -0
  179. package/src/runtime/tool-loop.js +200 -0
  180. package/src/runtime/transport-server.js +311 -0
  181. package/src/runtime/tui-server.js +411 -0
  182. package/src/runtime/ulid.js +44 -0
  183. package/src/security/ssrf-check.js +197 -0
  184. package/src/setup.js +369 -0
  185. package/src/shadow/bridge.js +303 -0
  186. package/src/skills/loader.js +84 -0
  187. package/src/tools/catalog.json +49 -0
  188. package/src/tools/cli-delegate.js +44 -0
  189. package/src/tools/mcp-client.js +106 -0
  190. package/src/tools/micro/cancel-task.js +6 -0
  191. package/src/tools/micro/complete-task.js +6 -0
  192. package/src/tools/micro/fail-task.js +6 -0
  193. package/src/tools/micro/http-fetch.js +74 -0
  194. package/src/tools/micro/index.js +36 -0
  195. package/src/tools/micro/lcm-recall.js +60 -0
  196. package/src/tools/micro/list-dir.js +17 -0
  197. package/src/tools/micro/list-skills.js +46 -0
  198. package/src/tools/micro/load-skill.js +38 -0
  199. package/src/tools/micro/memory-search.js +45 -0
  200. package/src/tools/micro/read-file.js +11 -0
  201. package/src/tools/micro/session-search.js +54 -0
  202. package/src/tools/micro/shell-exec.js +43 -0
  203. package/src/tools/micro/trigger-job.js +79 -0
  204. package/src/tools/micro/web-search.js +58 -0
  205. package/src/tools/micro/workspace-paths.js +39 -0
  206. package/src/tools/micro/write-file.js +14 -0
  207. package/src/tools/micro/write-memory.js +41 -0
  208. package/src/tools/registry.js +348 -0
  209. package/src/tools/tool-result-contract.js +36 -0
  210. package/src/tui/chat.js +835 -0
  211. package/src/tui/renderer.js +175 -0
  212. package/src/tui/socket-client.js +217 -0
  213. package/src/utils/canonical-json.js +29 -0
  214. package/src/utils/compaction.js +30 -0
  215. package/src/utils/env-loader.js +5 -0
  216. package/src/utils/errors.js +80 -0
  217. package/src/utils/fs.js +101 -0
  218. package/src/utils/ids.js +5 -0
  219. package/src/utils/model-context-limits.js +30 -0
  220. package/src/utils/token-budget.js +74 -0
  221. package/src/utils/usage-cost.js +25 -0
  222. package/src/utils/usage-metrics.js +14 -0
  223. package/vendor/smol-toml-1.5.2.tgz +0 -0
@@ -0,0 +1,46 @@
1
+ id = "memory-rollup"
2
+ trigger = "daily:22:15"
3
+ task_type = "memory_rollup"
4
+ agent_id = "assistant"
5
+ model_lane = "local_report"
6
+ output_target = "state/memory-rollups"
7
+ idempotency_key = "memory-rollup:date"
8
+ live_job_hints = ["midnight-project-sync"]
9
+ memory_backends = ["file", "qmd"]
10
+ qmd_supplement_limit = 4
11
+ memory_limit = 10
12
+
13
+ [budget]
14
+ max_tokens = 6000
15
+ max_runtime_seconds = 45
16
+
17
+ [retry]
18
+ max_attempts = 2
19
+
20
+ [stop]
21
+ halt_on_policy_error = true
22
+ halt_on_budget_exceeded = true
23
+
24
+ [output_contract]
25
+ format = "structured_rollup"
26
+ required_sections = ["inbox", "projects", "backlog", "update"]
27
+ style_hints = ["use markdown headings", "include concise bullets under each section", "keep the output handoff-ready"]
28
+
29
+ [interaction_contract]
30
+ ack_mode = "immediate"
31
+ progress_mode = "long_running"
32
+ progress_after_seconds = 75
33
+ max_silence_seconds = 150
34
+ notify_on_done = true
35
+ notify_on_error = true
36
+ requires_pingback = true
37
+ pingback_target = "same_thread"
38
+ completion_signal = "rollup_ready"
39
+ failure_signal = "rollup_error"
40
+ handoff_format = "structured_handoff"
41
+ completion_sections = ["inbox", "projects", "backlog", "update", "next_actions"]
42
+
43
+ [report_guidance]
44
+ focus = ["write a handoff-ready rollup, not a generic summary", "prefer concrete state changes over empty reassurance", "if shadow import is the only evidence, say that plainly"]
45
+ quality_checks = ["each section should earn its bullet", "keep update section action-oriented", "do not repeat the same sentence across sections"]
46
+ avoid = ["restating the prompt", "empty filler across all sections", "code fences or markdown wrappers around JSON"]
@@ -0,0 +1,63 @@
1
+ id = "workspace-health"
2
+ trigger = "hourly"
3
+ task_type = "workspace_health"
4
+ agent_id = "assistant"
5
+ model_lane = "local_report"
6
+ output_target = "state/health"
7
+ idempotency_key = "workspace-health:hour"
8
+ live_job_hints = ["morning-briefing"]
9
+ memory_backends = ["file"]
10
+ memory_limit = 6
11
+
12
+ [budget]
13
+ max_tokens = 4000
14
+ max_runtime_seconds = 120
15
+
16
+ [retry]
17
+ max_attempts = 1
18
+
19
+ [stop]
20
+ halt_on_policy_error = true
21
+ halt_on_budget_exceeded = true
22
+
23
+ [output_contract]
24
+ format = "bulleted_briefing"
25
+ required_sections = ["calendar", "issues", "weather"]
26
+ style_hints = ["lead with a one-line status summary", "use short bullets", "call out blockers or deltas only"]
27
+
28
+ [interaction_contract]
29
+ ack_mode = "immediate"
30
+ progress_mode = "long_running"
31
+ progress_after_seconds = 60
32
+ max_silence_seconds = 120
33
+ notify_on_done = true
34
+ notify_on_error = true
35
+ requires_pingback = true
36
+ pingback_target = "same_thread"
37
+ completion_signal = "health_ready"
38
+ failure_signal = "health_error"
39
+ handoff_format = "concise_status"
40
+ completion_sections = ["status", "issues", "next_actions"]
41
+
42
+ [interaction_contract.handoff]
43
+ enabled = true
44
+ signal = "workspace_handoff"
45
+ capability_query = "reporting workspace health coordination"
46
+ preferred_task_classes = ["workspace_health", "reporting", "handoff"]
47
+ max_suggestions = 2
48
+
49
+ [interaction_contract.yield]
50
+ enabled = true
51
+ signal = "workspace_follow_up"
52
+ target_surface = "operator_review"
53
+ follow_up_objective = "Review the workspace-health outcome, choose any required peer handoff, and send the bounded follow-up notifications."
54
+
55
+ [report_guidance]
56
+ focus = ["prefer concrete deltas over generic reassurance", "treat missing evidence as None", "highlight blockers, anomalies, or quiet status plainly"]
57
+ quality_checks = ["keep status to one line", "do not invent meetings, issues, or weather details", "mention only what the packet supports"]
58
+ avoid = ["generic system healthy filler", "repeating the job objective", "code fences or markdown wrappers around JSON"]
59
+
60
+ [report_fallback]
61
+ enabled = true
62
+ lane = "report_fallback_lowcost"
63
+ allowed_failure_classes = ["timeout", "provider_loading"]
@@ -0,0 +1,16 @@
1
+ # MCP Server Configuration
2
+ # Each [servers.<id>] section defines an MCP server that Nemoris can connect to.
3
+ # Servers are spawned lazily on first tool call (not at daemon boot).
4
+ #
5
+ # Fields:
6
+ # command — executable to run (required)
7
+ # args — CLI arguments (optional, default [])
8
+ # env — environment variables, supports ${VAR} substitution (optional)
9
+ # enabled — set to false to disable without removing (optional, default true)
10
+ # timeout — per-request timeout in ms (optional, default 30000)
11
+ #
12
+ # Example:
13
+ # [servers.github]
14
+ # command = "npx"
15
+ # args = ["-y", "@modelcontextprotocol/server-github"]
16
+ # env = { GITHUB_TOKEN = "${GITHUB_TOKEN}" }
@@ -0,0 +1,17 @@
1
+ [profiles.default]
2
+ require_status = true
3
+ section_style = "freeform"
4
+ require_section_items = false
5
+ template_lines = ["Status: <one-line status>", "<response body>"]
6
+
7
+ [profiles.bulleted_briefing]
8
+ require_status = true
9
+ section_style = "bullets"
10
+ require_section_items = true
11
+ template_lines = ["Status: <one-line status>", "- Calendar: <brief update or None>", "- Issues: <brief update or None>", "- Weather: <brief update or None>"]
12
+
13
+ [profiles.structured_rollup]
14
+ require_status = false
15
+ section_style = "headings"
16
+ require_section_items = true
17
+ template_lines = ["## Inbox", "- <brief update or None>", "", "## Projects", "- <brief update or None>", "", "## Backlog", "- <brief update or None>", "", "## Update", "- <brief update or None>"]
@@ -0,0 +1,32 @@
1
+ # Peer agent definitions
2
+ # Replace session_keys and delivery details with your own values.
3
+
4
+ [peers.kodi]
5
+ agent_id = "main"
6
+ label = "Kodi"
7
+ delivery_profile = "gateway_telegram_main"
8
+ session_keys = ["agent:main:main"]
9
+
10
+ [peers.kodi.card]
11
+ role = "Primary operator-facing collaborator"
12
+ mission = "Handle direct user coordination, execution oversight, and high-context operating tasks."
13
+ capability_tags = ["operator", "coordination", "planning", "delivery"]
14
+ preferred_task_classes = ["interactive", "handoff", "workspace_health"]
15
+ delivery_preferences = ["gateway_telegram_main"]
16
+ model_lane_preferences = ["local_report", "interactive_primary"]
17
+ trust_level = "high"
18
+
19
+ [peers.rook]
20
+ agent_id = "secondary"
21
+ label = "Rook"
22
+ delivery_profile = "gateway_telegram_main"
23
+ session_keys = ["agent:secondary:main"]
24
+
25
+ [peers.rook.card]
26
+ role = "Analysis and reporting specialist"
27
+ mission = "Own analytical reasoning, reporting, and follow-through tasks."
28
+ capability_tags = ["analysis", "reporting"]
29
+ preferred_task_classes = ["analysis", "memory_rollup", "reporting"]
30
+ delivery_preferences = ["gateway_telegram_main"]
31
+ model_lane_preferences = ["local_report"]
32
+ trust_level = "high"
@@ -0,0 +1,32 @@
1
+ # Peer agent configuration
2
+ # Copy this file to peers.toml and fill in your own values.
3
+
4
+ [peers.alpha]
5
+ agent_id = "main"
6
+ label = "Alpha"
7
+ delivery_profile = "gateway_telegram_main"
8
+ session_keys = ["agent:main:telegram:direct:YOUR_CHAT_ID", "agent:main:main"]
9
+
10
+ [peers.alpha.card]
11
+ role = "Primary operator-facing collaborator"
12
+ mission = "Handle direct user coordination, execution oversight, and high-context operating tasks."
13
+ capability_tags = ["operator", "coordination", "planning", "delivery"]
14
+ preferred_task_classes = ["interactive", "handoff", "workspace_health"]
15
+ delivery_preferences = ["gateway_telegram_main"]
16
+ model_lane_preferences = ["local_report", "interactive_primary"]
17
+ trust_level = "high"
18
+
19
+ [peers.bravo]
20
+ agent_id = "secondary"
21
+ label = "Bravo"
22
+ delivery_profile = "gateway_telegram_main"
23
+ session_keys = ["agent:secondary:telegram:direct:YOUR_CHAT_ID", "agent:secondary:main"]
24
+
25
+ [peers.bravo.card]
26
+ role = "Analysis and reporting specialist"
27
+ mission = "Own analytical reasoning, reporting, and follow-through tasks."
28
+ capability_tags = ["analysis", "reporting"]
29
+ preferred_task_classes = ["analysis", "memory_rollup", "reporting"]
30
+ delivery_preferences = ["gateway_telegram_main"]
31
+ model_lane_preferences = ["local_report"]
32
+ trust_level = "high"
@@ -0,0 +1,10 @@
1
+ id = "default"
2
+ allow_durable_writes = true
3
+ allow_identity_updates = false
4
+ require_source_reference = true
5
+ require_write_reason = true
6
+ max_writes_per_run = 5
7
+
8
+ [categories]
9
+ allowed = ["decision", "preference", "workflow_rule", "artifact_summary"]
10
+ blocked = ["ephemeral_chatter", "raw_tool_output", "unverified_external_claim"]
@@ -0,0 +1,5 @@
1
+ id = "heartbeat"
2
+ allow_durable_writes = false
3
+ require_source_reference = true
4
+ require_write_reason = true
5
+ max_writes_per_run = 0
@@ -0,0 +1,10 @@
1
+ id = "ops"
2
+ allow_durable_writes = true
3
+ allow_identity_updates = false
4
+ require_source_reference = true
5
+ require_write_reason = true
6
+ max_writes_per_run = 3
7
+
8
+ [categories]
9
+ allowed = ["health_summary", "workflow_rule", "artifact_summary"]
10
+ blocked = ["ephemeral_chatter", "raw_tool_output", "unverified_external_claim"]
@@ -0,0 +1,8 @@
1
+ id = "heartbeat_minimal"
2
+ default = "deny"
3
+ allowed = ["read_file", "list_dir", "check_status"]
4
+ blocked = ["apply_patch", "send_email", "post_web", "delete_file", "reset_repo"]
5
+
6
+ [limits]
7
+ max_parallel = 2
8
+ require_approval_for_network = true
@@ -0,0 +1,8 @@
1
+ id = "interactive_safe"
2
+ default = "deny"
3
+ allowed = ["read_file", "write_file", "list_dir", "shell_exec", "http_fetch", "memory_search", "write_memory", "web_search", "trigger_job", "lcm_recall", "session_search", "load_skill", "list_skills"]
4
+ blocked = ["send_email", "post_web", "delete_file", "reset_repo"]
5
+
6
+ [limits]
7
+ max_parallel = 3
8
+ require_approval_for_network = true
@@ -0,0 +1,8 @@
1
+ id = "ops_bounded"
2
+ default = "deny"
3
+ allowed = ["read_file", "search_file", "list_dir", "apply_patch", "check_status", "run_tests", "memory_search"]
4
+ blocked = ["send_email", "post_web", "delete_file", "reset_repo"]
5
+
6
+ [limits]
7
+ max_parallel = 3
8
+ require_approval_for_network = true
@@ -0,0 +1,7 @@
1
+ id = "orchestrator"
2
+ default = "deny"
3
+ allowed = ["delegate_agent", "delegate_cli"]
4
+ blocked = ["read_file", "write_file", "shell_exec"]
5
+
6
+ [limits]
7
+ require_approval_for_network = false
@@ -0,0 +1,15 @@
1
+ id = "anthropic"
2
+ adapter = "anthropic"
3
+ auth_ref = "env:NEMORIS_ANTHROPIC_API_KEY"
4
+ base_url = "https://api.anthropic.com"
5
+ healthcheck = "messages.create"
6
+ default_timeout_ms = 45000
7
+ lanes = ["interactive-primary", "job-heavy"]
8
+
9
+ [models.haiku]
10
+ id = "anthropic/claude-haiku-4-5"
11
+ role = "cheap_interactive"
12
+
13
+ [models.sonnet]
14
+ id = "anthropic/claude-sonnet-4-6"
15
+ role = "manual_bump"
@@ -0,0 +1,5 @@
1
+ id = "ollama"
2
+ adapter = "ollama"
3
+ base_url = "http://localhost:11434"
4
+ healthcheck = "http://localhost:11434/api/tags"
5
+ default_timeout_ms = 45000
@@ -0,0 +1,9 @@
1
+ id = "openai-codex"
2
+ adapter = "openai-codex"
3
+ auth_ref = "profile:openai-codex:default"
4
+ base_url = "https://api.openai.com/v1"
5
+ default_timeout_ms = 45000
6
+
7
+ [models.codex]
8
+ id = "openai-codex/gpt-5.4"
9
+ role = "cheap_interactive"
@@ -0,0 +1,5 @@
1
+ id = "openrouter"
2
+ adapter = "openrouter"
3
+ auth_ref = "env:OPENROUTER_API_KEY"
4
+ base_url = "https://openrouter.ai/api/v1"
5
+ default_timeout_ms = 45000
@@ -0,0 +1,22 @@
1
+ [lanes.interactive_primary]
2
+ primary = "openrouter/anthropic/claude-haiku-4-5"
3
+ fallback = "ollama/qwen3:8b"
4
+ manual_bump = "openrouter/anthropic/claude-sonnet-4-6"
5
+
6
+ [lanes.local_cheap]
7
+ primary = "ollama/qwen2.5:0.5b"
8
+
9
+ [lanes.local_report]
10
+ primary = "ollama/qwen3:8b"
11
+ fallback = "openrouter/anthropic/claude-haiku-4-5"
12
+ manual_bump = "ollama/qwen3:14b"
13
+
14
+ [lanes.report_fallback_lowcost]
15
+ primary = "openrouter/anthropic/claude-haiku-4-5"
16
+
17
+ [lanes.job_heavy]
18
+ primary = "openrouter/anthropic/claude-sonnet-4-6"
19
+
20
+ [lanes.local_primary]
21
+ primary = "ollama/qwen3:8b"
22
+ fallback = "ollama/qwen2.5:0.5b"
@@ -0,0 +1,114 @@
1
+ [safety]
2
+ context_tokens = 32768
3
+ context_pressure_soft_ratio = 0.72
4
+ context_pressure_hard_ratio = 0.9
5
+ fresh_session_on_high_pressure = true
6
+ snapshot_before_compaction = true
7
+
8
+ [concurrency]
9
+ max_concurrent_jobs = 2
10
+ max_concurrent_subagents = 2
11
+
12
+ [retention.runs]
13
+ ttl_days = 30
14
+ max_files_per_bucket = 2000
15
+
16
+ [retention.notifications]
17
+ ttl_days = 14
18
+ max_files_per_bucket = 1000
19
+
20
+ [retention.deliveries]
21
+ ttl_days = 14
22
+ max_files_per_bucket = 1000
23
+
24
+ [retention.transport_inbox]
25
+ ttl_days = 7
26
+ max_files_per_bucket = 1000
27
+
28
+ [retrieval]
29
+ lexical_weight = 0.36
30
+ embedding_weight = 0.3
31
+ recency_weight = 0.14
32
+ salience_weight = 0.14
33
+ type_weight = 0.06
34
+ semantic_rescue_bonus = 0.06
35
+ shadow_snapshot_penalty = 0.12
36
+
37
+ [memory_locks]
38
+ ttl_ms = 15000
39
+ retry_delay_ms = 25
40
+ max_retries = 40
41
+
42
+ [handoffs]
43
+ pending_timeout_minutes = 120
44
+ escalate_on_expiry = true
45
+ escalation_delivery_profile = "gateway_preview_main"
46
+
47
+ [follow_ups]
48
+ pending_timeout_minutes = 120
49
+ max_follow_up_depth = 5
50
+ completion_ttl_multiplier = 2
51
+ escalate_on_expiry = true
52
+ escalation_delivery_profile = "gateway_preview_main"
53
+
54
+ [yields]
55
+ enabled = true
56
+ default_target_surface = "operator_review"
57
+
58
+ [delivery]
59
+ prevent_resend_on_uncertain = true
60
+ retry_on_failure = false
61
+ notify_on_failure = true
62
+
63
+ [maintenance]
64
+ wal_checkpoint_threshold_bytes = 67108864
65
+ prune_on_tick = true
66
+ sweep_pending_handoffs_on_tick = true
67
+ sweep_pending_followups_on_tick = true
68
+
69
+ [network]
70
+ dns_result_order = "system"
71
+ connect_timeout_ms = 20000
72
+ read_timeout_ms = 60000
73
+ retry_budget = 1
74
+ circuit_breaker_threshold = 3
75
+
76
+ [circuit_breaker]
77
+ failure_threshold = 5
78
+ reset_timeout_seconds = 30
79
+ half_open_max_probes = 1
80
+ transient_codes = [408, 429, 500, 502, 503, 504]
81
+
82
+ [bootstrap_cache]
83
+ enabled = true
84
+ identity_ttl_ms = 300000
85
+
86
+ [extensions]
87
+ implicit_workspace_autoload = false
88
+ require_explicit_trust = true
89
+ trusted_roots = []
90
+
91
+ [shutdown]
92
+ drain_timeout_ms = 15000
93
+ transport_shutdown_timeout_ms = 5000
94
+
95
+ [report_fallback]
96
+ enabled = false
97
+ lane = "report_fallback_lowcost"
98
+ allowed_job_ids = ["workspace-health"]
99
+ allowed_failure_classes = ["timeout", "provider_loading"]
100
+
101
+ [telegram]
102
+ bot_token_env = "NEMORIS_TELEGRAM_BOT_TOKEN"
103
+ polling_mode = true
104
+ webhook_url = ""
105
+ operator_chat_id = "7781763328"
106
+ authorized_chat_ids = ["7781763328"]
107
+ default_agent = "main"
108
+
109
+ [slack]
110
+ enabled = false
111
+ bot_token = "env:SLACK_BOT_TOKEN"
112
+ signing_secret = "env:SLACK_SIGNING_SECRET"
113
+ events_path = "/slack/events"
114
+ slash_path = "/slack/slash"
@@ -0,0 +1,15 @@
1
+ [skill]
2
+ id = "self_improvement"
3
+ description = "Analyse run artifacts and apply tuning adjustments"
4
+ agent_scope = ["ops", "main"]
5
+
6
+ [skill.context]
7
+ prompt = "You are reviewing a run artifact that scored below threshold. Read the run artifact and current tunings. Identify the root cause. Apply ONE of: prompt refinement, budget adjustment, tool policy change, lane escalation. Write the tuning to state/tunings/<jobId>/ as a JSON file. Explain what you changed and why in under 100 words."
8
+
9
+ [skill.tools]
10
+ required = ["read_file", "write_file", "list_dir"]
11
+ optional = []
12
+
13
+ [skill.budget]
14
+ max_tokens = 4096
15
+ max_tool_calls = 8