Commit Graph

42 Commits (7ef956d224abd35befe89fd4f5fa7cfd04bc7f94)

Author SHA1 Message Date
Peter Steinberger b93aa7fb66 refactor(plugins): dedupe plugin SDK alias lookup 9 months ago
Peter Steinberger ef70a55b7a
refactor(reply): clarify explicit reply tags in off mode (#16189)
* refactor(reply): clarify explicit reply tags in off mode

* fix(plugin-sdk): alias account-id subpath for extensions
9 months ago
Peter Steinberger 9f507112b5 perf(test): speed up vitest by skipping plugins + LLM slug 9 months ago
cpojer a03d852d65
chore: Migrate to tsdown, speed up JS bundling by ~10x (thanks @hyf0).
The previous migration to tsdown was reverted because it caused a ~20x slowdown when running OpenClaw from the repo. @hyf0 investigated and found that simply renaming the `dist` folder also caused the same slowdown. It turns out the Plugin script loader has a bunch of voodoo vibe logic to determine if it should load files from source and compile them, or if it should load them from dist. When building with tsdown, the filesystem layout is different (bundled), and so some files weren't in the right location, and the Plugin script loader decided to compile source files from scratch using Jiti.

The new implementation uses tsdown to embed `NODE_ENV: 'production'`, which we now use to determine if we are running OpenClaw from a "production environmen" (ie. from dist). This removes the slop in favor of a deterministic toggle, and doesn't rely on directory names or similar.

There is some code reaching into `dist` to load specific modules, primarily in the voice-call extension, which I simplified into loading an "officially" exported `extensionAPI.js` file. With tsdown, entry points need to be explicitly configured, so we should be able to avoid sloppy code reaching into internals from now on. This might break some existing users, but if it does, it's because they were using "private" APIs.
10 months ago
cpojer f06dd8df06
chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 10 months ago
cpojer 5ceff756e1
chore: Enable "curly" rule to avoid single-statement if confusion/errors. 10 months ago
cpojer 15792b153f
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later. 10 months ago
Peter Steinberger 9a7160786a refactor: rename to openclaw 10 months ago
Josh Palmer 4b5514a259 Tests: default-disable plugins in VITEST 10 months ago
Peter Steinberger 6d16a658e5 refactor: rename clawdbot to moltbot with legacy compat 10 months ago
Peter Steinberger 83460df96f chore: update molt.bot domains 10 months ago
Glucksberg f648aae440 fix: clear plugin commands on reload to prevent duplicates
Add clearPluginCommands() call in loadClawdbotPlugins() to ensure
previously registered commands are cleaned up before reloading plugins.
This prevents command conflicts during hot-reload scenarios.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
10 months ago
Glucksberg 4ee808dbcb feat: add plugin command API for LLM-free auto-reply commands
This adds a new `api.registerCommand()` method to the plugin API, allowing
plugins to register slash commands that execute without invoking the AI agent.

Features:
- Plugin commands are processed before built-in commands and the agent
- Commands can optionally require authorization
- Commands can accept arguments
- Async handlers are supported

Use case: plugins can implement toggle commands (like /tts_on, /tts_off)
that respond immediately without consuming LLM API calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
10 months ago
Shadow 2f6d5805de fix: enforce plugin config schemas (#1272) (thanks @thewilloftheshadow)
Co-authored-by: thewilloftheshadow <thewilloftheshadow@users.noreply.github.com>
10 months ago
Peter Steinberger c5e732951b fix: prefer bundled plugin schema 10 months ago
Shadow 39dfdccf6c
CLI: skip runner rebuilds when dist is fresh (#1231)
Co-authored-by: mukhtharcm <mukhtharcm@users.noreply.github.com>
10 months ago
Peter Steinberger d1e9490f95 fix: enforce strict config validation 10 months ago
Peter Steinberger d9384785a3 fix: stabilize ci checks 10 months ago
Peter Steinberger 5a4482412d fix(plugins): prefer dist plugin-sdk in tests 10 months ago
Peter Steinberger e97bcf4dae refactor(plugins): improve loader resolution 10 months ago
Peter Steinberger ee36e12f81 fix: log plugin load errors in gateway 10 months ago
Peter Steinberger 57dd0505a3
Merge pull request #1181 from sebslight/plugins/exclusive-slots
Plugins: auto-select exclusive slots
10 months ago
Peter Steinberger 32ae4566c6 feat(config): auto-enable configured plugins 10 months ago
Sebastian Slight cef6b16d14 Plugins: auto-select exclusive slots 10 months ago
Peter Steinberger b015c7e5ad fix: sync protocol outputs 10 months ago
Peter Steinberger c5e19f5c67 refactor: migrate messaging plugins to sdk 10 months ago
Radek Paclt ebfeb7a6bf feat(memory): add lifecycle hooks and vector memory plugin
Add plugin lifecycle hooks infrastructure:
- before_agent_start: inject context before agent loop
- agent_end: analyze conversation after completion
- 13 hook types total (message, tool, session, gateway hooks)

Memory plugin implementation:
- LanceDB vector storage with OpenAI embeddings
- kind: "memory" to integrate with upstream slot system
- Auto-recall: injects <relevant-memories> when context found
- Auto-capture: stores preferences, decisions, entities
- Rule-based capture filtering with 0.95 similarity dedup
- Tools: memory_recall, memory_store, memory_forget
- CLI: clawdbot ltm list|search|stats

Plugin infrastructure:
- api.on() method for hook registration
- Global hook runner singleton for cross-module access
- Priority ordering and error catching

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
10 months ago
Peter Steinberger e2c10a2b7a feat: support plugin-managed hooks 10 months ago
Peter Steinberger 1420d113d8 refactor: migrate extensions to plugin sdk 10 months ago
Peter Steinberger 5b4651d9ed refactor: add plugin sdk runtime scaffolding 10 months ago
Peter Steinberger 9fd9f4c896 feat(plugins): add memory slot plugin 10 months ago
Peter Steinberger a6deb0d9d5 feat: bundle provider auth plugins
Co-authored-by: ItzR3NO <ItzR3NO@users.noreply.github.com>
10 months ago
Shadow 1ad26d6fea Config: schema-driven channels and settings 10 months ago
Peter Steinberger a0d2a7232e fix: allow media-only sends 10 months ago
Peter Steinberger 29476b222d fix: restore status usage summary output 10 months ago
Peter Steinberger b7ba94f0c1 fix: harden antigravity claude support (#968)
Co-authored-by: Max <rdev@users.noreply.github.com>
10 months ago
Peter Steinberger 6084421ec6 feat: add provider auth plugins 10 months ago
Peter Steinberger 5abe3c2145 feat: add plugin HTTP hooks + Zalo plugin 10 months ago
Peter Steinberger 2b4a68e276 feat: load channel plugins 10 months ago
Peter Steinberger c379191f80 chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
10 months ago
Peter Steinberger 2f4a248314 feat: plugin system + voice-call 11 months ago
Peter Steinberger cf0c72a557 feat: add plugin architecture 11 months ago