Repository navigation
Commit 49b5615
fix: point the
* fix: point the `warehouse_list` no-connections hint at the real config locations
The hint told users to create `connections.json` in `.opencode/`, which the
registry never reads. It now names the global and project
`.altimate-code/connections.json` paths and the `ALTIMATE_CODE_CONN_*`
variables, mentions `warehouse_add`, and keeps the example JSON.
The paths come from `globalConfigPath()`, `localConfigPath()` and
`CONN_ENV_PREFIX`, now exported from the registry, so the hint cannot drift.
A repo sweep found no other reference to the old location.
Closes #1558
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix: reload connection config edited after the first load and lead the hint with `warehouse_add`
The registry loaded once per process, so a `connections.json` created (or an
`ALTIMATE_CODE_CONN_*` variable set) after an empty `warehouse_list` stayed
invisible until restart. `ensureLoaded()` now compares a stat/env fingerprint of
the sources against the last load and re-reads them when it changed, dropping
cached connectors whose config changed. Connections added in-process keep their
in-memory credentials; `setConfigs()` injections are never reloaded.
The hint now leads with `warehouse_add`, notes the reload behaviour and that
credentials can come from `ALTIMATE_CODE_CONN_*` instead of a plaintext password.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix: keep a refreshed connection config authoritative over stale in-memory state
Review of the reload change found two ways an old target could survive a
config edit: a connection added in-process was restored over a later edit of its
global entry, and a connect already in flight could cache a connector built from
the previous config.
- `add()` now remembers the sanitized form it wrote; the in-memory copy (with
credentials) is restored only while the file still holds exactly that.
- Refresh bumps a config generation; a connect that finished against an
obsolete config is closed and fails with a retry message instead of being cached.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix: reload connection config only while the registry is empty
The fingerprint-based reload replaced the process-global config map when the
project directory or a file changed, which could close another project's
connectors and drop in-memory credentials of a keyring-less `warehouse_add`.
Replace it with a structural rule: re-read the sources only while the registry
holds zero connections (the case the `warehouse_list` hint addresses). Once any
connection is loaded nothing is replaced or closed, so edits to an existing
file take effect after a restart. `setConfigs()` injections are not reloaded.
The hint says so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix: do not load another project's connections file on an empty-registry reload
The registry is process-global. Record the project whose local file it was
loaded with; the empty-registry reload re-reads the project-local file only
when the current project is that one. The global file and
`ALTIMATE_CODE_CONN_*` stay process-wide. The `warehouse_list` hint advertises
the project path only when it would be picked up, and says environment variables
are read at process start.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix: clarify `warehouse_list` hint and clear the test-injection flag on load
- Hint: the OS credential store is used only when available; `ALTIMATE_CODE_CONN_*` must be set before the process starts.
- `load()` clears the `setConfigs()` injection flag, so a real load can still re-read when empty.
- Hint tests isolate ambient `ALTIMATE_CODE_CONN_*` variables.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>warehouse_list no-connections hint at the real config locations (#1559)1 parent aca8dac commit 49b5615
3 files changed
Lines changed: 247 additions & 6 deletions
File tree
- packages/opencode
- src/altimate
- native/connections
- tools
- test/altimate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | | - | |
| 181 | + | |
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| |||
193 | 197 | | |
194 | 198 | | |
195 | 199 | | |
196 | | - | |
| 200 | + | |
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
203 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
204 | 211 | | |
205 | 212 | | |
206 | 213 | | |
| |||
217 | 224 | | |
218 | 225 | | |
219 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
223 | 233 | | |
224 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
225 | 240 | | |
226 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
227 | 259 | | |
228 | 260 | | |
229 | 261 | | |
| |||
861 | 893 | | |
862 | 894 | | |
863 | 895 | | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
864 | 900 | | |
865 | 901 | | |
866 | 902 | | |
| |||
872 | 908 | | |
873 | 909 | | |
874 | 910 | | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
875 | 914 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
8 | 34 | | |
9 | 35 | | |
10 | 36 | | |
| |||
17 | 43 | | |
18 | 44 | | |
19 | 45 | | |
20 | | - | |
| 46 | + | |
21 | 47 | | |
22 | 48 | | |
23 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 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 | + | |
0 commit comments