Repository navigation
Commit 1891886
feat: approval cards, the daemon checks the call with the caller's cwd
node9-proxy 2.35 gives every approval card one owner and one decision
record. The SDK evaluates no policy itself: it registers a card and waits
for the daemon's answer.
- POST /check sends kind "evaluate": the daemon checks the call itself,
with the SDK's working directory, so a rule in the project's
node9.config.json applies (an older daemon checked it without the
project's config).
- With the daemon's internal token (from ~/.node9/daemon.pid), the card is
a protocol-2 card and GET /wait sends the token.
- The wait follows the card's own deadline (deadline + 5 s; no limit when
the card has no timer). It used to give up after a fixed 65 s, shorter
than the daemon's default 120 s approval timeout.
- A deny without a top-level reason takes the decision record's reason.
An older daemon ignores kind and protocol and sends no deadline: the SDK
keeps the fixed wait there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent bdffa58 commit 1891886
2 files changed
Lines changed: 117 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 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 | + | |
97 | 127 | | |
98 | | - | |
| 128 | + | |
99 | 129 | | |
100 | 130 | | |
101 | 131 | | |
| |||
327 | 357 | | |
328 | 358 | | |
329 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
330 | 364 | | |
331 | 365 | | |
332 | 366 | | |
333 | 367 | | |
334 | 368 | | |
335 | 369 | | |
336 | 370 | | |
| 371 | + | |
| 372 | + | |
337 | 373 | | |
338 | 374 | | |
339 | 375 | | |
340 | 376 | | |
341 | 377 | | |
342 | 378 | | |
343 | | - | |
| 379 | + | |
344 | 380 | | |
345 | 381 | | |
346 | 382 | | |
347 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
348 | 386 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
100 | 101 | | |
101 | 102 | | |
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 | + | |
103 | 177 | | |
104 | 178 | | |
105 | 179 | | |
| |||
0 commit comments