Previously the wrapper silently ignored json.Unmarshal errors and returned
nil, causing tools returning raw JSON strings (via C ABI bridge's
json.Marshal) to appear as empty map[] to the agent.
rawmode_linux.go only cleared ICANON|ECHO but left ISIG enabled,
so the terminal driver caught Ctrl+C and generated SIGINT.
signal.Notify caught the SIGINT but no goroutine consumed the
channel, effectively swallowing the signal.
Fix: also clear ISIG so Ctrl+C is delivered as byte 0x03,
which the line editor handles with os.Exit(130). Also set
VMIN=1, VTIME=0 for proper blocking read behavior.
editor.go read bytes one at a time; byte >= 0x20 was treated as
a single rune, so multi-byte UTF-8 chars (Chinese, emoji, etc.)
became garbled. Add decodeRune to reassemble multi-byte sequences
from the raw byte stream.
manager/main.js, pysimulator/main.py, and simulator/main.js are
production source files for the OpenClaw sidecar system, not build
artifacts. Remove them from .gitignore so fresh clones can make build
without manual stub creation.
- Redesign output_send__ tools: content JSON string -> structured
payload/meta/type params for LLM reliability
- executeOutputSendTool: route by type with capability check
- executeOutputSendHelp: show meta format + type enum
- Updated system prompt rules for new interface
- docToTriples: use jieba exact mode adjacent co-occurrence
- Unify vector space: Doc.Vector field, ContextToDoc vectorizer,
ReindexWithVectorizer on startup
PLUGIN_DEV.md 第二节保留公开 API (InjectText/InjectInterruptText/InjectTextNoMemory),
第四节新增"输入投递(内置插件)"小节展示 InjectInput/InjectInterrupt/InjectInputSync 等
内置插件专属方法,附注说明区分外部与内置插件 API 边界。
- Add core.agent.embedding_model_path to seedDBValues and seedCoreDefs
- Wire cfgReg.GetString in main.go to AgentConfig.EmbeddingModelPath
- Follow existing core.agent.* ConfigRegistry pattern
- StaticEmbedder: pre-trained ConceptNet Numberbatch/fastText word embeddings,
auto-download with TF-IDF fallback, comma-separated multi-model paths
- CleanTemplateText: regex stripping of QQ tool call templates and noise
- textForVector: per-source vector strategy (agent→Response, user→Input,
cold_storage→both)
- Indexer.BuildContext and ExtractKeywords now clean input before vectorization
- Protect recent 10 events in Prune (regression fix: use local var not const)
- SDK: RegisterStage(stage, handler, scope...) with StageScopeGlobal/StageScopeOwnTools
- Delete RegisterStageOwnTools, migrate cmd and qq plugins
- Internal SDK: add StageScope alias
- Docs: update all zh/en docs for C ABI buildmode and stage scope
- C ABI: fix nil errorOut in Handle.Start/Handle.Stop (SIGSEGV fix)
- C ABI header: add dispatch IDs 26-45 for Settings/Doc/Knowledge/LLM/Social/TextMemory
- Replace invokeTool/invokeOutput/invokeStage callbacks with standalone
functions pluginInvokeTool/pluginInvokeOutput/pluginInvokeStage
- Case 1: sync tool invocation (not async - LLM needs return value)
- Case 2/3: use pluginID + pluginMap lookup instead of closures
- Store ps.api in pluginState for direct C function calls
- go_core_dispatch case 1: tool handler now calls back to plugin via invokeTool
- go_core_dispatch case 2: stage handler sends full StageContext (11 fields)
- New dispatch methods 26-31: Settings.GetCore/SetCore/ListCore/GetPlugin/SetPlugin/ListPlugin
- Remove dlclose (plugin goroutines may still be running after Stop)
- invokeTool/invokeOutput/invokeStage callbacks with proper error handling
- Fix n2 unused variable
- go_core_dispatch case 2/3 no longer stub - real callbacks to plugin
- pluginState.invokeOutput/invokeStage call plugin's go_invoke_output/stage
- OutputChannel registration via IOManager.RegisterDevice
- Stage handler registration via PluginSDK.RegisterStage
- Move FreeCoreAPI from defer in Start() to Stop()
- Call handle.Stop() before freeing resources
- This prevents SIGSEGV from plugins accessing freed CoreAPI memory
- Plugin's Go bridge code is safe (no C memory bugs)
- internal/plugin/cabi/: dlopen + dlsym for plugin_init
- create_core_api(): C struct with dispatch_bridge→go_core_dispatch
- go_core_dispatch routes all 25 SDK methods (RegisterTool, MemoryAPI, etc.)
- dynamic.go: cabiPlugin uses CreateCoreAPI(sdk)→Start(corePtr)
- Each plugin gets a unique ID stored in CoreAPI.ctx
- C functions moved to loader.c to avoid cgo duplicate symbol issues
- New internal/plugin/cabi/ package: dlopen + dlsym loader
- plugindev: generates z_entry.c + z_bridge_gen.go for c-shared builds
- plugindev: replaces -buildmode=plugin with -buildmode=c-shared
- Go bridge uses mock SDK during Start(), core discovers registrations
- PluginAPI: init/start/stop + invoke_tool/stage/output + get_tool_defs/stages/channels
- ha_dispatch: single C function handles all plugin→core calls via method ID
- tryLoadSO: tries C ABI first, falls back to Go plugin.Open
- All example plugins updated (main.go removed, plg.json targets updated)