@cendor/contextkit 1.0.0
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.
- package/LICENSE +201 -0
- package/README.md +74 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/index.d.ts +207 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +741 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Raghav Mishra (PowerAI Labs)
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @cendor/contextkit
|
|
2
|
+
|
|
3
|
+
**Assemble LLM context to a token budget — with a receipt.** The TypeScript port of
|
|
4
|
+
[`cendor.contextkit`](https://github.com/cendorhq/cendor-libs/tree/main/packages/cendor-contextkit).
|
|
5
|
+
|
|
6
|
+
Treat the context window like a packed suitcase: declare `Block`s with a priority, a `pin`, and a
|
|
7
|
+
per-block eviction rule; `assemble()` packs them to a token budget **deterministically**, and
|
|
8
|
+
`report()` hands back the receipt — what was kept, shrunk, or dropped, with the token math. Depends
|
|
9
|
+
only on `@cendor/core`; `@cendor/squeeze` plugs in by shape (optional) for reversible compression.
|
|
10
|
+
|
|
11
|
+
The receipt is honest at the **message** level: budgeting charges the per-message framing overhead
|
|
12
|
+
providers add around every turn (self-calibrated from `core.tokens`), so `report().used` equals
|
|
13
|
+
`tokens.count(await ctx.assemble(), model)` for text content — what the model actually sees.
|
|
14
|
+
|
|
15
|
+
## Killer example
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { Block, Context } from '@cendor/contextkit';
|
|
19
|
+
|
|
20
|
+
const ctx = new Context({ budgetTokens: 4000, model: 'gpt-4o', reserveOutput: 500 });
|
|
21
|
+
|
|
22
|
+
ctx.add(new Block('You are a terse, accurate assistant.', { role: 'system', priority: 100, pin: true }))
|
|
23
|
+
.add(new Block(hugeRetrievedDoc, { role: 'user', priority: 5, evict: 'truncate', keep: 'head' }))
|
|
24
|
+
.add(new Block({ messages: chatHistory, priority: 20, evict: 'drop_oldest' })) // peels oldest turns
|
|
25
|
+
.add(new Block(userQuestion, { role: 'user', priority: 90, pin: true }));
|
|
26
|
+
|
|
27
|
+
const messages = await ctx.assemble(); // provider-ready [{ role, content }, ...]
|
|
28
|
+
console.log(ctx.report().toString()); // the receipt: kept / truncated / dropped + token math
|
|
29
|
+
|
|
30
|
+
// Provider adapters (lazy-assemble):
|
|
31
|
+
const [system, msgs] = await ctx.forAnthropic(); // system split out
|
|
32
|
+
const [instruction, contents] = await ctx.forGemini(); // {role:"model"|"user", parts}
|
|
33
|
+
const [sys, bedrock] = await ctx.forBedrock(); // Converse shape
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Surface
|
|
37
|
+
|
|
38
|
+
| Symbol | Kind | Notes |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `Block(contentOrOpts?, opts?)` | class | Exactly one of `content` / `messages`. Fields: `content`, `priority` (0), `pin` (false), `evict` (`'drop_oldest'`), `role` (`'user'`), `summarizer`, `keep` (`'head'`), `messages`. |
|
|
41
|
+
| `Context({ budgetTokens, model, reserveOutput?, compressor?, order?, imageTokens? })` | class | `order` ∈ `'default'` \| `'attention'` \| `'cache'`. |
|
|
42
|
+
| `Context.add(block)` | method | Chainable (`=> this`). |
|
|
43
|
+
| `Context.assemble()` | async | Packs, emits the report on `core.bus`, returns messages. |
|
|
44
|
+
| `Context.report()` | sync | Last receipt; throws `RuntimeError` before the first `assemble()`. |
|
|
45
|
+
| `Context.whatif(budgetTokens)` | async | Preview at a different budget; does not commit or emit. |
|
|
46
|
+
| `Context.forAnthropic()` / `forGemini()` / `forBedrock()` | async | Provider adapters (lazy-assemble). |
|
|
47
|
+
| `AssemblyReport` | class | `budget`, `used`, `reservedOutput`, `model`, `decisions[]`, `order`, `toString()`. |
|
|
48
|
+
| `BlockDecision` | class | `role`, `action`, `tokensBefore`, `tokensAfter`, `note`, `handle`. |
|
|
49
|
+
| `BudgetError` | error | Pinned blocks alone exceed the budget. |
|
|
50
|
+
| `useCompressor(c)` | function | Set the process-wide default compressor for `evict:'compress'`; returns the previous. |
|
|
51
|
+
| `EvictStrategy` | type | `'drop_oldest' | 'truncate' | 'summarize' | 'compress'`. |
|
|
52
|
+
|
|
53
|
+
**Eviction** (`Block.evict`): `'drop_oldest'` (drop the whole block; peel oldest turns for `messages`
|
|
54
|
+
blocks), `'truncate'` (cut to fit, `keep: 'head' | 'tail'`, with a `[truncated]` marker),
|
|
55
|
+
`'summarize'` (call `summarizer(content, targetTokens)`), `'compress'` (via `@cendor/squeeze` or a
|
|
56
|
+
`useCompressor` backend, exposing a reversible `handle` on the decision), or any custom
|
|
57
|
+
`EvictionStrategy` object.
|
|
58
|
+
|
|
59
|
+
## Parity note
|
|
60
|
+
|
|
61
|
+
Faithful port of `cendor.contextkit` 1.0.1: identical public symbols (`snake_case` → `camelCase`,
|
|
62
|
+
kwargs → options objects), identical defaults, **byte-identical string-literal values**
|
|
63
|
+
(`'drop_oldest'`, `'attention'`, the `…[truncated]` markers with U+2026), and the `BudgetError`
|
|
64
|
+
name. Two deliberate adaptations:
|
|
65
|
+
|
|
66
|
+
1. **Single async `assemble()`.** Python's sync `assemble` + async `aassemble` collapse into one
|
|
67
|
+
`async assemble()` that awaits summarizers (sync or async) and the compressor. The Python
|
|
68
|
+
"sync path falls back to truncation for an async summarizer" behavior therefore has no analog —
|
|
69
|
+
async summarizers are simply awaited. `whatif` and the provider adapters are async accordingly.
|
|
70
|
+
2. **Real token counts.** `@cendor/core` bundles js-tiktoken, so counts are the exact tiktoken
|
|
71
|
+
numbers, not Python's forced offline `ceil(len/4)` heuristic. Per-message framing is identical
|
|
72
|
+
(`priming=3`, `perMessage=4`, derived — not hardcoded — from `tokens.count`), so every
|
|
73
|
+
structural guarantee ports verbatim: `used <= budget`, `used === tokens.count(messages, model)`
|
|
74
|
+
for text, deterministic ordering, and roundtrips.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.d.ts","../../core/dist/decimal.d.ts","../../core/dist/types.d.ts","../../core/dist/bus.d.ts","../../core/dist/tokens.d.ts","../../core/dist/json-decimal.d.ts","../../core/dist/prices.d.ts","../../core/dist/protocols.d.ts","../../core/dist/instrument.d.ts","../../core/dist/trace.d.ts","../../core/dist/index.d.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/@types+better-sqlite3@7.6.13/node_modules/@types/better-sqlite3/index.d.ts"],"fileIdsList":[[77,127,144,145,177],[77,124,125,127,144,145],[77,126,127,144,145],[127,144,145],[77,127,132,144,145,162],[77,127,128,133,138,144,145,147,159,170],[77,127,128,129,138,144,145,147],[77,127,144,145],[72,73,74,77,127,144,145],[77,127,130,144,145,171],[77,127,131,132,139,144,145,148],[77,127,132,144,145,159,167],[77,127,133,135,138,144,145,147],[77,126,127,134,144,145],[77,127,135,136,144,145],[77,127,137,138,144,145],[77,126,127,138,144,145],[77,127,138,139,140,144,145,159,170],[77,127,138,139,140,144,145,154,159,162],[77,119,127,135,138,141,144,145,147,159,170],[77,127,138,139,141,142,144,145,147,159,167,170],[77,127,141,143,144,145,159,167,170],[75,76,77,78,79,80,81,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],[77,127,138,144,145],[77,127,144,145,146,170],[77,127,135,138,144,145,147,159],[77,127,144,145,148],[77,127,144,145,149],[77,126,127,144,145,150],[77,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],[77,127,144,145,152],[77,127,144,145,153],[77,127,138,144,145,154,155],[77,127,144,145,154,156,171,173],[77,127,139,144,145],[77,127,138,144,145,159,160,162],[77,127,144,145,161,162],[77,127,144,145,159,160],[77,127,144,145,162],[77,127,144,145,163],[77,124,127,144,145,159,164,170],[77,127,138,144,145,165,166],[77,127,144,145,165,166],[77,127,132,144,145,147,159,167],[77,127,144,145,168],[77,127,144,145,147,169],[77,127,141,144,145,153,170],[77,127,132,144,145,171],[77,127,144,145,159,172],[77,127,144,145,146,173],[77,127,144,145,174],[77,119,127,144,145],[77,119,127,138,140,144,145,150,159,162,170,172,173,175],[77,127,144,145,159,176],[77,91,95,127,144,145,170],[77,91,127,144,145,159,170],[77,86,127,144,145],[77,88,91,127,144,145,167,170],[77,127,144,145,147,167],[77,86,127,144,145,177],[77,88,91,127,144,145,147,170],[77,83,84,87,90,127,138,144,145,159,170],[77,91,98,127,144,145],[77,83,89,127,144,145],[77,91,112,113,127,144,145],[77,87,91,127,144,145,162,170,177],[77,112,127,144,145,177],[77,85,86,127,144,145,177],[77,91,127,144,145],[77,85,86,87,88,89,90,91,92,93,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,113,114,115,116,117,118,127,144,145],[77,91,106,127,144,145],[77,91,98,99,127,144,145],[77,89,91,99,100,127,144,145],[77,90,127,144,145],[77,83,86,91,127,144,145],[77,91,95,99,100,127,144,145],[77,95,127,144,145],[77,89,91,94,127,144,145,170],[77,83,88,91,98,127,144,145],[77,127,144,145,159],[77,86,91,112,127,144,145,175,177],[70,77,127,144,145],[60,77,127,144,145],[61,62,63,64,66,67,68,69,77,127,144,145],[61,77,127,144,145],[61,62,65,77,127,144,145],[62,77,127,144,145]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6cfcf171b5f7ec0cb620eee4669739ad2711597d0ff7fdb79298dfc1118e66a","impliedFormat":1},{"version":"bb38c100cd2793d31175dbf0f1b575c587b1a0f31f8feb757b558e35d00171fa","impliedFormat":99},{"version":"7cba109d3aa85d428bd56701cf3a05386428f0375cc65838ddf2f8fe0df15de9","impliedFormat":99},{"version":"9905c60ed88f3716c66b5fb18f9bb591b1e9e08acefa191c4100bfedb020d2d4","impliedFormat":99},{"version":"1b2b9583729fbb2ea7fe6304ba8b7d84e0bfd5ec56bc0da455bf8ecb4bda4b88","impliedFormat":99},{"version":"9d47c8f72d4499e412f6ec05cb833c88a2ba953856dacb338fd0b6db56a11a90","impliedFormat":99},{"version":"642effec570bee0a7ee4c662c9b7df0d28c506886ae7de829b771574cdcb890f","impliedFormat":99},{"version":"43e8bce82539de97bc713672ff90da86004b255e675c1ff14b650c353d81f519","impliedFormat":99},{"version":"d281173c31754f1315a8c15c51fc508ed00e747a2fa4816c22d33eed7b0b3d64","impliedFormat":99},{"version":"e5e80e13671bf693eae33cfe6039fd55bd2a5b99df6388c608748b91a81ec7a4","impliedFormat":99},{"version":"2b45160a85af583ebcea63d6c4a2af6d71d5d4eee0b3e7046349fefad790de6d","impliedFormat":99},{"version":"e152259e63fe8b8b4d44a70249bbc30cca3158599ea62dae9a4b45234f1aed6a","signature":"42756e4d94d0ae5a170421913d08c6caafed0650d8f073cc737d11e922340485","impliedFormat":99},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d97fb21da858fb18b8ae72c314e9743fd52f73ebe2764e12af1db32fc03f853f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"78dbea00e90d2df8ea3dbef0cc379d95b8be9b71cd6bde4c28728f306811803b","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e1e46d0a9837ee058c100501080c920fa98081ea3956af0374308ba6f22a33e","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"fa7834c715d5357e4540cee40ce96c3250ddb67a7b879a6b7fa0e86d6696f121","impliedFormat":1},{"version":"22dfb07a7ab15b66ac043829056fe70124844636ae719551812ac631ba04985b","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"0cb167c371eaa8c869f8a7656a7296f2e4fae43b4d8b803a680236b24794e5f9","impliedFormat":1},{"version":"0a839dba0287cc0481ad4beedd48a1c64acf1e212ae865d1315f7007ca215161","impliedFormat":1},{"version":"38dc4655376cd1a4bd6bb3763d92949233e33d38d3dd3cbea7bbf218175a38ef","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"d61e0a64cd175208ac0b83670151a9a6b5916f0d1ffcdc5c29c90b1cebfc5045","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"48a679952eefe4cb776d5a0e1ccba2d3eb53b57448bbb7abc1fcebcbd5440188","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2d14da6ecb49bf828d83948765ec2d3a579d476bbb9645e749610baa6ec880ca","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"0aef708fb4c7a6b915e8305cbfac40cd207b032dbaabe9a01889a5fff3254681","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"ad9bdafb4e7abf14cc53ce7970486a84c87831e62891e5dfe798ddcd55e84701","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"71d3ae6a5e73ca4130762560425e00984ebaff64d5353a3333d1bb7eb86ef336","impliedFormat":1},{"version":"c2a6a737189ced24ffe0634e9239b087e4c26378d0490f95141b9b9b042b746c","impliedFormat":1}],"root":[71],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":false,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[178,1],[124,2],[125,2],[126,3],[77,4],[127,5],[128,6],[129,7],[72,8],[75,9],[73,8],[74,8],[130,10],[131,11],[132,12],[133,13],[134,14],[135,15],[136,15],[137,16],[138,17],[139,18],[140,19],[78,8],[76,8],[141,20],[142,21],[143,22],[177,23],[144,24],[145,8],[146,25],[147,26],[148,27],[149,28],[150,29],[151,30],[152,31],[153,32],[154,33],[155,33],[156,34],[157,8],[158,35],[159,36],[161,37],[160,38],[162,39],[163,40],[164,41],[165,42],[166,43],[167,44],[168,45],[169,46],[170,47],[171,48],[172,49],[173,50],[174,51],[79,8],[80,8],[81,8],[120,52],[121,8],[122,8],[123,39],[175,53],[176,54],[82,8],[60,8],[58,8],[59,8],[10,8],[11,8],[13,8],[12,8],[2,8],[14,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[3,8],[22,8],[23,8],[4,8],[24,8],[28,8],[25,8],[26,8],[27,8],[29,8],[30,8],[31,8],[5,8],[32,8],[33,8],[34,8],[35,8],[6,8],[39,8],[36,8],[37,8],[38,8],[40,8],[7,8],[41,8],[46,8],[47,8],[42,8],[43,8],[44,8],[45,8],[8,8],[51,8],[48,8],[49,8],[50,8],[52,8],[9,8],[53,8],[54,8],[55,8],[57,8],[56,8],[1,8],[98,55],[108,56],[97,55],[118,57],[89,58],[88,59],[117,1],[111,60],[116,61],[91,62],[105,63],[90,64],[114,65],[86,66],[85,1],[115,67],[87,68],[92,69],[93,8],[96,69],[83,8],[119,70],[109,71],[100,72],[101,73],[103,74],[99,75],[102,76],[112,1],[94,77],[95,78],[104,79],[84,80],[107,71],[106,69],[110,8],[113,81],[71,82],[63,8],[61,83],[70,84],[68,8],[65,85],[66,86],[67,8],[64,87],[69,8],[62,85]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import type { EvictionStrategy, Handle } from '@cendor/core';
|
|
2
|
+
/** A multimodal content part (`{type, text?, image_url?}`), passed through unchanged. */
|
|
3
|
+
export type Part = Record<string, unknown>;
|
|
4
|
+
/** Single-message block content: plain text, or a list of multimodal parts. */
|
|
5
|
+
export type Content = string | Part[];
|
|
6
|
+
/** A provider-ready chat message. */
|
|
7
|
+
export type Msg = {
|
|
8
|
+
role: string;
|
|
9
|
+
content: Content;
|
|
10
|
+
};
|
|
11
|
+
/** A conversation turn in a `messages` block (`{role, content, ...}`). */
|
|
12
|
+
export type Turn = Record<string, unknown>;
|
|
13
|
+
/** Built-in eviction strategies; `Block.evict` also accepts any `EvictionStrategy` object. */
|
|
14
|
+
export type EvictStrategy = 'drop_oldest' | 'truncate' | 'summarize' | 'compress';
|
|
15
|
+
/** A summarize callback `(content, targetTokens) -> summary` (sync or async). */
|
|
16
|
+
export type Summarizer = (content: string, targetTokens: number) => string | Promise<string>;
|
|
17
|
+
/** A Gemini `contents[]` entry produced by {@link Context.forGemini}. */
|
|
18
|
+
export type GeminiContent = {
|
|
19
|
+
role: string;
|
|
20
|
+
parts: Part[];
|
|
21
|
+
};
|
|
22
|
+
/** Raised when pinned blocks alone exceed the budget (they are never evicted). */
|
|
23
|
+
export declare class BudgetError extends Error {
|
|
24
|
+
constructor(message?: string);
|
|
25
|
+
}
|
|
26
|
+
/** Mirrors Python's `ValueError` — invalid construction arguments. */
|
|
27
|
+
export declare class ValueError extends Error {
|
|
28
|
+
constructor(message?: string);
|
|
29
|
+
}
|
|
30
|
+
/** Mirrors Python's `RuntimeError` — `report()` before `assemble()`. */
|
|
31
|
+
export declare class RuntimeError extends Error {
|
|
32
|
+
constructor(message?: string);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Set the default compressor for `evict="compress"` blocks; returns the previous one.
|
|
36
|
+
*
|
|
37
|
+
* Accepts anything matching core's `Compressor` protocol — a `compress(content, opts)` object or a
|
|
38
|
+
* `(text, opts) => [small, handle]` callable — so you can plug in an alternative backend without
|
|
39
|
+
* touching call sites. Pass `null` to clear (falls back to auto-discovering `@cendor/squeeze`). A
|
|
40
|
+
* per-`Context` `compressor` option still overrides this default.
|
|
41
|
+
*/
|
|
42
|
+
export declare function useCompressor(compressor: unknown): unknown;
|
|
43
|
+
/** Options for {@link Block}. Also the first-argument form for `messages`-only blocks. */
|
|
44
|
+
export interface BlockOpts {
|
|
45
|
+
content?: Content | null;
|
|
46
|
+
priority?: number;
|
|
47
|
+
pin?: boolean;
|
|
48
|
+
evict?: EvictStrategy | EvictionStrategy;
|
|
49
|
+
role?: string;
|
|
50
|
+
summarizer?: Summarizer | null;
|
|
51
|
+
keep?: 'head' | 'tail';
|
|
52
|
+
messages?: Turn[] | null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A unit of context with packing intent.
|
|
56
|
+
*
|
|
57
|
+
* Provide **exactly one** of `content` (a single message, text or multimodal parts) or `messages`
|
|
58
|
+
* (a conversation segment — a list of `{role, content}` turns that `evict="drop_oldest"` shrinks by
|
|
59
|
+
* peeling the *oldest* turns until it fits).
|
|
60
|
+
*
|
|
61
|
+
* Construct positionally with the content first (`new Block('hi', { priority: 5, role: 'system' })`)
|
|
62
|
+
* or via an options object for `messages` blocks (`new Block({ messages: [...], priority: 5 })`).
|
|
63
|
+
*/
|
|
64
|
+
export declare class Block {
|
|
65
|
+
content: Content | null;
|
|
66
|
+
priority: number;
|
|
67
|
+
pin: boolean;
|
|
68
|
+
evict: EvictStrategy | EvictionStrategy;
|
|
69
|
+
role: string;
|
|
70
|
+
summarizer: Summarizer | null;
|
|
71
|
+
keep: 'head' | 'tail';
|
|
72
|
+
messages: Turn[] | null;
|
|
73
|
+
constructor(contentOrOpts?: Content | BlockOpts, opts?: BlockOpts);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* What happened to one block during assembly (a line on the receipt).
|
|
77
|
+
*
|
|
78
|
+
* `tokensBefore`/`tokensAfter` are *content* tokens (framing-exclusive); the report's `used`
|
|
79
|
+
* additionally accounts for per-message framing.
|
|
80
|
+
*/
|
|
81
|
+
export declare class BlockDecision {
|
|
82
|
+
role: string;
|
|
83
|
+
action: string;
|
|
84
|
+
tokensBefore: number;
|
|
85
|
+
tokensAfter: number;
|
|
86
|
+
note: string;
|
|
87
|
+
handle: Handle | null;
|
|
88
|
+
constructor(role: string, action: string, tokensBefore: number, tokensAfter: number, note?: string, handle?: Handle | null);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The receipt: budget math + per-block decisions.
|
|
92
|
+
*
|
|
93
|
+
* `used` is the message-level token count of the assembled prompt (content + framing), so it equals
|
|
94
|
+
* `tokens.count(messages, model)` for text content; multimodal image budget is also charged into
|
|
95
|
+
* `used` even though `core.tokens` can't see image parts.
|
|
96
|
+
*/
|
|
97
|
+
export declare class AssemblyReport {
|
|
98
|
+
budget: number;
|
|
99
|
+
used: number;
|
|
100
|
+
reservedOutput: number;
|
|
101
|
+
model: string;
|
|
102
|
+
decisions: BlockDecision[];
|
|
103
|
+
order: string;
|
|
104
|
+
constructor(budget: number, used: number, reservedOutput: number, model: string, decisions?: BlockDecision[], order?: string);
|
|
105
|
+
toString(): string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* A token-budgeted, declarative context assembler.
|
|
109
|
+
*
|
|
110
|
+
* `order` controls how kept blocks are arranged in the final messages:
|
|
111
|
+
* - `"default"` — role-grouped: system -> history/context -> the user turn.
|
|
112
|
+
* - `"attention"` — "lost-in-the-middle": highest-priority context blocks ride the edges, weakest
|
|
113
|
+
* in the dead center.
|
|
114
|
+
* - `"cache"` — stable prefix first (pinned, high-priority blocks lead) to maximize prompt-cache
|
|
115
|
+
* hits across calls.
|
|
116
|
+
*/
|
|
117
|
+
export interface ContextOpts {
|
|
118
|
+
budgetTokens: number;
|
|
119
|
+
model: string;
|
|
120
|
+
reserveOutput?: number;
|
|
121
|
+
compressor?: unknown;
|
|
122
|
+
order?: string;
|
|
123
|
+
imageTokens?: number | ((part: Part) => number);
|
|
124
|
+
}
|
|
125
|
+
export declare class Context {
|
|
126
|
+
budgetTokens: number;
|
|
127
|
+
model: string;
|
|
128
|
+
reserveOutput: number;
|
|
129
|
+
order: string;
|
|
130
|
+
imageTokens: number | ((part: Part) => number);
|
|
131
|
+
private _compressor;
|
|
132
|
+
private blocks;
|
|
133
|
+
private _report;
|
|
134
|
+
private _messages;
|
|
135
|
+
constructor(opts: ContextOpts);
|
|
136
|
+
/** Add a block. Returns `this` for chaining. */
|
|
137
|
+
add(block: Block): this;
|
|
138
|
+
/**
|
|
139
|
+
* Pack blocks within the budget; return provider-ready messages (OpenAI/Foundry shape).
|
|
140
|
+
*
|
|
141
|
+
* Deterministic: stable sort by `(pinned, priority, insertion order)`. Awaits summarizers and the
|
|
142
|
+
* compressor, then emits the {@link AssemblyReport} onto core's bus.
|
|
143
|
+
*/
|
|
144
|
+
assemble(): Promise<Msg[]>;
|
|
145
|
+
/** Return the receipt for the most recent {@link assemble}. Throws before the first one. */
|
|
146
|
+
report(): AssemblyReport;
|
|
147
|
+
/** Preview the assembly at a different budget without committing (no bus emit). */
|
|
148
|
+
whatif(budgetTokens: number): Promise<AssemblyReport>;
|
|
149
|
+
/**
|
|
150
|
+
* Anthropic adapter: split system blocks out (the Messages API takes `system` apart).
|
|
151
|
+
*
|
|
152
|
+
* Returns `[systemText, messages]`. The Messages API accepts only `user`/`assistant` roles, so any
|
|
153
|
+
* other role (e.g. `tool`) is coerced to `user`. Multimodal content is passed through unchanged.
|
|
154
|
+
*/
|
|
155
|
+
forAnthropic(): Promise<[string, Msg[]]>;
|
|
156
|
+
/**
|
|
157
|
+
* Gemini adapter: returns `[systemInstruction, contents]`.
|
|
158
|
+
*
|
|
159
|
+
* `contents` are `{role: "user"|"model", parts: [...]}` (Gemini uses `model`, not `assistant`);
|
|
160
|
+
* system blocks become the separate `systemInstruction`. Content is normalized to Gemini parts.
|
|
161
|
+
*/
|
|
162
|
+
forGemini(): Promise<[string, GeminiContent[]]>;
|
|
163
|
+
/**
|
|
164
|
+
* Bedrock Converse adapter: returns `[system, messages]`.
|
|
165
|
+
*
|
|
166
|
+
* `system` is `[{text: ...}]` (or empty); `messages` are `{role: "user"|"assistant", content:
|
|
167
|
+
* [...]}` — Bedrock allows only those two roles, so non-user blocks map to `assistant`.
|
|
168
|
+
*/
|
|
169
|
+
forBedrock(): Promise<[Array<{
|
|
170
|
+
text: string;
|
|
171
|
+
}>, Array<{
|
|
172
|
+
role: string;
|
|
173
|
+
content: Part[];
|
|
174
|
+
}>]>;
|
|
175
|
+
/** Join the text of all assembled system messages (adapters split `system` out). */
|
|
176
|
+
private systemText;
|
|
177
|
+
private orderedBlocks;
|
|
178
|
+
private imageCost;
|
|
179
|
+
/** Token cost of content, charging `imageTokens` per image part in multimodal lists. */
|
|
180
|
+
private contentTokens;
|
|
181
|
+
private finish;
|
|
182
|
+
/** Pack blocks within the budget. Awaits the evictor (summarizers / compressor). */
|
|
183
|
+
private pack;
|
|
184
|
+
/**
|
|
185
|
+
* Decide a single-message block's fate up to (not performing) eviction. Throws {@link BudgetError}
|
|
186
|
+
* on pinned overflow.
|
|
187
|
+
*/
|
|
188
|
+
private planBlock;
|
|
189
|
+
/** Fold a non-evict plan ("kept" / "dropped") into the running state. */
|
|
190
|
+
private applyPlan;
|
|
191
|
+
/** Fold an evictor's result back into the running state. */
|
|
192
|
+
private applyEvicted;
|
|
193
|
+
/** Pack a multi-turn block into `state` (the messages-block branch). */
|
|
194
|
+
private packHistoryInto;
|
|
195
|
+
/**
|
|
196
|
+
* Pack a multi-turn block: keep the newest turns that fit, peeling the oldest. `evict="truncate"`
|
|
197
|
+
* additionally tail-trims the surviving newest turn when even it overflows.
|
|
198
|
+
*/
|
|
199
|
+
private packHistory;
|
|
200
|
+
/**
|
|
201
|
+
* Apply a block's eviction strategy. Returns `[contentOrNull, action, note, handle]`; a `null`
|
|
202
|
+
* content means DROP. `contentBudget` is always > 0. Awaits async summarizers and the compressor.
|
|
203
|
+
*/
|
|
204
|
+
private evict;
|
|
205
|
+
private getCompressor;
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|