docs(plugin): fix runner connection flow
This commit is contained in:
parent
cfe1ad0006
commit
4053f2c381
1 changed files with 11 additions and 8 deletions
|
|
@ -61,20 +61,23 @@ The runtime enforces two gates:
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant H as Host process
|
participant PM as PluginManager (host)
|
||||||
participant PM as PluginManager
|
participant PP as PluginProcess (host)
|
||||||
participant PP as PluginProcess
|
|
||||||
participant R as Runner child
|
participant R as Runner child
|
||||||
participant L as Plugin cdylib
|
participant L as Plugin cdylib
|
||||||
|
|
||||||
PM->>PP: spawn(cdylib_path, host)
|
PM->>PP: spawn(cdylib_path, host)
|
||||||
PP->>H: spawn --ocs-plugin-runner <socket> <cdylib>
|
PP->>PP: create local socket listener
|
||||||
H->>R: exec
|
PP->>R: spawn --ocs-plugin-runner <socket> <cdylib>
|
||||||
R->>R: create local socket listener
|
|
||||||
R->>L: unsafe { load(cdylib_path) }
|
R->>L: unsafe { load(cdylib_path) }
|
||||||
L-->>R: Box<dyn BuiltinPlugin>
|
L-->>R: Box<dyn BuiltinPlugin>
|
||||||
|
alt API v4
|
||||||
|
R->>PP: connect + RunnerHandshake::TokenV4
|
||||||
|
PP->>PP: verify token + V4 protocol/API gate
|
||||||
|
else API v2/v3
|
||||||
R->>PP: connect + RunnerHandshake::Token
|
R->>PP: connect + RunnerHandshake::Token
|
||||||
PP->>PP: verify OCS_PLUGIN_TOKEN
|
PP->>PP: verify token
|
||||||
|
end
|
||||||
PP->>R: HostToPlugin::Request(GetManifest)
|
PP->>R: HostToPlugin::Request(GetManifest)
|
||||||
R->>L: manifest()
|
R->>L: manifest()
|
||||||
L-->>R: PluginManifest { api_version }
|
L-->>R: PluginManifest { api_version }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue