@letta-ai/letta-agent-sdk 0.6.3 → 0.7.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.
package/AGENTS.md CHANGED
@@ -33,6 +33,48 @@ the selected transport adapter.
33
33
  Those methods operate at different layers and should not be combined merely
34
34
  because they share a name.
35
35
 
36
+ ## Stream identifiers
37
+
38
+ Streamed `SDKMessage` values carry several identifiers, and each one answers a
39
+ different question. Most duplicate or missing message bugs in consumers come
40
+ from using one to answer another's question.
41
+
42
+ - `seqId` answers "have I already processed this stream position?" It is a
43
+ per-run replay cursor: use it to suppress replayed events after a resume or
44
+ reconnect, compare it only within the same `runId`, and reset the threshold
45
+ when a new run starts. It is not row identity.
46
+ - `otid` answers "which typed message slice is this?" Use it to reassemble the
47
+ fragments of one slice. It is not a universal key across message types.
48
+ - `uuid` answers "which message object is this?" Use it for message identity
49
+ and for history cursoring and backfill. It is the top-level message ID when
50
+ the stream provides one and an SDK-generated identifier otherwise, so it is
51
+ neither a guaranteed server ID nor a replay cursor.
52
+ - `toolCallId` answers "which tool call is this about?" Use it to join a
53
+ `tool_call` with its `tool_result`. It is not identity for assistant or
54
+ reasoning messages.
55
+
56
+ Only `assistant` and `reasoning` carry `otid` and `seqId`; `tool_call` and
57
+ `tool_result` carry `toolCallId` and `uuid`. Identity therefore has to be
58
+ decided per message family. A single generic `seqId → otid → uuid` fallback
59
+ chain applied to every message will merge unrelated rows.
60
+
61
+ - Key `assistant` and `reasoning` accumulators on the message type together
62
+ with `otid`, not on `otid` alone. A provider can reuse an `otid` across
63
+ kinds, which collapses assistant text into reasoning. Fall back to `uuid`
64
+ only within the same family — `src/tests/stream-message-identity.test.ts`
65
+ pins the case where two slices share a `uuid` and differ only by type and
66
+ `otid`.
67
+ - Merge tool arguments and results by `toolCallId`, but do not flatten every
68
+ tool-family message onto it. Envelope identity and tool-payload identity are
69
+ distinct.
70
+ - Do not merge persisted history into a transcript while a turn is streaming.
71
+ When backfill after a reconnect is unavoidable, rebase the in-progress
72
+ accumulators onto the fetched rows; otherwise later fragments append to a
73
+ stale baseline and the row renders twice.
74
+ - Mid-stream, `tool_call.toolInput` is `{ raw: "<chunk>" }` until the argument
75
+ fragments parse as JSON. Accumulate `rawArguments` and parse once at the end
76
+ rather than overwriting parsed arguments with a partial wrapper.
77
+
36
78
  ## Cloud API ownership
37
79
 
38
80
  - `@letta-ai/letta-code` owns the agent harness, app-server protocol, runtime
package/README.md CHANGED
@@ -2,315 +2,58 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@letta-ai/letta-agent-sdk.svg?style=flat-square)](https://www.npmjs.com/package/@letta-ai/letta-agent-sdk) [![Discord](https://img.shields.io/badge/discord-join-blue?style=flat-square&logo=discord)](https://discord.gg/letta)
4
4
 
5
- Build applications with stateful agents powered by the [Letta agent harness](https://www.letta.com/agent). The Agent SDK provides one TypeScript interface for managed, local, and self-hosted deployments.
5
+ The SDK for [stateful agents](https://docs.letta.com/concepts/stateful-agents): create an agent once, then resume it from anywhere. Each agent has its own identity and long-term memory, and keeps both across conversations, models, and the computers it runs on.
6
6
 
7
- ## Installation
7
+ Read the [documentation](https://docs.letta.com/agent-sdk) for guides and the full API reference.
8
+
9
+ ## Quick start
8
10
 
9
11
  ```bash
10
12
  npm install @letta-ai/letta-agent-sdk
11
13
  ```
12
14
 
13
- ## Quick start
14
-
15
- ```ts
15
+ ```typescript
16
16
  import { LettaAgentClient } from "@letta-ai/letta-agent-sdk";
17
17
 
18
- const client = new LettaAgentClient({
19
- backend: "cloud",
20
- apiKey: process.env.LETTA_API_KEY,
21
- });
18
+ const client = new LettaAgentClient({ backend: "cloud" });
22
19
 
20
+ // Create the agent once...
23
21
  const agentId = await client.createAgent({
24
- model: "anthropic/claude-opus-4-8",
25
- memory: [
26
- {
27
- label: "persona",
28
- value: "You are a proactive research assistant.",
29
- },
30
- {
31
- label: "human",
32
- value: "The user prefers concise summaries with sources and next steps.",
33
- },
34
- ],
22
+ persona: "You are Nora, a research analyst who tracks our competitors.",
35
23
  });
36
24
 
37
- await using session = client.createSession(agentId);
25
+ // ...then resume it, from anywhere, for as long as it lives.
26
+ await using session = client.resumeSession(agentId);
38
27
 
39
- await session.send("Research the latest project changes and prepare a brief.");
28
+ await session.send("What changed since last week?");
40
29
  for await (const message of session.stream()) {
41
- if (message.type === "assistant") {
42
- console.log(message.content);
43
- }
44
- }
45
- ```
46
-
47
- `createAgent()` uses the supplied memory as the agent's identity. Letta Code
48
- personality presets are opt-in: pass `personality: "memo"` (or another preset)
49
- only when you want that preset's name, description, and memory blocks.
50
-
51
- An agent is the persistent entity with memory. A conversation is a thread on that agent. A session is the active connection used to send messages, stream events, execute tools, and handle approvals.
52
-
53
- - `createSession(agentId)` starts a new conversation.
54
- - `resumeSession(conversationId)` resumes a saved conversation.
55
- - `resumeSession(agentId)` resumes the agent's default conversation.
56
-
57
- Portable sessions also expose the stateful controls needed by interactive
58
- clients:
59
-
60
- ```ts
61
- const state = await session.bootstrapState();
62
- await session.changeDeviceState({
63
- cwd: "/workspace/project",
64
- permissionMode: "acceptEdits",
65
- });
66
-
67
- const removed = await session.removeQueuedMessage(queueItemId);
68
- if (!removed.removed) {
69
- // Reconcile the authoritative queue before offering the action again.
30
+ if (message.type === "assistant") process.stdout.write(message.content);
70
31
  }
71
-
72
- await session.recoverPendingApprovals();
73
32
  ```
74
33
 
75
- `removeQueuedMessage()` waits for an app-server acknowledgement.
76
- `changeDeviceState()` currently confirms command transport only because the
77
- underlying protocol does not acknowledge that mutation.
78
-
79
- The read side of the device state is exposed as a one-shot getter and a
80
- subscription — enough to restore permission-mode UI and re-surface pending
81
- approvals when a mobile or web client returns to the foreground:
82
-
83
- ```ts
84
- const status = await session.getDeviceStatus();
85
- // status.permissionMode, status.workingDirectory, status.isOnline,
86
- // status.isProcessing, status.memoryDirectory,
87
- // status.pendingControlRequests, status.raw
88
-
89
- const unsubscribe = session.onDeviceStatus((status) => {
90
- // Called for every device-status update pushed by the runtime.
91
- });
92
- unsubscribe();
93
- ```
34
+ Set `LETTA_API_KEY` for the cloud backend. See the [quickstart](https://docs.letta.com/agent-sdk/quickstart) for the local and self-hosted paths.
94
35
 
95
- `getDeviceStatus()` always sends a lightweight, request-correlated `sync`
96
- (`recover_approvals: false`, `force_device_status: true`) and resolves only
97
- after the runtime acknowledges it and replays a fresh status. This makes the
98
- getter safe for foreground reconciliation instead of returning a snapshot
99
- cached before the app was backgrounded. Pending approval request IDs are for
100
- correlation; decisions continue through `recoverPendingApprovals()` and the
101
- session's `canUseTool` callback.
102
-
103
- ## Deployment options
104
-
105
- | Backend | Agent state | Tool execution |
106
- | --- | --- | --- |
107
- | `cloud` | Letta Cloud | Managed cloud sandbox or a selected computer |
108
- | `local` | Current computer | Current computer through an SDK-managed App Server |
109
- | `remote` | Configured by the App Server | A user-managed App Server computer |
110
-
111
- ### Choose a computer
112
-
113
- Cloud clients can list the computers registered with the current Letta account
114
- and select one by name when opening a session:
115
-
116
- ```ts
117
- const { computers } = await client.computers.list({ onlineOnly: true });
118
- for (const computer of computers) {
119
- console.log(computer.name, computer.deviceId, computer.status);
120
- }
121
-
122
- await using session = client.resumeSession(agentId, {
123
- computer: "Work laptop",
124
- });
125
- await session.send("Run the test suite on this computer.");
126
- ```
127
-
128
- Computer names must uniquely identify a registered computer. For persisted
129
- selections, use the stable `deviceId`; a `connectionId` identifies only the
130
- current online lease and can rotate after reconnects:
131
-
132
- ```ts
133
- await using session = client.resumeSession(agentId, {
134
- computer: { deviceId: "device-..." },
135
- });
136
- ```
137
-
138
- `client.computers.get(deviceId)` retrieves one computer and
139
- `client.computers.resolve(selector)` resolves a name or ID to its current online
140
- connection. The previous client-level and session-level `environment` options
141
- remain as deprecated compatibility aliases for `computer`.
142
-
143
- ### Local
144
-
145
- ```ts
146
- const client = new LettaAgentClient({ backend: "local" });
147
-
148
- await using session = client.createSession(agentId, {
149
- cwd: process.cwd(),
150
- });
151
- ```
36
+ ## Where your agents run
152
37
 
153
- Local execution (embedded Letta Code harness / app server) requires Node.js 22.19 or newer.
38
+ One interface, three backends:
154
39
 
155
- ### Built-in client toolsets
40
+ | Backend | Agent state | Tools execute |
41
+ | ---------- | ------------------- | -------------------------------------- |
42
+ | `"cloud"` | Hosted by Letta | A managed sandbox, or a computer you connect |
43
+ | `"local"` | On this machine* | On this machine* |
44
+ | `"remote"` | Your App Server | On your App Server machine |
156
45
 
157
- Use `toolset` to select a request-scoped harness preset and add bundled client
158
- tools. `allowedTools` remains the final visibility boundary across bundled and
159
- custom tools.
46
+ \* *"this machine" refers to the machine that the SDK code itself is running on*
160
47
 
161
- Both are scoped to locally executed client tools. Server-side tools (such as
162
- `web_search`) are attached to the agent itself via `baseTools` at creation and
163
- are unaffected by `allowedTools` — listing one there matches nothing.
48
+ Browser, Expo, and React Native applications import from `@letta-ai/letta-agent-sdk/client`, which does not require Node and supports the cloud and remote backends. See [Deployment](https://docs.letta.com/agent-sdk/deployment).
164
49
 
165
- ```ts
166
- await using session = client.createSession(agentId, {
167
- toolset: {
168
- base: "none",
169
- include: ["Read", "LS", "Glob", "Grep"],
170
- },
171
- allowedTools: ["Read", "LS", "Glob", "Grep"],
172
- });
173
- ```
174
-
175
- The override applies to this SDK session's turns without changing the agent's
176
- persisted harness toolset preference.
177
-
178
- ### MCP tools
179
-
180
- Pass MCP servers by name in session options. The SDK supports local stdio,
181
- Streamable HTTP, and legacy SSE transports. It namespaces discovered tools as
182
- `mcp__<server>__<tool>` and exposes them through Letta Code's external-tool
183
- protocol.
184
-
185
- ```ts
186
- await using session = client.createSession(agentId, {
187
- cwd: process.cwd(),
188
- mcpServers: {
189
- filesystem: {
190
- command: "npx",
191
- args: ["-y", "@modelcontextprotocol/server-filesystem", process.cwd()],
192
- },
193
- exa: {
194
- type: "http",
195
- url: "https://mcp.exa.ai/mcp",
196
- },
197
- github: {
198
- type: "http",
199
- url: "https://api.githubcopilot.com/mcp/",
200
- headers: {
201
- Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
202
- },
203
- },
204
- },
205
- allowedTools: ["mcp__filesystem__*", "mcp__exa__*", "mcp__github__list_issues"],
206
- });
207
- ```
208
-
209
- Connections start concurrently during session initialization. A failed server
210
- is skipped without dropping healthy servers. OAuth is host-managed, matching
211
- the Claude Agent SDK: complete OAuth in your application and provide the access
212
- token through `headers`. The SDK does not open an interactive browser flow.
213
-
214
- MCP connections run in the Node SDK process and close with the session. This
215
- includes MCP used by remote and Cloud sessions: stdio servers see the SDK host
216
- filesystem, not a managed sandbox. MCP is unavailable from the portable
217
- `@letta-ai/letta-agent-sdk/client` browser and React Native entry point.
218
-
219
- ### Managed Cloud sandbox repositories
220
-
221
- Cloud sessions can clone up to 10 GitHub repositories into the managed
222
- sandbox. Public repositories clone directly; private repositories require
223
- access through the organization's GitHub integration.
224
-
225
- ```ts
226
- await using session = client.createSession(agentId, {
227
- sandbox: {
228
- githubRepositories: [
229
- { owner: "letta-ai", repo: "letta-docs-md" },
230
- { owner: "letta-ai", repo: "letta-code" },
231
- ],
232
- },
233
- });
234
- ```
235
-
236
- ### Remote App Server
237
-
238
- ```ts
239
- const client = new LettaAgentClient({
240
- backend: "remote",
241
- url: "http://127.0.0.1:4500",
242
- authToken: process.env.LETTA_APP_SERVER_TOKEN,
243
- });
244
- ```
245
-
246
- See the [deployment guide](https://docs.letta.com/letta-agent-sdk/deployment) for managed sandboxes, remote computers, App Server setup, and authentication.
247
-
248
- ## Browser and React Native
249
-
250
- Use the portable `/client` entry point in browser, Expo, and React Native applications. It supports the `cloud` and `remote` backends without importing Node process-management modules.
251
-
252
- ```ts
253
- import { LettaAgentClient } from "@letta-ai/letta-agent-sdk/client";
254
-
255
- const client = new LettaAgentClient({
256
- backend: "cloud",
257
- apiKey: userProvidedApiKey,
258
- webSocketAuth: "query",
259
- });
260
- ```
261
-
262
- For authenticated Remote App Servers in React Native, pass the platform WebSocket through `createReactNativeWebSocketConstructor()` so capability-token headers use React Native's third constructor argument.
263
-
264
- ## Management APIs
265
-
266
- The client exposes agent, conversation, model, computer, and Cloud repository management alongside active sessions:
267
-
268
- ```ts
269
- const agents = await client.agents.list({ tags: ["support"] });
270
- const conversations = await client.conversations.list({
271
- agentId: agents[0].id,
272
- orderBy: "lastMessageAt",
273
- order: "desc",
274
- });
275
-
276
- // No open session required — safe for model pickers and settings screens.
277
- const { entries: models, availableHandles } = await client.models.list();
278
-
279
- const repository = await client.repositories.create({ name: "inputs" });
280
- await client.repositories.files.create(repository.id, {
281
- path: "brief.md",
282
- content: "# Project brief\n",
283
- });
284
-
285
- // Persistent agent knowledge: attach once during provisioning. This
286
- // recompiles the agent's default conversation after the relationship is
287
- // visible, and session.close() will not detach it.
288
- await client.agents.repositories.attach(agents[0].id, repository.id, {
289
- permissions: "read",
290
- });
291
-
292
- // Remove persistent knowledge explicitly during deprovisioning.
293
- await client.agents.repositories.detach(agents[0].id, repository.id);
294
- await client.agents.delete(agents[0].id);
295
- ```
50
+ ## Examples
296
51
 
297
- `client.repositories` and `client.agents.repositories` are available on the
298
- `cloud` backend. Persistent agent relationships belong under
299
- `client.agents.repositories`; use session `resources` only when the session
300
- should own attachment and cleanup. Attach and detach recompile the agent's
301
- default conversation by default; pass `{ recompile: false }` only when the
302
- caller will handle prompt recompilation separately. Existing explicit
303
- conversations are not silently recompiled. If recompilation fails after a
304
- successful relationship mutation, the method rejects but the attachment state
305
- remains changed; retrying is safe. See [Cloud repositories](https://docs.letta.com/letta-agent-sdk/repositories) for file operations, version history, and session resources.
52
+ Runnable applications live in [`examples/`](./examples) — including a web chat UI, client tools, and multi-agent systems. See the [React chat template](https://github.com/letta-ai/letta-agent-sdk-react-chat) for a more complete example of a custom UI running on the Letta Agent SDK.
306
53
 
307
- ## Documentation
54
+ ## Contributing
308
55
 
309
- - [Overview](https://docs.letta.com/letta-agent-sdk/overview)
310
- - [Quickstart](https://docs.letta.com/letta-agent-sdk/quickstart)
311
- - [Deployment](https://docs.letta.com/letta-agent-sdk/deployment)
312
- - [SDK reference](https://docs.letta.com/letta-agent-sdk/reference)
313
- - [Examples](./examples)
56
+ Development conventions for this repository are in [AGENTS.md](./AGENTS.md).
314
57
 
315
58
  ---
316
59
 
@@ -1 +1 @@
1
- {"version":3,"file":"app-server-session.d.ts","sourceRoot":"","sources":["../src/app-server-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,gCAAgC,EAEtC,MAAM,wCAAwC,CAAC;AAqBhD,OAAO,EACL,uBAAuB,EAKvB,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAElB,8BAA8B,EAC9B,6BAA6B,EAC7B,WAAW,EACX,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAWpB,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAIF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/B,MAAM,EAAE,GAAG,SAAS,CAStB;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,4BAA4B,CAAC,GAAG;IAC5E,0BAA0B;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,CACR,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAChC,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,IAAI,IAAI,CAAA;KAAE,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,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S,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAA;KAAO,GACtF,OAAO,CAAC,SAAS,CAAC;IAqBf,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IASvC,WAAW,CACf,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC;IAYvB,uBAAuB,CAC3B,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE,8BAAmC,GAC3C,OAAO,CAAC,6BAA6B,CAAC;IAqBnC,YAAY,CAChB,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC;IAwC9B,KAAK,IAAI,IAAI;CAGd;AAED,qBAAa,gBAAiB,SAAQ,uBAAuB;IASzD,OAAO,CAAC,QAAQ,CAAC,aAAa;IARhC,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,aAAa,CAAmC;IACxD,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,yBAAyB,CAA6B;IAC9D,OAAO,CAAC,2BAA2B,CAA6B;gBAG7C,aAAa,EAAE,uBAAuB,EACvD,IAAI,EAAE,oBAAoB;cAYT,iBAAiB,CAAC,OAAO,EAAE,6BAA6B,GAAG,kBAAkB,GAAG,OAAO;cAKjF,2BAA2B,IAAI,OAAO,CAAC,kBAAkB,CAAC;cAqFhE,WAAW,IAAI,IAAI;cAUb,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxD,OAAO,CAAC,cAAc;YAOR,mBAAmB;YAenB,YAAY;YAOZ,wBAAwB;YAqExB,0BAA0B;CAqBzC"}
@@ -15,6 +15,8 @@ export { RepositoriesClient } from "./repositories.js";
15
15
  export type { Computer, ComputerMetadata, ComputerSelector, ComputersClient, ListComputersOptions, ListComputersResult, ResolvedComputer, } from "./computers.js";
16
16
  export type * from "./management-types.js";
17
17
  export { extractStreamTextDelta } from "./stream-events.js";
18
+ export { createTranscriptAccumulator } from "./transcript-accumulator.js";
19
+ export type { TranscriptAccumulator, TranscriptHistoryPage, TranscriptRebaseOptions, TranscriptRow, TranscriptRowIdentity, TranscriptRowKind, TranscriptTextKind, TranscriptTextRow, TranscriptToolCallRow, TranscriptToolCallStatus, TranscriptToolResult, } from "./transcript-accumulator.js";
18
20
  export { createReactNativeWebSocketConstructor } from "./websocket.js";
19
21
  export type * from "./types.js";
20
22
  //# sourceMappingURL=client-entry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-entry.d.ts","sourceRoot":"","sources":["../src/client-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EACV,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,+BAA+B,GACvC,4BAA4B,GAC5B,2BAA2B,CAAC;AAEhC;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,oBAAoB;gBAC5C,OAAO,EAAE,+BAA+B;CAMrD;AAED,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EACV,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,mBAAmB,uBAAuB,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,qCAAqC,EAAE,MAAM,gBAAgB,CAAC;AACvE,mBAAmB,YAAY,CAAC"}
1
+ {"version":3,"file":"client-entry.d.ts","sourceRoot":"","sources":["../src/client-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EA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