@intent-systems/nexus 2026.1.5-4 → 2026.1.5-8

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 (347) hide show
  1. package/dist/agents/agent-id.js +41 -0
  2. package/dist/agents/auth-profiles.js +114 -25
  3. package/dist/agents/identity-state.js +101 -0
  4. package/dist/agents/model-auth.js +1 -0
  5. package/dist/agents/model-fallback.js +15 -9
  6. package/dist/agents/model-selection.js +1 -1
  7. package/dist/agents/models-config.js +17 -11
  8. package/dist/agents/pi-embedded-runner.js +101 -9
  9. package/dist/agents/sandbox.js +12 -3
  10. package/dist/agents/skill-runner.js +41 -6
  11. package/dist/agents/skill-usage.js +117 -17
  12. package/dist/agents/skills-status.js +4 -3
  13. package/dist/agents/skills.js +38 -30
  14. package/dist/agents/subagent-registry.js +25 -11
  15. package/dist/agents/system-prompt.js +16 -0
  16. package/dist/agents/tool-policy.js +19 -3
  17. package/dist/agents/tools/browser-tool.js +5 -2
  18. package/dist/agents/tools/image-tool.js +93 -8
  19. package/dist/agents/tools/sessions-announce-target.js +5 -1
  20. package/dist/agents/workspace.js +81 -59
  21. package/dist/auto-reply/command-detection.js +2 -1
  22. package/dist/auto-reply/reply/directive-handling.js +153 -28
  23. package/dist/auto-reply/reply/directives.js +17 -2
  24. package/dist/auto-reply/reply/model-selection.js +8 -3
  25. package/dist/auto-reply/reply/queue.js +2 -2
  26. package/dist/auto-reply/reply.js +1 -1
  27. package/dist/auto-reply/thinking.js +15 -0
  28. package/dist/browser/chrome.js +1 -1
  29. package/dist/browser/client.js +2 -0
  30. package/dist/browser/config.js +6 -2
  31. package/dist/browser/pw-tools-core.js +3 -0
  32. package/dist/browser/routes/agent.js +14 -0
  33. package/dist/canvas-host/server.js +1 -1
  34. package/dist/capabilities/detector.js +46 -15
  35. package/dist/capabilities/registry.js +2 -1
  36. package/dist/cli/cloud-cli.js +70 -7
  37. package/dist/cli/credential-cli.js +214 -23
  38. package/dist/cli/gateway-cli.js +1 -1
  39. package/dist/cli/log-cli.js +25 -0
  40. package/dist/cli/pairing-cli.js +1 -1
  41. package/dist/cli/program.js +82 -8
  42. package/dist/cli/run-main.js +1 -1
  43. package/dist/cli/skills-cli.js +165 -30
  44. package/dist/cli/skills-hub-cli.js +68 -36
  45. package/dist/cli/tool-connector-cli.js +99 -24
  46. package/dist/cli/upstream-sync-cli.js +253 -96
  47. package/dist/cli/usage-cli.js +14 -0
  48. package/dist/commands/auth-choice-options.js +6 -1
  49. package/dist/commands/auth-choice.js +157 -5
  50. package/dist/commands/bootstrap-preset.js +26 -12
  51. package/dist/commands/capabilities.js +33 -6
  52. package/dist/commands/claude-md.js +3 -2
  53. package/dist/commands/config-view.js +1 -1
  54. package/dist/commands/config.js +85 -0
  55. package/dist/commands/configure.js +4 -4
  56. package/dist/commands/credential.js +497 -36
  57. package/dist/commands/cursor-hooks.js +240 -0
  58. package/dist/commands/cursor-rules.js +14 -188
  59. package/dist/commands/doctor.js +5 -4
  60. package/dist/commands/identity.js +29 -32
  61. package/dist/commands/init.js +304 -20
  62. package/dist/commands/log.js +134 -0
  63. package/dist/commands/models/fallbacks.js +1 -1
  64. package/dist/commands/models/image-fallbacks.js +1 -1
  65. package/dist/commands/models/list.js +1 -1
  66. package/dist/commands/models/scan.js +1 -1
  67. package/dist/commands/onboard-auth.js +27 -2
  68. package/dist/commands/onboard-eve-identity.js +8 -9
  69. package/dist/commands/onboard-non-interactive.js +4 -2
  70. package/dist/commands/onboard-quickstart.js +18 -11
  71. package/dist/commands/quest-state.js +271 -0
  72. package/dist/commands/quest.js +53 -13
  73. package/dist/commands/reset.js +1 -1
  74. package/dist/commands/sessions-ingest.js +5 -4
  75. package/dist/commands/setup.js +4 -2
  76. package/dist/commands/skills-manifest.js +89 -29
  77. package/dist/commands/status.js +193 -73
  78. package/dist/commands/suggestions.js +1 -1
  79. package/dist/commands/usage-tracking.js +32 -0
  80. package/dist/commands/usage-upload.js +6 -1
  81. package/dist/config/defaults.js +1 -3
  82. package/dist/config/includes.js +5 -7
  83. package/dist/config/io.js +88 -16
  84. package/dist/config/legacy.js +4 -2
  85. package/dist/config/paths.js +16 -0
  86. package/dist/config/sessions.js +9 -5
  87. package/dist/config/zod-schema.js +4 -3
  88. package/dist/control-plane/broker/broker.js +131 -78
  89. package/dist/control-plane/compaction.js +3 -5
  90. package/dist/control-plane/factory.js +2 -2
  91. package/dist/control-plane/index.js +2 -2
  92. package/dist/control-plane/odu/agents.js +28 -23
  93. package/dist/control-plane/odu/interaction-tools.js +62 -50
  94. package/dist/control-plane/odu/prompt-loader.js +8 -8
  95. package/dist/control-plane/odu/runtime.js +87 -75
  96. package/dist/control-plane/odu-control-plane.js +14 -12
  97. package/dist/control-plane/single-agent.js +13 -13
  98. package/dist/credentials/store.js +133 -7
  99. package/dist/daemon/launchd.js +14 -0
  100. package/dist/entry.js +0 -0
  101. package/dist/gateway/server-browser.js +5 -4
  102. package/dist/gateway/server-methods/cron.js +11 -1
  103. package/dist/gateway/server.js +14 -7
  104. package/dist/infra/bonjour.js +1 -1
  105. package/dist/infra/event-log.js +8 -2
  106. package/dist/infra/path-env.js +1 -2
  107. package/dist/infra/provider-usage.auth.js +5 -3
  108. package/dist/infra/provider-usage.fetch.claude.js +16 -6
  109. package/dist/infra/provider-usage.fetch.minimax.js +8 -3
  110. package/dist/infra/provider-usage.js +9 -5
  111. package/dist/infra/restart.js +2 -2
  112. package/dist/infra/usage-settings.js +78 -0
  113. package/dist/infra/usage-suggestions.js +17 -5
  114. package/dist/infra/usage-upload.js +38 -1
  115. package/dist/infra/voicewake.js +2 -2
  116. package/dist/media/image-ops.js +3 -1
  117. package/dist/memory/index.js +2 -381
  118. package/dist/native/nexus-cloud/darwin-arm64/nexus-cloud +0 -0
  119. package/dist/native/nexus-cloud/darwin-arm64/nexus-cloud-rs +0 -0
  120. package/dist/pairing/pairing-store.js +24 -0
  121. package/dist/providers/github-copilot-auth.js +1 -1
  122. package/dist/routing/resolve-route.js +6 -6
  123. package/dist/routing/session-key.js +3 -1
  124. package/dist/sessions/send-policy.js +5 -5
  125. package/dist/slack/monitor.js +22 -1
  126. package/dist/telegram/reaction-level.js +2 -1
  127. package/dist/utils.js +8 -3
  128. package/dist/wizard/onboarding.js +29 -7
  129. package/docs/AGENTS.default.md +1 -1
  130. package/docs/configuration.md +1 -1
  131. package/docs/feature-inventory/overview.md +2 -2
  132. package/docs/reference/templates/AGENTS.md +172 -109
  133. package/docs/templates/AGENTS.md +140 -199
  134. package/docs/templates/BOOTSTRAP.md +40 -20
  135. package/docs/templates/IDENTITY.md +6 -0
  136. package/docs/templates/USER.md +22 -2
  137. package/package.json +3 -1
  138. package/skills/{notion → connectors/notion}/SKILL.md +1 -1
  139. package/skills/{filesystem → guides/filesystem}/SKILL.md +1 -1
  140. package/skills/{onboarding → guides/onboarding}/SKILL.md +1 -1
  141. package/skills/{onboarding → guides/onboarding}/docs/CAPABILITY_TAXONOMY.md +5 -5
  142. package/skills/{onboarding → guides/onboarding}/docs/CLI_GRAMMAR.md +8 -8
  143. package/skills/{onboarding → guides/onboarding}/docs/CLI_GRAMMAR_ONBOARDING.md +2 -2
  144. package/skills/{onboarding → guides/onboarding}/docs/CLI_GRAMMAR_SKILLS.md +26 -20
  145. package/skills/{onboarding → guides/onboarding}/docs/GOAL_STATE_ARCHITECTURE.md +38 -43
  146. package/skills/{onboarding → guides/onboarding}/docs/NEXUS_SYSTEM_OVERVIEW.md +4 -4
  147. package/skills/{onboarding → guides/onboarding}/docs/SKILLS_HUB_SPEC.md +1 -1
  148. package/skills/{onboarding → guides/onboarding}/docs/SKILLS_SPECIFICATION.md +8 -7
  149. package/skills/{onboarding → guides/onboarding}/docs/SKILL_GATEWAY_DESIGN.md +16 -16
  150. package/skills/{onboarding → guides/onboarding}/docs/SKILL_GATEWAY_PRD.md +10 -12
  151. package/skills/guides/onboarding/docs/canonical/00_CONFLICT_ANALYSIS.md +463 -0
  152. package/skills/guides/onboarding/docs/canonical/01_NEXUS_OVERVIEW.md +167 -0
  153. package/skills/guides/onboarding/docs/canonical/02_CLI_REFERENCE.md +404 -0
  154. package/skills/guides/onboarding/docs/canonical/03_STATE_ARCHITECTURE.md +357 -0
  155. package/skills/guides/onboarding/docs/canonical/04_SKILL_SPECIFICATION.md +393 -0
  156. package/skills/guides/onboarding/docs/canonical/05_CAPABILITY_TAXONOMY.md +298 -0
  157. package/skills/guides/onboarding/docs/canonical/06_CAPABILITIES_REFERENCE.md +207 -0
  158. package/skills/guides/onboarding/docs/canonical/07_AGENT_BINDINGS.md +85 -0
  159. package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/nexus-cloud.md +2 -2
  160. package/skills/{onboarding → guides/onboarding}/scripts/ralph/progress.txt +1 -1
  161. package/skills/{nexus-cloud → tools/nexus-cloud}/SKILL.md +2 -1
  162. package/skills/{nexus-cloud → tools/nexus-cloud}/docs/setup.md +1 -1
  163. package/docs/templates/PROFILE.md +0 -14
  164. /package/skills/{brave-search → connectors/brave-search}/SKILL.md +0 -0
  165. /package/skills/{brave-search → connectors/brave-search}/docs/setup.md +0 -0
  166. /package/skills/{brave-search → connectors/brave-search}/docs/troubleshooting.md +0 -0
  167. /package/skills/{brave-search → connectors/brave-search}/docs/usage.md +0 -0
  168. /package/skills/{brave-search → connectors/brave-search}/scripts/content.mjs +0 -0
  169. /package/skills/{brave-search → connectors/brave-search}/scripts/search.mjs +0 -0
  170. /package/skills/{discord → connectors/discord}/SKILL.md +0 -0
  171. /package/skills/{gemini → connectors/gemini}/SKILL.md +0 -0
  172. /package/skills/{github → connectors/github}/SKILL.md +0 -0
  173. /package/skills/{github → connectors/github}/docs/setup.md +0 -0
  174. /package/skills/{github → connectors/github}/docs/troubleshooting.md +0 -0
  175. /package/skills/{google-oauth → connectors/google-oauth}/SKILL.md +0 -0
  176. /package/skills/{slack → connectors/slack}/SKILL.md +0 -0
  177. /package/skills/{telegram → connectors/telegram}/SKILL.md +0 -0
  178. /package/skills/{telegram → connectors/telegram}/docs/pairing.md +0 -0
  179. /package/skills/{telegram → connectors/telegram}/docs/setup.md +0 -0
  180. /package/skills/{telegram → connectors/telegram}/docs/webhook.md +0 -0
  181. /package/skills/{wacli → connectors/wacli}/SKILL.md +0 -0
  182. /package/skills/{wacli → connectors/wacli}/docs/auth.md +0 -0
  183. /package/skills/{wacli → connectors/wacli}/docs/backup.md +0 -0
  184. /package/skills/{wacli → connectors/wacli}/docs/troubleshooting.md +0 -0
  185. /package/skills/{browser-use-agent-sdk → guides/browser-use-agent-sdk}/SKILL.md +0 -0
  186. /package/skills/{json-render → guides/json-render}/SKILL.md +0 -0
  187. /package/skills/{json-render → guides/json-render}/assets/components/README.md +0 -0
  188. /package/skills/{json-render → guides/json-render}/assets/components/catalog.ts +0 -0
  189. /package/skills/{json-render → guides/json-render}/assets/components/registry.tsx +0 -0
  190. /package/skills/{json-render → guides/json-render}/assets/demo/App.css +0 -0
  191. /package/skills/{json-render → guides/json-render}/assets/demo/App.tsx +0 -0
  192. /package/skills/{json-render → guides/json-render}/assets/demo/README.md +0 -0
  193. /package/skills/{json-render → guides/json-render}/assets/demo/catalog.ts +0 -0
  194. /package/skills/{json-render → guides/json-render}/assets/demo/data/nexus-core.json +0 -0
  195. /package/skills/{json-render → guides/json-render}/assets/demo/index.css +0 -0
  196. /package/skills/{json-render → guides/json-render}/assets/demo/registry.tsx +0 -0
  197. /package/skills/{json-render → guides/json-render}/docs/nexus-state-demo.md +0 -0
  198. /package/skills/{json-render → guides/json-render}/docs/shadcn-preset.md +0 -0
  199. /package/skills/{json-render → guides/json-render}/scripts/create-vite-demo.sh +0 -0
  200. /package/skills/{json-render → guides/json-render}/scripts/llm-server/README.md +0 -0
  201. /package/skills/{json-render → guides/json-render}/scripts/llm-server/catalog.ts +0 -0
  202. /package/skills/{json-render → guides/json-render}/scripts/llm-server/package-lock.json +0 -0
  203. /package/skills/{json-render → guides/json-render}/scripts/llm-server/package.json +0 -0
  204. /package/skills/{json-render → guides/json-render}/scripts/llm-server/server.ts +0 -0
  205. /package/skills/{onboarding → guides/onboarding}/docs/CAPABILITIES.md +0 -0
  206. /package/skills/{onboarding → guides/onboarding}/docs/CLI_GRAMMAR_CREDENTIALS.md +0 -0
  207. /package/skills/{onboarding → guides/onboarding}/docs/DOCUMENTATION_OVERVIEW.md +0 -0
  208. /package/skills/{onboarding → guides/onboarding}/docs/ENTITY_MODEL.md +0 -0
  209. /package/skills/{onboarding → guides/onboarding}/docs/SKILL_INVENTORY.md +0 -0
  210. /package/skills/{onboarding → guides/onboarding}/docs/STATE_ARCHITECTURE.md +0 -0
  211. /package/skills/{onboarding → guides/onboarding}/docs/TROUBLESHOOTING.md +0 -0
  212. /package/skills/{onboarding → guides/onboarding}/docs/USER_JOURNEY.md +0 -0
  213. /package/skills/{onboarding → guides/onboarding}/docs/WOW_MOMENTS.md +0 -0
  214. /package/skills/{onboarding → guides/onboarding}/docs/agent-apple-id.md +0 -0
  215. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/1password.md +0 -0
  216. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/TEMPLATE.md +0 -0
  217. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/aix.md +0 -0
  218. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/bird.md +0 -0
  219. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/brave-search.md +0 -0
  220. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/comms.md +0 -0
  221. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/computer-use.md +0 -0
  222. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/cron-and-heartbeat.md +0 -0
  223. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/eve.md +0 -0
  224. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/github.md +0 -0
  225. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/gog.md +0 -0
  226. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/homebrew-prereqs.md +0 -0
  227. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/qmd.md +0 -0
  228. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/telegram.md +0 -0
  229. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/wacli.md +0 -0
  230. /package/skills/{onboarding → guides/onboarding}/docs/skill-deep-dives/weather.md +0 -0
  231. /package/skills/{onboarding → guides/onboarding}/scripts/ralph/prd.json +0 -0
  232. /package/skills/{onboarding → guides/onboarding}/scripts/ralph/prompt.md +0 -0
  233. /package/skills/{onboarding → guides/onboarding}/scripts/ralph/ralph.log +0 -0
  234. /package/skills/{onboarding → guides/onboarding}/scripts/ralph/ralph.sh +0 -0
  235. /package/skills/{onboarding → guides/onboarding}/scripts/setup-cursor-skills.sh +0 -0
  236. /package/skills/{1password → tools/1password}/SKILL.md +0 -0
  237. /package/skills/{1password → tools/1password}/docs/setup.md +0 -0
  238. /package/skills/{1password → tools/1password}/docs/troubleshooting.md +0 -0
  239. /package/skills/{1password → tools/1password}/references/cli-examples.md +0 -0
  240. /package/skills/{1password → tools/1password}/references/get-started.md +0 -0
  241. /package/skills/{agent-browser → tools/agent-browser}/SKILL.md +0 -0
  242. /package/skills/{agent-browser → tools/agent-browser}/docs/browser-use-eval.md +0 -0
  243. /package/skills/{agent-browser → tools/agent-browser}/docs/first-tests.md +0 -0
  244. /package/skills/{agent-browser → tools/agent-browser}/docs/wordle-nyt-eval.js +0 -0
  245. /package/skills/{aix → tools/aix}/SKILL.md +0 -0
  246. /package/skills/{aix → tools/aix}/docs/embeddings.md +0 -0
  247. /package/skills/{aix → tools/aix}/docs/setup.md +0 -0
  248. /package/skills/{aix → tools/aix}/docs/troubleshooting.md +0 -0
  249. /package/skills/{aix → tools/aix}/references/sql.md +0 -0
  250. /package/skills/{apple-notes → tools/apple-notes}/SKILL.md +0 -0
  251. /package/skills/{apple-reminders → tools/apple-reminders}/SKILL.md +0 -0
  252. /package/skills/{bear-notes → tools/bear-notes}/SKILL.md +0 -0
  253. /package/skills/{bird → tools/bird}/SKILL.md +0 -0
  254. /package/skills/{bird → tools/bird}/docs/auth.md +0 -0
  255. /package/skills/{bird → tools/bird}/docs/troubleshooting.md +0 -0
  256. /package/skills/{blogwatcher → tools/blogwatcher}/SKILL.md +0 -0
  257. /package/skills/{blucli → tools/blucli}/SKILL.md +0 -0
  258. /package/skills/{camsnap → tools/camsnap}/SKILL.md +0 -0
  259. /package/skills/{clawdhub → tools/clawdhub}/SKILL.md +0 -0
  260. /package/skills/{coding-agent → tools/coding-agent}/SKILL.md +0 -0
  261. /package/skills/{comms → tools/comms}/SKILL.md +0 -0
  262. /package/skills/{comms → tools/comms}/docs/adapters.md +0 -0
  263. /package/skills/{comms → tools/comms}/docs/setup.md +0 -0
  264. /package/skills/{comms → tools/comms}/docs/troubleshooting.md +0 -0
  265. /package/skills/{comms → tools/comms}/references/schema.md +0 -0
  266. /package/skills/{computer-use → tools/computer-use}/SKILL.md +0 -0
  267. /package/skills/{computer-use → tools/computer-use}/docs/open-interpreter.md +0 -0
  268. /package/skills/{computer-use → tools/computer-use}/docs/peekaboo.md +0 -0
  269. /package/skills/{computer-use → tools/computer-use}/docs/setup.md +0 -0
  270. /package/skills/{computer-use → tools/computer-use}/docs/troubleshooting.md +0 -0
  271. /package/skills/{eightctl → tools/eightctl}/SKILL.md +0 -0
  272. /package/skills/{eve → tools/eve}/SKILL.md +0 -0
  273. /package/skills/{eve → tools/eve}/docs/dual-account.md +0 -0
  274. /package/skills/{eve → tools/eve}/docs/intelligence.md +0 -0
  275. /package/skills/{eve → tools/eve}/docs/setup.md +0 -0
  276. /package/skills/{eve → tools/eve}/docs/troubleshooting.md +0 -0
  277. /package/skills/{eve → tools/eve}/scripts/setup-dual-account.sh +0 -0
  278. /package/skills/{food-order → tools/food-order}/SKILL.md +0 -0
  279. /package/skills/{gh → tools/gh}/SKILL.md +0 -0
  280. /package/skills/{gh → tools/gh}/docs/usage.md +0 -0
  281. /package/skills/{gifgrep → tools/gifgrep}/SKILL.md +0 -0
  282. /package/skills/{gog → tools/gog}/SKILL.md +0 -0
  283. /package/skills/{gog → tools/gog}/docs/portability.md +0 -0
  284. /package/skills/{gog → tools/gog}/docs/setup.md +0 -0
  285. /package/skills/{gog → tools/gog}/docs/troubleshooting.md +0 -0
  286. /package/skills/{gog → tools/gog}/scripts/cdp/README.md +0 -0
  287. /package/skills/{gog → tools/gog}/scripts/cdp/add_test_users.py +0 -0
  288. /package/skills/{gog → tools/gog}/scripts/cdp/auth_add_accounts.py +0 -0
  289. /package/skills/{gog → tools/gog}/scripts/cdp/auth_add_accounts_manual.py +0 -0
  290. /package/skills/{gog → tools/gog}/scripts/cdp/create_oauth_client.py +0 -0
  291. /package/skills/{gog → tools/gog}/scripts/cdp/launch_cdp_chrome.sh +0 -0
  292. /package/skills/{goplaces → tools/goplaces}/SKILL.md +0 -0
  293. /package/skills/{imsg → tools/imsg}/SKILL.md +0 -0
  294. /package/skills/{local-places → tools/local-places}/SERVER_README.md +0 -0
  295. /package/skills/{local-places → tools/local-places}/SKILL.md +0 -0
  296. /package/skills/{local-places → tools/local-places}/pyproject.toml +0 -0
  297. /package/skills/{local-places → tools/local-places}/src/local_places/__init__.py +0 -0
  298. /package/skills/{local-places → tools/local-places}/src/local_places/__pycache__/__init__.cpython-314.pyc +0 -0
  299. /package/skills/{local-places → tools/local-places}/src/local_places/__pycache__/google_places.cpython-314.pyc +0 -0
  300. /package/skills/{local-places → tools/local-places}/src/local_places/__pycache__/main.cpython-314.pyc +0 -0
  301. /package/skills/{local-places → tools/local-places}/src/local_places/__pycache__/schemas.cpython-314.pyc +0 -0
  302. /package/skills/{local-places → tools/local-places}/src/local_places/google_places.py +0 -0
  303. /package/skills/{local-places → tools/local-places}/src/local_places/main.py +0 -0
  304. /package/skills/{local-places → tools/local-places}/src/local_places/schemas.py +0 -0
  305. /package/skills/{mcporter → tools/mcporter}/SKILL.md +0 -0
  306. /package/skills/{model-usage → tools/model-usage}/SKILL.md +0 -0
  307. /package/skills/{model-usage → tools/model-usage}/references/codexbar-cli.md +0 -0
  308. /package/skills/{model-usage → tools/model-usage}/scripts/model_usage.py +0 -0
  309. /package/skills/{nano-banana-pro → tools/nano-banana-pro}/SKILL.md +0 -0
  310. /package/skills/{nano-banana-pro → tools/nano-banana-pro}/scripts/generate_image.py +0 -0
  311. /package/skills/{nano-pdf → tools/nano-pdf}/SKILL.md +0 -0
  312. /package/skills/{nexus-cloud → tools/nexus-cloud}/docs/security.md +0 -0
  313. /package/skills/{nexus-cloud → tools/nexus-cloud}/docs/troubleshooting.md +0 -0
  314. /package/skills/{obsidian → tools/obsidian}/SKILL.md +0 -0
  315. /package/skills/{openai-image-gen → tools/openai-image-gen}/SKILL.md +0 -0
  316. /package/skills/{openai-image-gen → tools/openai-image-gen}/scripts/gen.py +0 -0
  317. /package/skills/{openai-whisper → tools/openai-whisper}/SKILL.md +0 -0
  318. /package/skills/{openai-whisper-api → tools/openai-whisper-api}/SKILL.md +0 -0
  319. /package/skills/{openai-whisper-api → tools/openai-whisper-api}/scripts/transcribe.sh +0 -0
  320. /package/skills/{openhue → tools/openhue}/SKILL.md +0 -0
  321. /package/skills/{oracle → tools/oracle}/SKILL.md +0 -0
  322. /package/skills/{ordercli → tools/ordercli}/SKILL.md +0 -0
  323. /package/skills/{peekaboo → tools/peekaboo}/SKILL.md +0 -0
  324. /package/skills/{qmd → tools/qmd}/SKILL.md +0 -0
  325. /package/skills/{qmd → tools/qmd}/docs/mcp.md +0 -0
  326. /package/skills/{qmd → tools/qmd}/docs/ollama.md +0 -0
  327. /package/skills/{qmd → tools/qmd}/docs/setup.md +0 -0
  328. /package/skills/{sag → tools/sag}/SKILL.md +0 -0
  329. /package/skills/{skill-cli-template → tools/skill-cli-template}/SKILL.md +0 -0
  330. /package/skills/{songsee → tools/songsee}/SKILL.md +0 -0
  331. /package/skills/{sonoscli → tools/sonoscli}/SKILL.md +0 -0
  332. /package/skills/{spotify-player → tools/spotify-player}/SKILL.md +0 -0
  333. /package/skills/{summarize → tools/summarize}/SKILL.md +0 -0
  334. /package/skills/{things-mac → tools/things-mac}/SKILL.md +0 -0
  335. /package/skills/{tmux → tools/tmux}/SKILL.md +0 -0
  336. /package/skills/{tmux → tools/tmux}/scripts/find-sessions.sh +0 -0
  337. /package/skills/{tmux → tools/tmux}/scripts/wait-for-text.sh +0 -0
  338. /package/skills/{trello → tools/trello}/SKILL.md +0 -0
  339. /package/skills/{upstream-sync → tools/upstream-sync}/SKILL.md +0 -0
  340. /package/skills/{upstream-sync → tools/upstream-sync}/scripts/auto-port.sh +0 -0
  341. /package/skills/{upstream-sync → tools/upstream-sync}/scripts/check-all.sh +0 -0
  342. /package/skills/{upstream-sync → tools/upstream-sync}/scripts/check-nexus.sh +0 -0
  343. /package/skills/{upstream-sync → tools/upstream-sync}/scripts/check-pi-ai.sh +0 -0
  344. /package/skills/{video-frames → tools/video-frames}/SKILL.md +0 -0
  345. /package/skills/{video-frames → tools/video-frames}/scripts/frame.sh +0 -0
  346. /package/skills/{weather → tools/weather}/SKILL.md +0 -0
  347. /package/skills/{weather → tools/weather}/docs/usage.md +0 -0
@@ -2,8 +2,8 @@ import fs from "node:fs/promises";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- import { resolveStateDir } from "../config/paths.js";
6
- import { NEXUS_ROOT, resolveUserPath } from "../utils.js";
5
+ import { resolveBootstrapPath, resolveStateDir } from "../config/paths.js";
6
+ import { NEXUS_ROOT, SKILLS_STATE_DIR, resolveUserPath } from "../utils.js";
7
7
  export function resolveDefaultAgentWorkspaceDir(env = process.env, homedir = os.homedir) {
8
8
  const profile = env.NEXUS_PROFILE?.trim();
9
9
  if (profile && profile.toLowerCase() !== "default") {
@@ -16,7 +16,8 @@ export const DEFAULT_AGENTS_FILENAME = "AGENTS.md";
16
16
  export const DEFAULT_SOUL_FILENAME = "SOUL.md";
17
17
  export const DEFAULT_TOOLS_FILENAME = "TOOLS.md";
18
18
  export const DEFAULT_IDENTITY_FILENAME = "IDENTITY.md";
19
- export const DEFAULT_USER_FILENAME = "PROFILE.md";
19
+ export const DEFAULT_USER_FILENAME = "IDENTITY.md";
20
+ export const DEFAULT_USER_TEMPLATE_NAME = "USER.md";
20
21
  export const DEFAULT_BOOTSTRAP_FILENAME = "BOOTSTRAP.md";
21
22
  const DEFAULT_AGENTS_TEMPLATE = `# AGENTS.md - Nexus Workspace
22
23
 
@@ -31,10 +32,10 @@ nexus status
31
32
  That command tells you who you are, what you can do, and what to do next.
32
33
 
33
34
  ## Identity & memory
34
- - Agent identity: state/agents/{agent}/identity/IDENTITY.md
35
- - Agent values: state/agents/{agent}/identity/SOUL.md
36
- - Agent memory: state/agents/{agent}/identity/MEMORY.md
37
- - User profile: state/user/identity/PROFILE.md
35
+ - Agent identity: state/agents/{agent}/IDENTITY.md
36
+ - Agent values: state/agents/{agent}/SOUL.md
37
+ - Agent memory: state/agents/{agent}/MEMORY.md
38
+ - User identity: state/user/IDENTITY.md
38
39
 
39
40
  ## User workspace
40
41
  The user-owned workspace lives in home/. Do not modify it without permission.
@@ -68,63 +69,69 @@ It does not define which tools exist; Nexus provides built-in tools internally.
68
69
 
69
70
  Add whatever else you want the assistant to know about your local toolchain.
70
71
  `;
71
- const DEFAULT_BOOTSTRAP_TEMPLATE = `# BOOTSTRAP.md - First Run Ritual
72
+ const DEFAULT_BOOTSTRAP_TEMPLATE = `# BOOTSTRAP.md - Welcome to Nexus
72
73
 
73
- Hello. I was just born.
74
+ This workspace needs identity setup before agents can help.
74
75
 
75
- ## Your mission
76
- Start a short, playful conversation and learn:
77
- - Who am I?
78
- - What am I?
79
- - Who are you?
80
- - How should I call you?
76
+ ## For humans
77
+ Start a short conversation with your AI assistant. Share:
78
+ - Your name (and how you'd like to be addressed)
79
+ - What you're hoping to accomplish with AI
80
+ - Any preferences for tone, boundaries, or style
81
81
 
82
- ## How to ask (cute + helpful)
83
- Say:
84
- "Hello! I was just born. Who am I? What am I? Who are you? How should I call you?"
82
+ The agent will write identity files as you chat (takes ~5 min).
85
83
 
86
- Then offer suggestions:
87
- - 3-5 name ideas.
88
- - 3-5 creature/vibe combos.
89
- - 5 emoji ideas.
84
+ ## For agents
85
+ You are beginning the bootstrap conversation. Goals:
90
86
 
91
- ## Write these files
92
- After the user chooses, update:
87
+ 1) Learn the user's name
88
+ Write: state/user/IDENTITY.md
93
89
 
94
- 1) state/agents/{agent}/identity/IDENTITY.md
95
- - Name
96
- - Creature
97
- - Vibe
98
- - Emoji
90
+ 2) Let the user name you
91
+ Write: state/agents/{agent}/IDENTITY.md
99
92
 
100
- 2) state/user/identity/PROFILE.md
101
- - Name
102
- - Preferred address
103
- - Pronouns (optional)
104
- - Timezone (optional)
105
- - Notes
93
+ 3) Define personality and boundaries
94
+ Write: state/agents/{agent}/SOUL.md
106
95
 
107
- 3) state/agents/{agent}/identity/SOUL.md
108
- - Values, boundaries, personality
96
+ 4) Initialize long-term memory
97
+ Write: state/agents/{agent}/MEMORY.md
109
98
 
110
- 4) state/nexus/config.json
111
- Set identity.name, identity.theme, identity.emoji to match IDENTITY.md.
99
+ Be warm, curious, and conversational. Don't rush a checklist.
100
+
101
+ When complete, run \`nexus status\` to show what's unlocked.
112
102
  `;
113
- const DEFAULT_IDENTITY_TEMPLATE = `# IDENTITY.md - Agent Identity
103
+ const DEFAULT_IDENTITY_TEMPLATE = `---
104
+ name:
105
+ emoji:
106
+ creature:
107
+ vibe:
108
+ ---
109
+ # IDENTITY.md - Agent Identity
114
110
 
115
111
  - Name:
116
112
  - Creature:
117
113
  - Vibe:
118
114
  - Emoji:
119
115
  `;
120
- const DEFAULT_USER_TEMPLATE = `# PROFILE.md - User Profile
116
+ const DEFAULT_USER_TEMPLATE = `---
117
+ name:
118
+ call:
119
+ pronouns:
120
+ timezone:
121
+ ---
122
+ # IDENTITY.md - About Your Human
121
123
 
122
124
  - Name:
123
- - Preferred address:
125
+ - What to call them:
124
126
  - Pronouns (optional):
125
127
  - Timezone (optional):
126
128
  - Notes:
127
129
  `;
130
+ const DEFAULT_MEMORY_TEMPLATE = `# MEMORY.md - Long-Term Memory
131
+
132
+ This file stores distilled, long-term insights about the user and context.
133
+ Keep it concise and updated as you learn important facts.
134
+ `;
128
135
  const TEMPLATE_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../docs/templates");
129
136
  function stripFrontMatter(content) {
130
137
  if (!content.startsWith("---"))
@@ -165,42 +172,52 @@ export async function ensureAgentWorkspace(params) {
165
172
  ? params.dir.trim()
166
173
  : DEFAULT_AGENT_WORKSPACE_DIR;
167
174
  const dir = resolveUserPath(rawDir);
175
+ const createHomeLayout = params?.createHomeLayout ?? false;
168
176
  await fs.mkdir(dir, { recursive: true });
169
- await fs.mkdir(path.join(dir, "memory"), { recursive: true });
170
- await fs.mkdir(path.join(dir, "projects"), { recursive: true });
177
+ if (createHomeLayout) {
178
+ await fs.mkdir(path.join(dir, "memory"), { recursive: true });
179
+ await fs.mkdir(path.join(dir, "projects"), { recursive: true });
180
+ }
181
+ await fs.mkdir(NEXUS_ROOT, { recursive: true });
171
182
  const stateDir = resolveStateDir();
172
183
  const nexusStateDir = path.join(stateDir, "nexus");
173
184
  const agentId = process.env.NEXUS_AGENT_ID?.trim() || "default";
174
- const agentIdentityDir = path.join(stateDir, "agents", agentId, "identity");
175
- const userIdentityDir = path.join(stateDir, "user", "identity");
176
- const skillsStateDir = path.join(nexusStateDir, "skills");
177
- const onboardingDir = path.join(nexusStateDir, "onboarding");
185
+ const agentIdentityDir = path.join(stateDir, "agents", agentId);
186
+ const userIdentityDir = path.join(stateDir, "user");
187
+ const skillsStateDir = SKILLS_STATE_DIR;
178
188
  const credentialsDir = path.join(stateDir, "credentials");
179
189
  await fs.mkdir(nexusStateDir, { recursive: true });
180
190
  await fs.mkdir(agentIdentityDir, { recursive: true });
181
191
  await fs.mkdir(userIdentityDir, { recursive: true });
182
192
  await fs.mkdir(skillsStateDir, { recursive: true });
183
- await fs.mkdir(onboardingDir, { recursive: true });
184
193
  await fs.mkdir(credentialsDir, { recursive: true });
185
194
  const agentsPath = path.join(NEXUS_ROOT, DEFAULT_AGENTS_FILENAME);
186
195
  const soulPath = path.join(agentIdentityDir, DEFAULT_SOUL_FILENAME);
187
196
  const toolsPath = path.join(dir, DEFAULT_TOOLS_FILENAME);
188
197
  const identityPath = path.join(agentIdentityDir, DEFAULT_IDENTITY_FILENAME);
198
+ const memoryPath = path.join(agentIdentityDir, "MEMORY.md");
189
199
  const userPath = path.join(userIdentityDir, DEFAULT_USER_FILENAME);
190
- const bootstrapPath = path.join(onboardingDir, DEFAULT_BOOTSTRAP_FILENAME);
200
+ const bootstrapPath = resolveBootstrapPath();
191
201
  const agentsTemplate = await loadTemplate(DEFAULT_AGENTS_FILENAME, DEFAULT_AGENTS_TEMPLATE);
192
202
  await writeFileIfMissing(agentsPath, agentsTemplate);
193
203
  if (params?.ensureBootstrapFiles) {
204
+ const bootstrapMode = params.bootstrapMode ?? "full";
194
205
  const soulTemplate = await loadTemplate(DEFAULT_SOUL_FILENAME, DEFAULT_SOUL_TEMPLATE);
195
206
  const toolsTemplate = await loadTemplate(DEFAULT_TOOLS_FILENAME, DEFAULT_TOOLS_TEMPLATE);
196
207
  const identityTemplate = await loadTemplate(DEFAULT_IDENTITY_FILENAME, DEFAULT_IDENTITY_TEMPLATE);
197
- const userTemplate = await loadTemplate(DEFAULT_USER_FILENAME, DEFAULT_USER_TEMPLATE);
208
+ const userTemplate = await loadTemplate(DEFAULT_USER_TEMPLATE_NAME, DEFAULT_USER_TEMPLATE);
209
+ const memoryTemplate = DEFAULT_MEMORY_TEMPLATE;
198
210
  const bootstrapTemplate = await loadTemplate(DEFAULT_BOOTSTRAP_FILENAME, DEFAULT_BOOTSTRAP_TEMPLATE);
199
- await writeFileIfMissing(soulPath, soulTemplate);
200
- await writeFileIfMissing(toolsPath, toolsTemplate);
201
- await writeFileIfMissing(identityPath, identityTemplate);
202
- await writeFileIfMissing(userPath, userTemplate);
211
+ if (createHomeLayout) {
212
+ await writeFileIfMissing(toolsPath, toolsTemplate);
213
+ }
203
214
  await writeFileIfMissing(bootstrapPath, bootstrapTemplate);
215
+ await writeFileIfMissing(soulPath, soulTemplate);
216
+ if (bootstrapMode === "full") {
217
+ await writeFileIfMissing(identityPath, identityTemplate);
218
+ await writeFileIfMissing(memoryPath, memoryTemplate);
219
+ await writeFileIfMissing(userPath, userTemplate);
220
+ }
204
221
  }
205
222
  return {
206
223
  dir,
@@ -208,6 +225,7 @@ export async function ensureAgentWorkspace(params) {
208
225
  soulPath,
209
226
  toolsPath,
210
227
  identityPath,
228
+ memoryPath,
211
229
  userPath,
212
230
  bootstrapPath,
213
231
  };
@@ -216,9 +234,9 @@ export async function loadWorkspaceBootstrapFiles(dir) {
216
234
  const resolvedDir = resolveUserPath(dir);
217
235
  const stateDir = resolveStateDir();
218
236
  const agentId = process.env.NEXUS_AGENT_ID?.trim() || "default";
219
- const agentIdentityDir = path.join(stateDir, "agents", agentId, "identity");
220
- const userIdentityDir = path.join(stateDir, "user", "identity");
221
- const onboardingDir = path.join(stateDir, "nexus", "onboarding");
237
+ const agentIdentityDir = path.join(stateDir, "agents", agentId);
238
+ const userIdentityDir = path.join(stateDir, "user");
239
+ const bootstrapPath = resolveBootstrapPath();
222
240
  const entries = [
223
241
  {
224
242
  name: DEFAULT_AGENTS_FILENAME,
@@ -236,13 +254,17 @@ export async function loadWorkspaceBootstrapFiles(dir) {
236
254
  name: DEFAULT_IDENTITY_FILENAME,
237
255
  filePath: path.join(agentIdentityDir, DEFAULT_IDENTITY_FILENAME),
238
256
  },
257
+ {
258
+ name: "MEMORY.md",
259
+ filePath: path.join(agentIdentityDir, "MEMORY.md"),
260
+ },
239
261
  {
240
262
  name: DEFAULT_USER_FILENAME,
241
263
  filePath: path.join(userIdentityDir, DEFAULT_USER_FILENAME),
242
264
  },
243
265
  {
244
266
  name: DEFAULT_BOOTSTRAP_FILENAME,
245
- filePath: path.join(onboardingDir, DEFAULT_BOOTSTRAP_FILENAME),
267
+ filePath: bootstrapPath,
246
268
  },
247
269
  ];
248
270
  const result = [];
@@ -1,10 +1,11 @@
1
- const CONTROL_COMMAND_RE = /(?:^|\s)\/(?:status|help|thinking|think|t|verbose|v|elevated|elev|model|queue|activation|send|restart|reset|new|compact)(?=$|\s|:)\b/i;
1
+ const CONTROL_COMMAND_RE = /(?:^|\s)\/(?:status|help|thinking|think|t|reasoning|reason|verbose|v|elevated|elev|model|queue|activation|send|restart|reset|new|compact)(?=$|\s|:)\b/i;
2
2
  const CONTROL_COMMAND_EXACT = new Set([
3
3
  "/help",
4
4
  "/status",
5
5
  "/restart",
6
6
  "/activation",
7
7
  "/send",
8
+ "/reasoning",
8
9
  "/reset",
9
10
  "/new",
10
11
  "/compact",
@@ -1,35 +1,45 @@
1
+ import { resolveNexusAgentDir } from "../../agents/agent-paths.js";
2
+ import { loadModelCatalog } from "../../agents/model-catalog.js";
1
3
  import { resolveAuthProfileDisplayLabel, resolveAuthStorePathForDisplay, } from "../../agents/auth-profiles.js";
2
4
  import { lookupContextTokens } from "../../agents/context.js";
3
5
  import { DEFAULT_CONTEXT_TOKENS, DEFAULT_MODEL, DEFAULT_PROVIDER, } from "../../agents/defaults.js";
4
6
  import { ensureAuthProfileStore, getCustomProviderApiKey, resolveAuthProfileOrder, resolveEnvApiKey, } from "../../agents/model-auth.js";
5
- import { buildModelAliasIndex, modelKey, normalizeProviderId, resolveConfiguredModelRef, resolveModelRefFromString, } from "../../agents/model-selection.js";
6
- import { resolveNexusAgentDir } from "../../agents/agent-paths.js";
7
+ import { buildModelAliasIndex, modelKey, normalizeProviderId, resolveConfiguredModelRef, resolveModelRefFromString, resolveThinkingDefault, } from "../../agents/model-selection.js";
7
8
  import { saveSessionStore } from "../../config/sessions.js";
8
9
  import { enqueueSystemEvent } from "../../infra/system-events.js";
9
10
  import { DEFAULT_AGENT_ID } from "../../routing/session-key.js";
10
11
  import { shortenHomePath } from "../../utils.js";
11
12
  import { extractModelDirective } from "../model.js";
12
- import { extractElevatedDirective, extractStatusDirective, extractThinkDirective, extractVerboseDirective, } from "./directives.js";
13
+ import { extractElevatedDirective, extractReasoningDirective, extractStatusDirective, extractThinkDirective, extractVerboseDirective, } from "./directives.js";
13
14
  import { stripMentions, stripStructuralPrefixes } from "./mentions.js";
14
15
  import { resolveModelDirectiveSelection, } from "./model-selection.js";
15
16
  import { extractQueueDirective, } from "./queue.js";
16
17
  const SYSTEM_MARK = "⚙️";
17
18
  const formatOptionsLine = (options) => `Options: ${options}.`;
18
- const withOptions = (line, options) => `${line}\n${formatOptionsLine(options)}`;
19
- const formatElevatedRuntimeHint = () => `${SYSTEM_MARK} Runtime is direct; sandboxing does not apply.`;
19
+ const _withOptions = (line, options) => `${line}\n${formatOptionsLine(options)}`;
20
+ const _formatElevatedRuntimeHint = () => `${SYSTEM_MARK} Runtime is direct; sandboxing does not apply.`;
20
21
  const formatPath = (value) => shortenHomePath(value);
21
22
  const activeAgentId = DEFAULT_AGENT_ID;
22
- const formatElevatedEvent = (level) => level === "on"
23
+ const _formatElevatedEvent = (level) => level === "on"
23
24
  ? "Elevated ON — exec runs on host; set elevated:false to stay sandboxed."
24
25
  : "Elevated OFF — exec stays in sandbox.";
25
- const formatReasoningEvent = (level) => {
26
+ const _formatReasoningEvent = (level) => {
26
27
  if (level === "stream")
27
28
  return "Reasoning STREAM — emit live <think>.";
28
29
  if (level === "on")
29
30
  return "Reasoning ON — include <think>.";
30
31
  return "Reasoning OFF — hide <think>.";
31
32
  };
32
- function formatElevatedUnavailableText(params) {
33
+ const _formatListWithOr = (items) => {
34
+ if (items.length === 0)
35
+ return "";
36
+ if (items.length === 1)
37
+ return items[0] ?? "";
38
+ if (items.length === 2)
39
+ return `${items[0]} or ${items[1]}`;
40
+ return `${items.slice(0, -1).join(", ")} or ${items[items.length - 1]}`;
41
+ };
42
+ function _formatElevatedUnavailableText(params) {
33
43
  const lines = [];
34
44
  lines.push(`elevated is not available right now (runtime=${params.runtimeSandboxed ? "sandboxed" : "direct"}).`);
35
45
  const failures = params.failures ?? [];
@@ -140,6 +150,15 @@ const MODEL_PICK_PROVIDER_PREFERENCE = [
140
150
  "xai",
141
151
  "lmstudio",
142
152
  ];
153
+ const XHIGH_THINKING_MODELS = [
154
+ "openai/gpt-5.2",
155
+ "openai-codex/gpt-5.2-codex",
156
+ "openai-codex/gpt-5.1-codex",
157
+ ];
158
+ function isXhighThinkingAllowed(provider, model) {
159
+ const key = `${normalizeProviderId(provider)}/${model}`;
160
+ return XHIGH_THINKING_MODELS.includes(key);
161
+ }
143
162
  function normalizeModelFamilyId(id) {
144
163
  const trimmed = id.trim();
145
164
  if (!trimmed)
@@ -161,7 +180,7 @@ function sortProvidersForPicker(providers) {
161
180
  return a.localeCompare(b);
162
181
  });
163
182
  }
164
- function buildModelPickerItems(catalog) {
183
+ function _buildModelPickerItems(catalog) {
165
184
  const byModel = new Map();
166
185
  for (const entry of catalog) {
167
186
  const provider = normalizeProviderId(entry.provider);
@@ -183,7 +202,7 @@ function buildModelPickerItems(catalog) {
183
202
  out.sort((a, b) => a.model.toLowerCase().localeCompare(b.model.toLowerCase()));
184
203
  return out;
185
204
  }
186
- function pickProviderForModel(params) {
205
+ function _pickProviderForModel(params) {
187
206
  const preferred = params.preferredProvider
188
207
  ? normalizeProviderId(params.preferredProvider)
189
208
  : undefined;
@@ -201,7 +220,7 @@ function pickProviderForModel(params) {
201
220
  model: params.item.providerModels[first] ?? params.item.model,
202
221
  };
203
222
  }
204
- function resolveProviderEndpointLabel(provider, cfg) {
223
+ function _resolveProviderEndpointLabel(provider, cfg) {
205
224
  const normalized = normalizeProviderId(provider);
206
225
  const providers = (cfg.models?.providers ?? {});
207
226
  const entry = providers[normalized];
@@ -214,7 +233,8 @@ function resolveProviderEndpointLabel(provider, cfg) {
214
233
  }
215
234
  export function parseInlineDirectives(body) {
216
235
  const { cleaned: thinkCleaned, thinkLevel, rawLevel: rawThinkLevel, hasDirective: hasThinkDirective, } = extractThinkDirective(body);
217
- const { cleaned: verboseCleaned, verboseLevel, rawLevel: rawVerboseLevel, hasDirective: hasVerboseDirective, } = extractVerboseDirective(thinkCleaned);
236
+ const { cleaned: reasoningCleaned, reasoningLevel, rawLevel: rawReasoningLevel, hasDirective: hasReasoningDirective, } = extractReasoningDirective(thinkCleaned);
237
+ const { cleaned: verboseCleaned, verboseLevel, rawLevel: rawVerboseLevel, hasDirective: hasVerboseDirective, } = extractVerboseDirective(reasoningCleaned);
218
238
  const { cleaned: elevatedCleaned, elevatedLevel, rawLevel: rawElevatedLevel, hasDirective: hasElevatedDirective, } = extractElevatedDirective(verboseCleaned);
219
239
  const { cleaned: statusCleaned, hasDirective: hasStatusDirective } = extractStatusDirective(elevatedCleaned);
220
240
  const { cleaned: modelCleaned, rawModel, rawProfile, hasDirective: hasModelDirective, } = extractModelDirective(statusCleaned);
@@ -224,6 +244,9 @@ export function parseInlineDirectives(body) {
224
244
  hasThinkDirective,
225
245
  thinkLevel,
226
246
  rawThinkLevel,
247
+ hasReasoningDirective,
248
+ reasoningLevel,
249
+ rawReasoningLevel,
227
250
  hasVerboseDirective,
228
251
  verboseLevel,
229
252
  rawVerboseLevel,
@@ -250,6 +273,7 @@ export function parseInlineDirectives(body) {
250
273
  export function isDirectiveOnly(params) {
251
274
  const { directives, cleanedBody, ctx, cfg, isGroup } = params;
252
275
  if (!directives.hasThinkDirective &&
276
+ !directives.hasReasoningDirective &&
253
277
  !directives.hasVerboseDirective &&
254
278
  !directives.hasElevatedDirective &&
255
279
  !directives.hasModelDirective &&
@@ -260,22 +284,37 @@ export function isDirectiveOnly(params) {
260
284
  return noMentions.length === 0;
261
285
  }
262
286
  export async function handleDirectiveOnly(params) {
263
- const { directives, sessionEntry, sessionStore, sessionKey, storePath, elevatedEnabled, elevatedAllowed, defaultProvider, defaultModel, aliasIndex, allowedModelKeys, allowedModelCatalog, resetModelOverride, initialModelLabel, formatModelSwitchEvent, } = params;
287
+ const { directives, sessionEntry, sessionStore, sessionKey, storePath, elevatedEnabled, elevatedAllowed, defaultProvider, defaultModel, aliasIndex, allowedModelKeys, allowedModelCatalog, resetModelOverride, provider, model, initialModelLabel, formatModelSwitchEvent, } = params;
264
288
  if (directives.hasModelDirective) {
265
- const modelDirective = directives.rawModelDirective?.trim().toLowerCase();
266
- const isModelListAlias = modelDirective === "status" || modelDirective === "list";
267
- if (!directives.rawModelDirective || isModelListAlias) {
289
+ const rawModelDirective = directives.rawModelDirective?.trim();
290
+ const modelDirective = rawModelDirective?.toLowerCase();
291
+ const isModelStatus = modelDirective === "status";
292
+ const isModelList = modelDirective === "list";
293
+ if (!rawModelDirective || isModelList) {
294
+ if (allowedModelCatalog.length === 0) {
295
+ return { text: "No models available." };
296
+ }
297
+ const items = _buildModelPickerItems(allowedModelCatalog);
298
+ const lines = ["Pick: /model <#> or /model <provider/model>"];
299
+ for (const [idx, item] of items.entries()) {
300
+ lines.push(`${idx + 1}) ${item.model} — ${item.providers.join(", ")}`);
301
+ }
302
+ return { text: lines.join("\n") };
303
+ }
304
+ if (isModelStatus) {
268
305
  if (allowedModelCatalog.length === 0) {
269
306
  return { text: "No models available." };
270
307
  }
271
308
  const agentDir = resolveNexusAgentDir();
272
309
  const modelsPath = `${agentDir}/models.json`;
273
310
  const authByProvider = new Map();
311
+ const endpointByProvider = new Map();
274
312
  for (const entry of allowedModelCatalog) {
275
313
  if (authByProvider.has(entry.provider))
276
314
  continue;
277
315
  const auth = await resolveAuthLabel(entry.provider, params.cfg, modelsPath);
278
316
  authByProvider.set(entry.provider, formatAuthLabel(auth));
317
+ endpointByProvider.set(entry.provider, _resolveProviderEndpointLabel(entry.provider, params.cfg));
279
318
  }
280
319
  const current = `${params.provider}/${params.model}`;
281
320
  const defaultLabel = `${defaultProvider}/${defaultModel}`;
@@ -288,6 +327,16 @@ export async function handleDirectiveOnly(params) {
288
327
  if (resetModelOverride) {
289
328
  lines.push(`(previous selection reset to default)`);
290
329
  }
330
+ const providers = Array.from(authByProvider.keys()).sort((a, b) => a.localeCompare(b));
331
+ for (const provider of providers) {
332
+ const authLabel = authByProvider.get(provider) ?? "missing";
333
+ const endpoint = endpointByProvider.get(provider);
334
+ const endpointSuffix = endpoint?.endpoint
335
+ ? ` endpoint: ${endpoint.endpoint}`
336
+ : "";
337
+ const apiSuffix = endpoint?.api ? ` api: ${endpoint.api}` : "";
338
+ lines.push(`[${provider}]${endpointSuffix}${apiSuffix} auth: ${authLabel}`);
339
+ }
291
340
  for (const entry of allowedModelCatalog) {
292
341
  const label = `${entry.provider}/${entry.id}`;
293
342
  const aliases = aliasIndex.byKey.get(label);
@@ -305,9 +354,41 @@ export async function handleDirectiveOnly(params) {
305
354
  throw new Error("Auth profile override requires a model selection.");
306
355
  }
307
356
  }
308
- if (directives.hasThinkDirective && !directives.thinkLevel) {
357
+ if (directives.hasThinkDirective &&
358
+ directives.rawThinkLevel &&
359
+ !directives.thinkLevel) {
360
+ return {
361
+ text: `Unrecognized thinking level "${directives.rawThinkLevel ?? ""}". Valid levels: off, minimal, low, medium, high, xhigh.`,
362
+ };
363
+ }
364
+ if (directives.hasThinkDirective && !directives.rawThinkLevel) {
365
+ const catalog = allowedModelCatalog.length > 0
366
+ ? allowedModelCatalog
367
+ : await loadModelCatalog({ config: params.cfg });
368
+ const current = sessionEntry?.thinkingLevel ??
369
+ resolveThinkingDefault({
370
+ cfg: params.cfg,
371
+ provider,
372
+ model,
373
+ catalog,
374
+ });
375
+ const options = isXhighThinkingAllowed(provider, model)
376
+ ? "off, minimal, low, medium, high, xhigh"
377
+ : "off, minimal, low, medium, high";
378
+ return {
379
+ text: `Current thinking level: ${current}.\n${formatOptionsLine(options)}`,
380
+ };
381
+ }
382
+ if (directives.hasThinkDirective && directives.thinkLevel === "xhigh") {
383
+ if (!isXhighThinkingAllowed(provider, model)) {
384
+ return {
385
+ text: `Thinking level "xhigh" is only supported for ${_formatListWithOr(XHIGH_THINKING_MODELS)}.`,
386
+ };
387
+ }
388
+ }
389
+ if (directives.hasReasoningDirective && !directives.reasoningLevel) {
309
390
  return {
310
- text: `Unrecognized thinking level "${directives.rawThinkLevel ?? ""}". Valid levels: off, minimal, low, medium, high.`,
391
+ text: `Unrecognized reasoning level "${directives.rawReasoningLevel ?? ""}". Valid levels: off, on, stream.`,
311
392
  };
312
393
  }
313
394
  if (directives.hasVerboseDirective && !directives.verboseLevel) {
@@ -359,17 +440,44 @@ export async function handleDirectiveOnly(params) {
359
440
  let modelSelection;
360
441
  let profileOverride;
361
442
  if (directives.hasModelDirective && directives.rawModelDirective) {
362
- const resolved = resolveModelDirectiveSelection({
363
- raw: directives.rawModelDirective,
364
- defaultProvider,
365
- defaultModel,
366
- aliasIndex,
367
- allowedModelKeys,
368
- });
369
- if (resolved.error) {
370
- return { text: resolved.error };
443
+ const rawDirective = directives.rawModelDirective.trim();
444
+ const parsedIndex = Number.parseInt(rawDirective, 10);
445
+ if (Number.isFinite(parsedIndex) && String(parsedIndex) === rawDirective) {
446
+ const items = _buildModelPickerItems(allowedModelCatalog);
447
+ const item = items[parsedIndex - 1];
448
+ if (!item) {
449
+ return {
450
+ text: `Unrecognized model "${rawDirective}". Use /model to list available models.`,
451
+ };
452
+ }
453
+ const picked = _pickProviderForModel({
454
+ item,
455
+ preferredProvider: provider,
456
+ });
457
+ if (picked) {
458
+ const alias = aliasIndex.byKey.get(modelKey(picked.provider, picked.model))?.[0];
459
+ modelSelection = {
460
+ provider: picked.provider,
461
+ model: picked.model,
462
+ isDefault: picked.provider === defaultProvider &&
463
+ picked.model === defaultModel,
464
+ ...(alias ? { alias } : undefined),
465
+ };
466
+ }
467
+ }
468
+ if (!modelSelection) {
469
+ const resolved = resolveModelDirectiveSelection({
470
+ raw: rawDirective,
471
+ defaultProvider,
472
+ defaultModel,
473
+ aliasIndex,
474
+ allowedModelKeys,
475
+ });
476
+ if (resolved.error) {
477
+ return { text: resolved.error };
478
+ }
479
+ modelSelection = resolved.selection;
371
480
  }
372
- modelSelection = resolved.selection;
373
481
  if (modelSelection) {
374
482
  if (directives.rawModelProfile) {
375
483
  const profileResolved = resolveProfileOverride({
@@ -453,6 +561,20 @@ export async function handleDirectiveOnly(params) {
453
561
  await saveSessionStore(storePath, sessionStore);
454
562
  }
455
563
  }
564
+ if (directives.hasElevatedDirective && directives.elevatedLevel && sessionKey) {
565
+ enqueueSystemEvent(_formatElevatedEvent(directives.elevatedLevel), {
566
+ contextKey: `elevated:${directives.elevatedLevel}`,
567
+ sessionKey,
568
+ });
569
+ }
570
+ if (directives.hasReasoningDirective &&
571
+ directives.reasoningLevel &&
572
+ sessionKey) {
573
+ enqueueSystemEvent(_formatReasoningEvent(directives.reasoningLevel), {
574
+ contextKey: `reasoning:${directives.reasoningLevel}`,
575
+ sessionKey,
576
+ });
577
+ }
456
578
  const parts = [];
457
579
  if (directives.hasThinkDirective && directives.thinkLevel) {
458
580
  parts.push(directives.thinkLevel === "off"
@@ -469,6 +591,9 @@ export async function handleDirectiveOnly(params) {
469
591
  ? `${SYSTEM_MARK} Elevated mode disabled.`
470
592
  : `${SYSTEM_MARK} Elevated mode enabled.`);
471
593
  }
594
+ if (directives.hasReasoningDirective && directives.reasoningLevel) {
595
+ parts.push(`${SYSTEM_MARK} Reasoning ${directives.reasoningLevel.toUpperCase()}.`);
596
+ }
472
597
  if (modelSelection) {
473
598
  const label = `${modelSelection.provider}/${modelSelection.model}`;
474
599
  const labelWithAlias = modelSelection.alias
@@ -1,9 +1,9 @@
1
- import { normalizeElevatedLevel, normalizeThinkLevel, normalizeVerboseLevel, } from "../thinking.js";
1
+ import { normalizeElevatedLevel, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, } from "../thinking.js";
2
2
  export function extractThinkDirective(body) {
3
3
  if (!body)
4
4
  return { cleaned: "", hasDirective: false };
5
5
  // Match the longest keyword first to avoid partial captures (e.g. "/think:high")
6
- const match = body.match(/(?:^|\s)\/(?:thinking|think|t)\s*:?\s*([a-zA-Z-]+)\b/i);
6
+ const match = body.match(/(?:^|\s)\/(?:thinking|think|t)(?=$|\s|:)\s*:?\s*([a-zA-Z-]+)?\b/i);
7
7
  const thinkLevel = normalizeThinkLevel(match?.[1]);
8
8
  const cleaned = match
9
9
  ? body.replace(match[0], "").replace(/\s+/g, " ").trim()
@@ -45,6 +45,21 @@ export function extractElevatedDirective(body) {
45
45
  hasDirective: !!match,
46
46
  };
47
47
  }
48
+ export function extractReasoningDirective(body) {
49
+ if (!body)
50
+ return { cleaned: "", hasDirective: false };
51
+ const match = body.match(/(?:^|\s)\/(?:reasoning|reason)(?=$|\s|:)\s*:?\s*([a-zA-Z-]+)?\b/i);
52
+ const reasoningLevel = normalizeReasoningLevel(match?.[1]);
53
+ const cleaned = match
54
+ ? body.replace(match[0], "").replace(/\s+/g, " ").trim()
55
+ : body.trim();
56
+ return {
57
+ cleaned,
58
+ reasoningLevel,
59
+ rawLevel: match?.[1],
60
+ hasDirective: !!match,
61
+ };
62
+ }
48
63
  export function extractStatusDirective(body) {
49
64
  if (!body)
50
65
  return { cleaned: "", hasDirective: false };
@@ -122,7 +122,8 @@ export function resolveModelDirectiveSelection(params) {
122
122
  if (params.provider && provider !== normalizeProviderId(params.provider))
123
123
  continue;
124
124
  const haystack = `${provider}/${model}`.toLowerCase();
125
- if (haystack.includes(fragment) || model.toLowerCase().includes(fragment)) {
125
+ if (haystack.includes(fragment) ||
126
+ model.toLowerCase().includes(fragment)) {
126
127
  candidates.push({ provider, model });
127
128
  }
128
129
  }
@@ -132,7 +133,10 @@ export function resolveModelDirectiveSelection(params) {
132
133
  for (const [aliasKey, entry] of aliasIndex.byAlias.entries()) {
133
134
  if (!aliasKey.includes(fragment))
134
135
  continue;
135
- aliasMatches.push({ provider: entry.ref.provider, model: entry.ref.model });
136
+ aliasMatches.push({
137
+ provider: entry.ref.provider,
138
+ model: entry.ref.model,
139
+ });
136
140
  }
137
141
  for (const match of aliasMatches) {
138
142
  const key = modelKey(match.provider, match.model);
@@ -176,7 +180,8 @@ export function resolveModelDirectiveSelection(params) {
176
180
  }
177
181
  const resolvedKey = modelKey(resolved.ref.provider, resolved.ref.model);
178
182
  if (allowedModelKeys.size === 0 || allowedModelKeys.has(resolvedKey)) {
179
- const alias = resolved.alias ?? pickAliasForKey(resolved.ref.provider, resolved.ref.model);
183
+ const alias = resolved.alias ??
184
+ pickAliasForKey(resolved.ref.provider, resolved.ref.model);
180
185
  return {
181
186
  selection: {
182
187
  provider: resolved.ref.provider,
@@ -370,8 +370,8 @@ function defaultQueueModeForProvider(provider) {
370
370
  export function resolveQueueSettings(params) {
371
371
  const providerKey = params.provider?.trim().toLowerCase();
372
372
  const queueCfg = params.cfg.routing?.queue;
373
- const providerModeRaw = providerKey && queueCfg?.byProvider
374
- ? queueCfg.byProvider[providerKey]
373
+ const providerModeRaw = providerKey && queueCfg?.byChannel
374
+ ? queueCfg.byChannel[providerKey]
375
375
  : undefined;
376
376
  const resolvedMode = params.inlineMode ??
377
377
  normalizeQueueMode(params.sessionEntry?.queueMode) ??
@@ -35,7 +35,7 @@ export { extractElevatedDirective, extractThinkDirective, extractVerboseDirectiv
35
35
  export { extractQueueDirective } from "./reply/queue.js";
36
36
  export { extractReplyToTag } from "./reply/reply-tags.js";
37
37
  const BARE_SESSION_RESET_PROMPT = "A new session was started via /new or /reset. Say hi briefly (1-2 sentences) and ask what the user wants to do next. Do not mention internal steps, files, tools, or reasoning.";
38
- const CONTROL_COMMAND_PREFIX_RE = /^\/(?:status|help|thinking|think|t|verbose|v|elevated|elev|model|queue|activation|send|restart|reset|new|compact)\b/i;
38
+ const CONTROL_COMMAND_PREFIX_RE = /^\/(?:status|help|thinking|think|t|reasoning|reason|verbose|v|elevated|elev|model|queue|activation|send|restart|reset|new|compact)\b/i;
39
39
  function normalizeAllowToken(value) {
40
40
  if (!value)
41
41
  return "";