@namzu/anthropic 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/package.json +12 -2
  3. package/dist/__tests__/anthropic.test.d.ts +0 -2
  4. package/dist/__tests__/anthropic.test.d.ts.map +0 -1
  5. package/dist/__tests__/anthropic.test.js +0 -425
  6. package/dist/__tests__/anthropic.test.js.map +0 -1
  7. package/dist/__tests__/background-delegation.live.test.d.ts +0 -2
  8. package/dist/__tests__/background-delegation.live.test.d.ts.map +0 -1
  9. package/dist/__tests__/background-delegation.live.test.js +0 -212
  10. package/dist/__tests__/background-delegation.live.test.js.map +0 -1
  11. package/dist/__tests__/block-shape-guard.test.d.ts +0 -2
  12. package/dist/__tests__/block-shape-guard.test.d.ts.map +0 -1
  13. package/dist/__tests__/block-shape-guard.test.js +0 -218
  14. package/dist/__tests__/block-shape-guard.test.js.map +0 -1
  15. package/dist/__tests__/cache-anchors.test.d.ts +0 -2
  16. package/dist/__tests__/cache-anchors.test.d.ts.map +0 -1
  17. package/dist/__tests__/cache-anchors.test.js +0 -220
  18. package/dist/__tests__/cache-anchors.test.js.map +0 -1
  19. package/dist/__tests__/citations.test.d.ts +0 -2
  20. package/dist/__tests__/citations.test.d.ts.map +0 -1
  21. package/dist/__tests__/citations.test.js +0 -189
  22. package/dist/__tests__/citations.test.js.map +0 -1
  23. package/dist/__tests__/content-blocks.test.d.ts +0 -2
  24. package/dist/__tests__/content-blocks.test.d.ts.map +0 -1
  25. package/dist/__tests__/content-blocks.test.js +0 -131
  26. package/dist/__tests__/content-blocks.test.js.map +0 -1
  27. package/dist/__tests__/document-input.test.d.ts +0 -2
  28. package/dist/__tests__/document-input.test.d.ts.map +0 -1
  29. package/dist/__tests__/document-input.test.js +0 -98
  30. package/dist/__tests__/document-input.test.js.map +0 -1
  31. package/dist/__tests__/effort-levels-are-askable.test.d.ts +0 -2
  32. package/dist/__tests__/effort-levels-are-askable.test.d.ts.map +0 -1
  33. package/dist/__tests__/effort-levels-are-askable.test.js +0 -74
  34. package/dist/__tests__/effort-levels-are-askable.test.js.map +0 -1
  35. package/dist/__tests__/error-taxonomy.test.d.ts +0 -16
  36. package/dist/__tests__/error-taxonomy.test.d.ts.map +0 -1
  37. package/dist/__tests__/error-taxonomy.test.js +0 -242
  38. package/dist/__tests__/error-taxonomy.test.js.map +0 -1
  39. package/dist/__tests__/reasoning-close.test.d.ts +0 -2
  40. package/dist/__tests__/reasoning-close.test.d.ts.map +0 -1
  41. package/dist/__tests__/reasoning-close.test.js +0 -219
  42. package/dist/__tests__/reasoning-close.test.js.map +0 -1
  43. package/dist/__tests__/thinking-capability.test.d.ts +0 -2
  44. package/dist/__tests__/thinking-capability.test.d.ts.map +0 -1
  45. package/dist/__tests__/thinking-capability.test.js +0 -206
  46. package/dist/__tests__/thinking-capability.test.js.map +0 -1
  47. package/dist/__tests__/thinking-contract.live.test.d.ts +0 -2
  48. package/dist/__tests__/thinking-contract.live.test.d.ts.map +0 -1
  49. package/dist/__tests__/thinking-contract.live.test.js +0 -97
  50. package/dist/__tests__/thinking-contract.live.test.js.map +0 -1
  51. package/dist/__tests__/thinking-request-body.test.d.ts +0 -2
  52. package/dist/__tests__/thinking-request-body.test.d.ts.map +0 -1
  53. package/dist/__tests__/thinking-request-body.test.js +0 -90
  54. package/dist/__tests__/thinking-request-body.test.js.map +0 -1
  55. package/dist/__tests__/wire-contract.live.test.d.ts +0 -2
  56. package/dist/__tests__/wire-contract.live.test.d.ts.map +0 -1
  57. package/dist/__tests__/wire-contract.live.test.js +0 -272
  58. package/dist/__tests__/wire-contract.live.test.js.map +0 -1
  59. package/src/__tests__/anthropic.test.ts +0 -490
  60. package/src/__tests__/background-delegation.live.test.ts +0 -243
  61. package/src/__tests__/block-shape-guard.test.ts +0 -256
  62. package/src/__tests__/cache-anchors.test.ts +0 -262
  63. package/src/__tests__/citations.test.ts +0 -218
  64. package/src/__tests__/content-blocks.test.ts +0 -153
  65. package/src/__tests__/document-input.test.ts +0 -131
  66. package/src/__tests__/effort-levels-are-askable.test.ts +0 -86
  67. package/src/__tests__/error-taxonomy.test.ts +0 -274
  68. package/src/__tests__/reasoning-close.test.ts +0 -262
  69. package/src/__tests__/thinking-capability.test.ts +0 -235
  70. package/src/__tests__/thinking-contract.live.test.ts +0 -125
  71. package/src/__tests__/thinking-request-body.test.ts +0 -111
  72. package/src/__tests__/wire-contract.live.test.ts +0 -331
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 48d9d67: Published tarballs no longer contain test files.
8
+
9
+ `files: ["dist", "src", ...]` reads as "the build output and the sources" and
10
+ means "everything the compiler emitted and everything in the tree", so every
11
+ compiled test, its declaration, and both source maps shipped to the registry —
12
+ and for the twelve packages that also ship `src`, the raw test sources went with
13
+ them.
14
+
15
+ Measured on the versions currently published:
16
+
17
+ | package | files | of which tests | unpacked |
18
+ | ------------ | ----------- | -------------- | ------------------ |
19
+ | `@namzu/sdk` | 3879 → 2239 | 1640 (42%) | 12.73 MB → 6.81 MB |
20
+ | `@namzu/cli` | 462 → 282 | 180 (39%) | 1.21 MB → 0.73 MB |
21
+
22
+ Nothing you can import changes. Every package restricts `exports` to `"."`, so
23
+ Node refused a deep subpath into those files already — they were weight in the
24
+ tarball and nothing else. Hence `patch`: there is no consumer-visible surface
25
+ here, only less to download.
26
+
27
+ The exclusions are at the packaging layer, not the compiler. Adding `exclude`
28
+ to `tsconfig.json` would have kept tests out of `dist` and also dropped them
29
+ from `tsc --noEmit`, silently ending type-checking of the entire test suite —
30
+ trading a packaging defect for a much worse one.
31
+
3
32
  ## 3.1.0
4
33
 
5
34
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namzu/anthropic",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "Anthropic LLM provider for @namzu/sdk via the official @anthropic-ai/sdk. Messages API with streaming, tool-use, and extended thinking support.",
5
5
  "license": "FSL-1.1-MIT",
6
6
  "type": "module",
@@ -23,7 +23,17 @@
23
23
  },
24
24
  "files": [
25
25
  "dist",
26
+ "!dist/**/*.test.*",
27
+ "!dist/**/*.proc-test.*",
28
+ "!dist/**/__tests__",
29
+ "!dist/**/__fixtures__",
30
+ "!dist/**/test-setup.*",
26
31
  "src",
32
+ "!src/**/*.test.*",
33
+ "!src/**/*.proc-test.*",
34
+ "!src/**/__tests__",
35
+ "!src/**/__fixtures__",
36
+ "!src/**/test-setup.*",
27
37
  "LICENSE.md",
28
38
  "README.md",
29
39
  "CHANGELOG.md"
@@ -44,7 +54,7 @@
44
54
  "@types/node": "^22.19.17",
45
55
  "typescript": "^5.5.0",
46
56
  "vitest": "^3.2.6",
47
- "@namzu/sdk": "^8.0.0"
57
+ "@namzu/sdk": "^15.0.0"
48
58
  },
49
59
  "scripts": {
50
60
  "build": "tsc --build",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=anthropic.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"anthropic.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/anthropic.test.ts"],"names":[],"mappings":""}
@@ -1,425 +0,0 @@
1
- import { DuplicateProviderError, ProviderRegistry } from '@namzu/sdk';
2
- import { beforeEach, describe, expect, it } from 'vitest';
3
- import { AnthropicProvider } from '../client.js';
4
- import { ANTHROPIC_CAPABILITIES, registerAnthropic } from '../index.js';
5
- // Ensure a clean slate between tests. The sdk pre-registers 'mock' on import
6
- // via its sideEffects whitelist; we only need to clear 'anthropic' to make
7
- // re-registration deterministic across tests.
8
- beforeEach(() => {
9
- if (ProviderRegistry.isSupported('anthropic')) {
10
- ProviderRegistry.unregister('anthropic');
11
- }
12
- });
13
- describe('@namzu/anthropic', () => {
14
- describe('registerAnthropic()', () => {
15
- it("adds 'anthropic' to the ProviderRegistry", () => {
16
- expect(ProviderRegistry.isSupported('anthropic')).toBe(false);
17
- registerAnthropic();
18
- expect(ProviderRegistry.isSupported('anthropic')).toBe(true);
19
- expect(ProviderRegistry.listTypes()).toContain('anthropic');
20
- });
21
- it('throws DuplicateProviderError when called twice without options', () => {
22
- registerAnthropic();
23
- expect(() => registerAnthropic()).toThrowError(DuplicateProviderError);
24
- });
25
- it('allows re-registration when { replace: true } is passed', () => {
26
- registerAnthropic();
27
- expect(() => registerAnthropic({ replace: true })).not.toThrow();
28
- expect(ProviderRegistry.isSupported('anthropic')).toBe(true);
29
- });
30
- it('exposes capabilities through the registry after registration', () => {
31
- registerAnthropic();
32
- const caps = ProviderRegistry.getCapabilities('anthropic');
33
- expect(caps).toEqual(ANTHROPIC_CAPABILITIES);
34
- });
35
- });
36
- describe('ANTHROPIC_CAPABILITIES', () => {
37
- it('declares the expected capability flags', () => {
38
- expect(ANTHROPIC_CAPABILITIES).toEqual({
39
- supportsTools: true,
40
- supportsStreaming: true,
41
- supportsFunctionCalling: true,
42
- supportsVision: true,
43
- supportsDocuments: true,
44
- });
45
- });
46
- it('is exposed on the provider instance for runtime negotiation', () => {
47
- const provider = new AnthropicProvider({ apiKey: 'test-key' });
48
- expect(provider.capabilities).toEqual(ANTHROPIC_CAPABILITIES);
49
- });
50
- });
51
- describe('AnthropicProvider', () => {
52
- it('constructs with an apiKey and exposes provider identity', () => {
53
- const provider = new AnthropicProvider({ apiKey: 'test-key' });
54
- expect(provider.id).toBe('anthropic');
55
- expect(provider.name).toBe('Anthropic');
56
- });
57
- it('throws when constructed without an apiKey or authToken', () => {
58
- expect(() => new AnthropicProvider({})).toThrow(/apiKey.*or.*authToken.*required/);
59
- });
60
- it('accepts an authToken instead of an apiKey (OAuth path)', () => {
61
- const provider = new AnthropicProvider({ authToken: 'cc-oauth-token' });
62
- expect(provider.id).toBe('anthropic');
63
- });
64
- it('creates via ProviderRegistry.create with the registered type', () => {
65
- registerAnthropic();
66
- const { provider, capabilities } = ProviderRegistry.create({
67
- type: 'anthropic',
68
- apiKey: 'test-key',
69
- model: 'claude-sonnet-4-5-20250929',
70
- });
71
- expect(provider.id).toBe('anthropic');
72
- expect(capabilities).toEqual(ANTHROPIC_CAPABILITIES);
73
- });
74
- it('does not enforce a provider-local stream idle timeout by default', async () => {
75
- const provider = new AnthropicProvider({
76
- apiKey: 'test-key',
77
- model: 'claude-sonnet-4-5-20250929',
78
- });
79
- provider.client = {
80
- messages: {
81
- create: async () => delayedAnthropicStream(10),
82
- },
83
- };
84
- const chunks = [];
85
- for await (const chunk of provider.chatStream({
86
- model: 'claude-sonnet-4-5-20250929',
87
- messages: [{ role: 'user', content: 'hello' }],
88
- maxTokens: 100,
89
- })) {
90
- chunks.push(chunk);
91
- }
92
- expect(chunks.length).toBeGreaterThan(0);
93
- });
94
- it('supports an opt-in stream idle timeout for deployments that need it', async () => {
95
- const provider = new AnthropicProvider({
96
- apiKey: 'test-key',
97
- model: 'claude-sonnet-4-5-20250929',
98
- streamIdleTimeoutMs: 1,
99
- });
100
- provider.client = {
101
- messages: {
102
- create: async () => delayedAnthropicStream(20),
103
- },
104
- };
105
- const drain = async () => {
106
- for await (const _chunk of provider.chatStream({
107
- model: 'claude-sonnet-4-5-20250929',
108
- messages: [{ role: 'user', content: 'hello' }],
109
- maxTokens: 100,
110
- })) {
111
- // Drain the stream.
112
- }
113
- };
114
- await expect(drain()).rejects.toThrow(/stream idle/);
115
- });
116
- });
117
- });
118
- describe('AnthropicProvider — buildCreateParams', () => {
119
- const buildParams = (provider, params, stream = false) => provider.buildCreateParams(params, stream);
120
- const makeProvider = () => new AnthropicProvider({
121
- apiKey: 'test-key',
122
- model: 'claude-sonnet-4-5-20250929',
123
- });
124
- const tools = [
125
- {
126
- type: 'function',
127
- function: {
128
- name: 'alpha',
129
- description: 'first',
130
- parameters: { type: 'object' },
131
- },
132
- },
133
- {
134
- type: 'function',
135
- function: {
136
- name: 'beta',
137
- description: 'second',
138
- parameters: { type: 'object' },
139
- },
140
- },
141
- ];
142
- describe('tool_choice mapping', () => {
143
- it("maps 'none' to the first-class {type:'none'} while KEEPING the tools param", () => {
144
- const body = buildParams(makeProvider(), {
145
- model: 'claude-sonnet-4-5-20250929',
146
- messages: [{ role: 'user', content: 'hi' }],
147
- tools,
148
- toolChoice: 'none',
149
- });
150
- expect(body.tool_choice).toEqual({ type: 'none' });
151
- expect(body.tools).toHaveLength(2);
152
- });
153
- it("maps 'auto' → auto, 'required' → any, and function → tool", () => {
154
- const base = {
155
- model: 'claude-sonnet-4-5-20250929',
156
- messages: [{ role: 'user', content: 'hi' }],
157
- tools,
158
- };
159
- expect(buildParams(makeProvider(), { ...base, toolChoice: 'auto' }).tool_choice).toEqual({
160
- type: 'auto',
161
- });
162
- expect(buildParams(makeProvider(), { ...base, toolChoice: 'required' }).tool_choice).toEqual({
163
- type: 'any',
164
- });
165
- expect(buildParams(makeProvider(), {
166
- ...base,
167
- toolChoice: { type: 'function', function: { name: 'alpha' } },
168
- }).tool_choice).toEqual({ type: 'tool', name: 'alpha' });
169
- });
170
- it('omits tool_choice entirely when no tools are present', () => {
171
- const body = buildParams(makeProvider(), {
172
- model: 'claude-sonnet-4-5-20250929',
173
- messages: [{ role: 'user', content: 'hi' }],
174
- toolChoice: 'none',
175
- });
176
- expect(body.tools).toBeUndefined();
177
- expect(body.tool_choice).toBeUndefined();
178
- });
179
- it('maps parallelToolCalls:false to disable_parallel_tool_use on tool_choice', () => {
180
- const body = buildParams(makeProvider(), {
181
- model: 'claude-sonnet-4-5-20250929',
182
- messages: [{ role: 'user', content: 'hi' }],
183
- tools,
184
- parallelToolCalls: false,
185
- });
186
- expect(body.tool_choice).toEqual({
187
- type: 'auto',
188
- disable_parallel_tool_use: true,
189
- });
190
- });
191
- });
192
- describe('strict tool input mapping', () => {
193
- const base = (model) => ({
194
- model,
195
- messages: [{ role: 'user', content: 'hi' }],
196
- tools,
197
- enforceToolInputSchema: ['alpha'],
198
- });
199
- it.each([
200
- 'claude-haiku-4-5-20251001',
201
- 'claude-sonnet-4-6',
202
- 'claude-opus-5',
203
- 'anthropic/claude-fable-5',
204
- 'claude-mythos-preview',
205
- ])('enables only named tools for supported model %s', (model) => {
206
- const body = buildParams(makeProvider(), base(model));
207
- expect(body.tools?.[0]).toMatchObject({ name: 'alpha', strict: true });
208
- expect(body.tools?.[1]).toEqual({
209
- name: 'beta',
210
- description: 'second',
211
- input_schema: { type: 'object' },
212
- });
213
- });
214
- it.each([
215
- 'claude-3-5-sonnet-20241022',
216
- 'proxy-production-alias',
217
- 'proxy-production-claude-opus-5-legacy',
218
- 'not-claude-sonnet-4-5-compatible',
219
- 'claude-mythos-preview-shadow',
220
- ])('falls back to runtime validation for unsupported or unknown model %s', (model) => {
221
- const body = buildParams(makeProvider(), base(model));
222
- expect(JSON.stringify(body.tools)).not.toContain('"strict"');
223
- });
224
- it('uses the per-call model instead of the configured default in auto mode', () => {
225
- const provider = new AnthropicProvider({
226
- apiKey: 'test-key',
227
- model: 'claude-opus-5',
228
- });
229
- const body = buildParams(provider, base('proxy-production-alias'));
230
- expect(JSON.stringify(body.tools)).not.toContain('"strict"');
231
- });
232
- it('supports explicit on/off overrides for compatible aliases and proxies', () => {
233
- const on = new AnthropicProvider({
234
- apiKey: 'test-key',
235
- model: 'proxy-production-alias',
236
- strictToolUse: 'on',
237
- });
238
- expect(buildParams(on, {
239
- ...base(''),
240
- model: '',
241
- }).tools?.[0]).toMatchObject({ strict: true });
242
- const off = new AnthropicProvider({
243
- apiKey: 'test-key',
244
- model: 'claude-opus-5',
245
- strictToolUse: 'off',
246
- });
247
- expect(JSON.stringify(buildParams(off, base('claude-opus-5')).tools)).not.toContain('"strict"');
248
- });
249
- it('ignores empty and unknown enforcement names', () => {
250
- for (const names of [[], ['unknown_tool']]) {
251
- const body = buildParams(makeProvider(), {
252
- ...base('claude-opus-5'),
253
- enforceToolInputSchema: names,
254
- });
255
- expect(JSON.stringify(body.tools)).not.toContain('"strict"');
256
- }
257
- });
258
- it('serializes the reviewed model schema unchanged without unsupported constraints', () => {
259
- const schema = {
260
- type: 'object',
261
- properties: {
262
- path: { type: 'string' },
263
- old_string: { type: 'string' },
264
- new_string: { type: 'string' },
265
- replace_all: { type: 'boolean' },
266
- },
267
- required: ['path', 'old_string', 'new_string'],
268
- additionalProperties: false,
269
- };
270
- const body = buildParams(makeProvider(), {
271
- model: 'claude-opus-5',
272
- messages: [{ role: 'user', content: 'append' }],
273
- tools: [
274
- {
275
- type: 'function',
276
- function: {
277
- name: 'edit',
278
- description: 'Edit',
279
- parameters: schema,
280
- },
281
- },
282
- ],
283
- enforceToolInputSchema: ['edit'],
284
- });
285
- expect(body.tools?.[0]).toEqual({
286
- name: 'edit',
287
- description: 'Edit',
288
- input_schema: schema,
289
- strict: true,
290
- });
291
- expect(JSON.stringify(body.tools)).not.toContain('"minimum"');
292
- });
293
- it('coexists with cache_control on the tools-array tail', () => {
294
- const body = buildParams(makeProvider(), {
295
- ...base('claude-opus-5'),
296
- enforceToolInputSchema: ['beta'],
297
- cacheControl: { type: 'auto' },
298
- });
299
- expect(body.tools?.[0]).not.toHaveProperty('strict');
300
- expect(body.tools?.[1]).toMatchObject({
301
- name: 'beta',
302
- strict: true,
303
- cache_control: { type: 'ephemeral' },
304
- });
305
- });
306
- });
307
- describe('prompt caching', () => {
308
- const cachedParams = () => ({
309
- model: 'claude-sonnet-4-5-20250929',
310
- messages: [
311
- { role: 'system', content: 'STATIC PREFIX', cacheHint: 'cache' },
312
- { role: 'system', content: 'DYNAMIC SEGMENT', cacheHint: 'ephemeral' },
313
- { role: 'user', content: 'hello' },
314
- ],
315
- tools,
316
- cacheControl: { type: 'auto' },
317
- });
318
- it('emits zero cache_control blocks when cacheControl is not requested', () => {
319
- const params = cachedParams();
320
- params.cacheControl = undefined;
321
- const body = buildParams(makeProvider(), params);
322
- expect(JSON.stringify(body)).not.toContain('cache_control');
323
- // System still arrives as cacheHint-preserving blocks.
324
- expect(body.system).toEqual([
325
- { type: 'text', text: 'STATIC PREFIX' },
326
- { type: 'text', text: 'DYNAMIC SEGMENT' },
327
- ]);
328
- });
329
- it('preserves system segment boundaries and marks only the cache-tagged block', () => {
330
- const body = buildParams(makeProvider(), cachedParams());
331
- expect(body.system).toEqual([
332
- {
333
- type: 'text',
334
- text: 'STATIC PREFIX',
335
- cache_control: { type: 'ephemeral' },
336
- },
337
- { type: 'text', text: 'DYNAMIC SEGMENT' },
338
- ]);
339
- });
340
- it('marks the tools-array tail and the last message block', () => {
341
- const body = buildParams(makeProvider(), cachedParams());
342
- const bodyTools = body.tools;
343
- expect(bodyTools[0]?.cache_control).toBeUndefined();
344
- expect(bodyTools[1]?.cache_control).toEqual({ type: 'ephemeral' });
345
- const messages = body.messages;
346
- expect(messages[messages.length - 1]?.content).toEqual([
347
- { type: 'text', text: 'hello', cache_control: { type: 'ephemeral' } },
348
- ]);
349
- });
350
- it('places the final breakpoint on the last tool_result block of a tool turn', () => {
351
- const params = cachedParams();
352
- params.messages = [
353
- { role: 'system', content: 'STATIC PREFIX', cacheHint: 'cache' },
354
- { role: 'user', content: 'run the tool' },
355
- {
356
- role: 'assistant',
357
- content: null,
358
- toolCalls: [
359
- {
360
- id: 'tu_1',
361
- type: 'function',
362
- function: { name: 'alpha', arguments: '{}' },
363
- },
364
- ],
365
- },
366
- { role: 'tool', content: 'tool says hi', toolCallId: 'tu_1' },
367
- ];
368
- const body = buildParams(makeProvider(), params);
369
- const messages = body.messages;
370
- expect(messages[messages.length - 1]?.content).toEqual([
371
- {
372
- type: 'tool_result',
373
- tool_use_id: 'tu_1',
374
- content: 'tool says hi',
375
- cache_control: { type: 'ephemeral' },
376
- },
377
- ]);
378
- });
379
- it('keeps the Claude Code identity block FIRST on the OAuth path', () => {
380
- const provider = new AnthropicProvider({ authToken: 'cc-oauth-token' });
381
- const body = buildParams(provider, cachedParams());
382
- const system = body.system;
383
- expect(system[0]?.text).toMatch(/^You are Claude Code/);
384
- expect(system[0]?.cache_control).toBeUndefined();
385
- expect(system[1]).toEqual({
386
- type: 'text',
387
- text: 'STATIC PREFIX',
388
- cache_control: { type: 'ephemeral' },
389
- });
390
- });
391
- });
392
- });
393
- async function* delayedAnthropicStream(delayMs) {
394
- yield {
395
- type: 'message_start',
396
- message: {
397
- id: 'msg_test',
398
- usage: { input_tokens: 1, output_tokens: 0 },
399
- },
400
- };
401
- await new Promise((resolve) => setTimeout(resolve, delayMs));
402
- yield {
403
- type: 'content_block_start',
404
- index: 0,
405
- content_block: { type: 'text' },
406
- };
407
- yield {
408
- type: 'content_block_delta',
409
- index: 0,
410
- delta: { type: 'text_delta', text: 'ok' },
411
- };
412
- yield {
413
- type: 'content_block_stop',
414
- index: 0,
415
- };
416
- yield {
417
- type: 'message_delta',
418
- delta: { stop_reason: 'end_turn' },
419
- usage: { output_tokens: 1 },
420
- };
421
- yield {
422
- type: 'message_stop',
423
- };
424
- }
425
- //# sourceMappingURL=anthropic.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"anthropic.test.js","sourceRoot":"","sources":["../../src/__tests__/anthropic.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAErE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEvE,6EAA6E;AAC7E,2EAA2E;AAC3E,8CAA8C;AAC9C,UAAU,CAAC,GAAG,EAAE;IACf,IAAI,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/C,gBAAgB,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;IACzC,CAAC;AACF,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IACjC,QAAQ,CAAC,qBAAq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E,CAAC,EAAE;SAC5C;KACD,CAAA;IACD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;IAC5D,MAAM;QACL,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,CAAC;QACR,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KAC/B,CAAA;IACD,MAAM;QACL,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE;KACzC,CAAA;IACD,MAAM;QACL,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,CAAC;KACR,CAAA;IACD,MAAM;QACL,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE;QAClC,KAAK,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE;KAC3B,CAAA;IACD,MAAM;QACL,IAAI,EAAE,cAAc;KACpB,CAAA;AACF,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=background-delegation.live.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"background-delegation.live.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/background-delegation.live.test.ts"],"names":[],"mappings":""}