Repository navigation
Commit 0f091ea
committed
fix(plugins): keep bundled plugins bundled when selected by plugins.load.paths
Pointing `plugins.load.paths` at a plugin that already lives in the host's own
bundled tree demoted it from `origin: "bundled"` to `origin: "config"` whenever
compiled output existed beside the source. That silently revoked the host-owned
runtime privileges bundled plugins get: host agent event streams, bundled
channel and capability runtime registration, and active-runtime registry trust.
Origin was decided by how the operator referenced a plugin rather than where it
physically lives. Configured paths were labelled `config`, and config/global
entry resolution prefers `dist/index.js` while bundled resolution does not, so
one physical plugin produced two candidates with different `source` values.
`discovery.finish()` intends "a configured alias must not downgrade that same
physical entry" but dedupes on `source`, so the guard stopped applying the
moment the two entry resolutions diverged. Both candidates then reached the
manifest registry's same-`rootDir` branch, which applies the opposite policy and
ranks `config` above `bundled`.
Classify at the producer instead: a configured path whose resolved root lies
inside the trees the bundled scan itself walks stays `bundled`, and the
operator's selection is recorded separately as `configSelected`. Containment is
realpath-based, so a directory symlinked into the bundled root from outside
still stays `config`.
Incidentally repairs `openclaw doctor`, whose pristine-startup check compares
registry and candidate counts and read a configured bundled path as
non-pristine purely because the checkout was built.1 parent 7504a3b commit 0f091ea
4 files changed
Lines changed: 114 additions & 11 deletions
File tree
- docs/plugins
- src/plugins
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 131 | + | |
135 | 132 | | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3045 | 3045 | | |
3046 | 3046 | | |
3047 | 3047 | | |
3048 | | - | |
| 3048 | + | |
3049 | 3049 | | |
3050 | 3050 | | |
3051 | 3051 | | |
| |||
3060 | 3060 | | |
3061 | 3061 | | |
3062 | 3062 | | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
3063 | 3066 | | |
3064 | 3067 | | |
3065 | | - | |
3066 | | - | |
| 3068 | + | |
3067 | 3069 | | |
3068 | 3070 | | |
3069 | 3071 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
677 | 678 | | |
678 | 679 | | |
679 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
680 | 692 | | |
681 | 693 | | |
682 | 694 | | |
| |||
1144 | 1156 | | |
1145 | 1157 | | |
1146 | 1158 | | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1147 | 1166 | | |
1148 | 1167 | | |
1149 | 1168 | | |
| |||
1157 | 1176 | | |
1158 | 1177 | | |
1159 | 1178 | | |
1160 | | - | |
| 1179 | + | |
1161 | 1180 | | |
1162 | 1181 | | |
1163 | 1182 | | |
| |||
1169 | 1188 | | |
1170 | 1189 | | |
1171 | 1190 | | |
| 1191 | + | |
1172 | 1192 | | |
1173 | 1193 | | |
1174 | 1194 | | |
| |||
1178 | 1198 | | |
1179 | 1199 | | |
1180 | 1200 | | |
1181 | | - | |
| 1201 | + | |
1182 | 1202 | | |
1183 | 1203 | | |
1184 | 1204 | | |
| |||
1193 | 1213 | | |
1194 | 1214 | | |
1195 | 1215 | | |
| 1216 | + | |
1196 | 1217 | | |
1197 | 1218 | | |
1198 | 1219 | | |
1199 | 1220 | | |
1200 | 1221 | | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
1201 | 1227 | | |
1202 | 1228 | | |
1203 | 1229 | | |
| |||
1256 | 1282 | | |
1257 | 1283 | | |
1258 | 1284 | | |
| 1285 | + | |
| 1286 | + | |
1259 | 1287 | | |
1260 | 1288 | | |
1261 | 1289 | | |
| |||
0 commit comments