mocode-ai 1.4.1 → 1.4.3

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 (48) hide show
  1. package/README.md +13 -1
  2. package/dist/agent/core.js +14 -936
  3. package/dist/agent/index.js +37 -13
  4. package/dist/agent/model-turn.js +218 -0
  5. package/dist/agent/pipeline.js +18 -0
  6. package/dist/agent/run-contracts.js +1 -0
  7. package/dist/agent/run-coordinator.js +758 -0
  8. package/dist/agent/runtime-context.js +118 -24
  9. package/dist/agent/spawn.js +11 -7
  10. package/dist/agent/stages/context-trimmer.js +63 -0
  11. package/dist/agent/stages/contracts.js +12 -0
  12. package/dist/agent/stages/history-manager.js +178 -0
  13. package/dist/agent/stages/legacy-adapters.js +19 -0
  14. package/dist/agent/stages/model-runner.js +29 -0
  15. package/dist/agent/stages/run-policy.js +73 -0
  16. package/dist/agent/stages/tool-dispatcher.js +341 -0
  17. package/dist/agent/tool-helpers.js +12 -12
  18. package/dist/agent/tool-turn.js +87 -0
  19. package/dist/agent/trace-state.js +97 -101
  20. package/dist/agent/turn-lifecycle.js +110 -0
  21. package/dist/config/index.js +14 -0
  22. package/dist/host/stdio.js +101 -40
  23. package/dist/llm/index.js +51 -35
  24. package/dist/llm/providers/anthropic.js +16 -10
  25. package/dist/llm/runtime.js +1 -0
  26. package/dist/permissions/index.js +21 -5
  27. package/dist/repl/commands/compact.js +2 -2
  28. package/dist/repl/commands/session.js +3 -12
  29. package/dist/repl/message-format.js +5 -0
  30. package/dist/repl/runtime.js +95 -55
  31. package/dist/rollback/index.js +29 -624
  32. package/dist/rollback/store.js +593 -0
  33. package/dist/runtime/index.js +1 -0
  34. package/dist/runtime/runtime.js +307 -0
  35. package/dist/sandbox/jail.js +3 -3
  36. package/dist/session/compact.js +22 -14
  37. package/dist/session/index.js +1 -0
  38. package/dist/session/persist.js +10 -146
  39. package/dist/session/scheduler.js +28 -16
  40. package/dist/session/state.js +16 -12
  41. package/dist/session/store.js +218 -0
  42. package/dist/session/trace.js +5 -15
  43. package/dist/tools/policy.js +19 -15
  44. package/dist/tools/registry.js +21 -229
  45. package/dist/tools/router.js +5 -3
  46. package/dist/tools/tool-runtime.js +267 -0
  47. package/dist/ui/layout-internal/content-write.js +4 -0
  48. package/package.json +7 -3
package/README.md CHANGED
@@ -110,7 +110,7 @@ npm install -g mocode-ai
110
110
 
111
111
  This gives you the `mocode` command. Prefer not to install globally? Run it directly with `npx mocode-ai`.
112
112
 
113
- > MoCode checks for new versions on startup and self-updates in the background via `npm i -g mocode-ai@latest` the update takes effect on the next launch, with zero startup delay and silent failure if offline. This is skipped in dev mode (`npm start`, running via tsx).
113
+ > MoCode does not contact the registry on startup. Use `/upgrade check`, `/upgrade status`, or `/upgrade now` explicitly when you want to check or install an update. Real installation is disabled in source/tsx development mode.
114
114
 
115
115
  ### Run from source (development / contributing)
116
116
 
@@ -123,6 +123,18 @@ npm start
123
123
 
124
124
  Source runs directly via tsx, no build step. After changing code, restart `npm start` for changes to take effect (tsx loads modules at startup, no hot reload). Runtime dependencies: `openai`, `dotenv`, `fast-glob`; dev dependencies: `tsx`, `typescript`, `@types/node`.
125
125
 
126
+ ### Repository stacks and contributing
127
+
128
+ The production path is the TypeScript CLI. `packages/work-app` is incubating, `packages/pet-app` is optional, and `rust/` is an experimental, non-critical-path TUI with a mandatory promotion/archive deadline. See:
129
+
130
+ - [stack status and owners](docs/architecture/stack-status.md)
131
+ - [architecture decisions](docs/adr/README.md)
132
+ - [contribution guide](CONTRIBUTING.md)
133
+ - [maintainer and troubleshooting runbooks](docs/runbooks/README.md)
134
+ - [Rust experiment status](rust/README.md)
135
+
136
+ Do not import another package's `src/` or internal `dist/` layout. Applications consume package exports and the public `mocode-agent-host` bin contract.
137
+
126
138
  ## Configuration
127
139
 
128
140
  On first use, run the setup wizard to fill in three fields interactively (API base URL / key / model name), written to `~/.mocode/config` (global, works from any directory or terminal):