Commit 00ca67b
authored
AC-858: Align the TypeScript SDK dependency model (#1222)
* chore(ac-858): make the TS SDK dependency model intentional and single-sourced
openai and @anthropic-ai/sdk were declared as both hard dependencies and
optional peers. The integrations load them guardedly (dynamic require /
absence-tolerant), and the repo's sdk-import-discipline gate enforces no
required static imports, so the hard-dependency entries were accidental
duplication. Drop both from dependencies; keep them as optional
peerDependencies (with devDependencies for tests/scripts). Align the
@anthropic-ai/sdk peer range to the documented >=0.18 <2 contract (^0.32
only permitted 0.32.x). npm run lint, sdk-import-discipline, side-effects,
bundle-size, license, no-postinstall, no-telemetry, and the integration
tests all pass.
* fix(ac-858): regenerate npm lockfile, document optional-peer install, extend guards to Anthropic (PR #1222 review)
F1: regenerate ts/package-lock.json so both SDKs are dev-only and the
Anthropic peer range is >=0.18 <2 (the repo tracks package-lock.json
alongside bun.lock; the prior commit updated only bun.lock).
F2: README documents installing the now-optional provider SDKs
(npm/bun install autoctx @anthropic-ai/sdk, and openai), with a reminder
above the Anthropic example that imports the peer.
F3: extend the SDK guards to the Anthropic half. check-sdk-import-discipline
now covers integrations/anthropic + detectors/anthropic-{python,ts} (a static
@anthropic-ai/sdk import there now fails, verified), and check-no-telemetry
scans the Anthropic source dirs. The license/postinstall/telemetry transitive
roots stay openai-only by design: no shipped source imports or requires
@anthropic-ai/sdk, so its tree is outside our runtime closure (documented).1 parent 1eb9368 commit 00ca67b
9 files changed
Lines changed: 236 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
| |||
180 | 193 | | |
181 | 194 | | |
182 | 195 | | |
| 196 | + | |
| 197 | + | |
183 | 198 | | |
184 | 199 | | |
185 | 200 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| 212 | + | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
215 | | - | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
224 | | - | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
0 commit comments