Fix documentation inconsistencies found by code audit
- docs/01: sync all syscall signatures with proto (missing params, invented callback params, stream semantics, return types) - docs/02: mark unimplemented features (FFI system plugins, topo sort, lifecycle CLI, watchdog); clarify plugin.yaml is not parsed by the kernel - registration goes through gRPC PluginBridge.Register; correct permission model and session_id descriptions - docs/03: check off implemented stage 3 items (Hermes adapter, Claude Code plugin) - docs/04: data/ actual location, add Cargo.toml to plugin trees, note __init__.py is hand-maintained - README: status line now reflects actual progress Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ agentsd 定义 9 个 syscall 接口。类比 Linux 内核 syscall 表——接
|
||||
|
||||
```
|
||||
display.text(content)
|
||||
display.rich(markup)
|
||||
display.rich(markup, format)
|
||||
display.image(data, format)
|
||||
display.clear()
|
||||
display.notify(message)
|
||||
@@ -27,12 +27,12 @@ display.notify(message)
|
||||
**管**:扬声器输出、麦克风输入 | **不管**:TTS/STT(插件的事)
|
||||
|
||||
```
|
||||
audio.play(data, format)
|
||||
audio.play(stream AudioChunk{data, format}) # 客户端流式上传音频帧
|
||||
audio.stop()
|
||||
audio.volume(level)
|
||||
audio.record.start(format)
|
||||
audio.record.stop() -> data
|
||||
audio.record.stream(callback)
|
||||
audio.record_start(format)
|
||||
audio.record_stop() -> data
|
||||
audio.record_stream(format) -> stream AudioChunk # 服务端流式返回录音帧
|
||||
```
|
||||
|
||||
---
|
||||
@@ -44,13 +44,13 @@ audio.record.stream(callback)
|
||||
**管**:磁盘文件 | **不管**:结构化数据(Memory)
|
||||
|
||||
```
|
||||
fs.read(path) -> data
|
||||
fs.write(path, data)
|
||||
fs.read(path, offset?, length?) -> data
|
||||
fs.write(path, data, append?)
|
||||
fs.delete(path)
|
||||
fs.rename(from, to)
|
||||
fs.stat(path) -> metadata
|
||||
fs.list(dir) -> entries
|
||||
fs.watch(path, callback)
|
||||
fs.watch(path) -> stream FsWatchEvent{path, kind}
|
||||
```
|
||||
|
||||
---
|
||||
@@ -65,8 +65,8 @@ fs.watch(path, callback)
|
||||
memory.read(key) -> value
|
||||
memory.write(key, value)
|
||||
memory.delete(key)
|
||||
memory.list(prefix?) -> keys
|
||||
memory.search(query) -> results
|
||||
memory.list(prefix?, limit?) -> keys
|
||||
memory.search(query, limit?) -> results
|
||||
```
|
||||
|
||||
---
|
||||
@@ -99,13 +99,13 @@ gRPC 流式语义:OpenConn/Listen 返回 `stream ConnEvent{conn_id, data, kind}`
|
||||
**管**:子进程生命周期、stdio | **不管**:插件间路由(内核调度)
|
||||
|
||||
```
|
||||
proc.spawn(cmd, args, env?) -> pid
|
||||
proc.spawn(cmd, args, env?, cwd?) -> pid
|
||||
proc.kill(pid)
|
||||
proc.wait(pid) -> exitcode
|
||||
proc.stdin(pid, data)
|
||||
proc.stdout(pid) -> data
|
||||
proc.stdout(pid) -> stream DataChunk # 服务端流式输出
|
||||
proc.signal(pid, sig)
|
||||
proc.list() -> [pid]
|
||||
proc.list() -> [ProcInfo{pid, cmd, status}]
|
||||
```
|
||||
|
||||
---
|
||||
@@ -134,10 +134,10 @@ timer.now() -> timestamp
|
||||
**管**:屏幕读取、输入模拟 | **不管**:向用户展示(Display)、用户主动输入(Input)
|
||||
|
||||
```
|
||||
hid.capture(region?) -> image
|
||||
hid.mouse(x, y, action)
|
||||
hid.keyboard(key, action)
|
||||
hid.ocr(region?) -> text
|
||||
hid.capture(x, y, width, height) -> image
|
||||
hid.mouse(x, y, action, button)
|
||||
hid.keyboard(key, action, modifiers?)
|
||||
hid.ocr(x, y, width, height) -> text
|
||||
```
|
||||
|
||||
---
|
||||
@@ -152,7 +152,7 @@ hid.ocr(region?) -> text
|
||||
input.text() -> string
|
||||
input.key() -> keyevent
|
||||
input.clipboard() -> data
|
||||
input.event() -> event
|
||||
input.events() -> stream InputEvent # 服务端流式事件
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user