Commit 26fe609
feat(client): pass
POST /packages now 409s when the manifest id is already installed (#2971,
duplicate-id guard). The SDK's packages.install() had no way to opt into the
intentional-overwrite escape hatch, so any upgrade / re-install flow built on
it would hit the 409 with no recourse.
Add `overwrite?: boolean` to the options bag and pass it through the POST body
only when explicitly set — the default request stays byte-identical so the
server keeps rejecting duplicate ids. First SDK tests for packages.install
(default omits the flag; overwrite:true carries it).
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>overwrite through packages.install for upgrade flows (#3007)1 parent 13c0a12 commit 26fe609
2 files changed
Lines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1179 | 1179 | | |
1180 | 1180 | | |
1181 | 1181 | | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
595 | | - | |
596 | | - | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
597 | 605 | | |
598 | 606 | | |
599 | 607 | | |
600 | 608 | | |
601 | 609 | | |
602 | 610 | | |
603 | 611 | | |
| 612 | + | |
604 | 613 | | |
605 | 614 | | |
606 | 615 | | |
| |||
0 commit comments