@slopus/happy-agent-base 0.0.1 → 0.0.3

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 (90) hide show
  1. package/README.md +20 -235
  2. package/dist/Agent.d.ts +71 -9
  3. package/dist/Agent.d.ts.map +1 -1
  4. package/dist/Agent.js +258 -40
  5. package/dist/Agent.js.map +1 -1
  6. package/dist/AgentBase.d.ts +268 -23
  7. package/dist/AgentBase.d.ts.map +1 -1
  8. package/dist/AgentBase.js +1620 -333
  9. package/dist/AgentBase.js.map +1 -1
  10. package/dist/AgentBaseHooks.d.ts +108 -24
  11. package/dist/AgentBaseHooks.d.ts.map +1 -1
  12. package/dist/AgentBasePending.d.ts +44 -0
  13. package/dist/AgentBasePending.d.ts.map +1 -0
  14. package/dist/AgentBasePending.js +64 -0
  15. package/dist/AgentBasePending.js.map +1 -0
  16. package/dist/AgentBaseState.d.ts +2 -0
  17. package/dist/AgentBaseState.d.ts.map +1 -1
  18. package/dist/AgentConfig.d.ts +67 -0
  19. package/dist/AgentConfig.d.ts.map +1 -0
  20. package/dist/AgentConfig.js +81 -0
  21. package/dist/AgentConfig.js.map +1 -0
  22. package/dist/AgentContexts.d.ts +40 -0
  23. package/dist/AgentContexts.d.ts.map +1 -0
  24. package/dist/AgentContexts.js +70 -0
  25. package/dist/AgentContexts.js.map +1 -0
  26. package/dist/AgentFeature.d.ts +118 -15
  27. package/dist/AgentFeature.d.ts.map +1 -1
  28. package/dist/AgentKV.d.ts +58 -0
  29. package/dist/AgentKV.d.ts.map +1 -0
  30. package/dist/AgentKV.js +114 -0
  31. package/dist/AgentKV.js.map +1 -0
  32. package/dist/AgentModel.d.ts +17 -0
  33. package/dist/AgentModel.d.ts.map +1 -0
  34. package/dist/AgentModel.js +2 -0
  35. package/dist/AgentModel.js.map +1 -0
  36. package/dist/{AgentBasePersistence.d.ts → AgentPersistence.d.ts} +13 -8
  37. package/dist/AgentPersistence.d.ts.map +1 -0
  38. package/dist/AgentPersistence.js +2 -0
  39. package/dist/AgentPersistence.js.map +1 -0
  40. package/dist/AgentProviders.d.ts +22 -7
  41. package/dist/AgentProviders.d.ts.map +1 -1
  42. package/dist/AgentProviders.js +18 -9
  43. package/dist/AgentProviders.js.map +1 -1
  44. package/dist/AgentRef.d.ts +41 -0
  45. package/dist/AgentRef.d.ts.map +1 -0
  46. package/dist/AgentRef.js +60 -0
  47. package/dist/AgentRef.js.map +1 -0
  48. package/dist/AgentStorage.d.ts +39 -0
  49. package/dist/AgentStorage.d.ts.map +1 -0
  50. package/dist/AgentStorage.js +49 -0
  51. package/dist/AgentStorage.js.map +1 -0
  52. package/dist/AgentSystem.d.ts +52 -0
  53. package/dist/AgentSystem.d.ts.map +1 -0
  54. package/dist/AgentSystem.js +2 -0
  55. package/dist/AgentSystem.js.map +1 -0
  56. package/dist/AgentSystemContext.d.ts +15 -0
  57. package/dist/AgentSystemContext.d.ts.map +1 -0
  58. package/dist/AgentSystemContext.js +20 -0
  59. package/dist/AgentSystemContext.js.map +1 -0
  60. package/dist/AgentSystemLocal.d.ts +104 -0
  61. package/dist/AgentSystemLocal.d.ts.map +1 -0
  62. package/dist/AgentSystemLocal.js +401 -0
  63. package/dist/AgentSystemLocal.js.map +1 -0
  64. package/dist/AgentSystemRef.d.ts +56 -0
  65. package/dist/AgentSystemRef.d.ts.map +1 -0
  66. package/dist/AgentSystemRef.js +75 -0
  67. package/dist/AgentSystemRef.js.map +1 -0
  68. package/dist/AgentTaskContext.d.ts +17 -0
  69. package/dist/AgentTaskContext.d.ts.map +1 -0
  70. package/dist/AgentTaskContext.js +26 -0
  71. package/dist/AgentTaskContext.js.map +1 -0
  72. package/dist/AgentTool.d.ts +40 -0
  73. package/dist/AgentTool.d.ts.map +1 -1
  74. package/dist/AgentTool.js.map +1 -1
  75. package/dist/index.d.ts +21 -7
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +24 -3
  78. package/dist/index.js.map +1 -1
  79. package/dist/models.d.ts +62 -0
  80. package/dist/models.d.ts.map +1 -0
  81. package/dist/models.js +185 -0
  82. package/dist/models.js.map +1 -0
  83. package/package.json +6 -4
  84. package/dist/AgentBaseContext.d.ts +0 -22
  85. package/dist/AgentBaseContext.d.ts.map +0 -1
  86. package/dist/AgentBaseContext.js +0 -33
  87. package/dist/AgentBaseContext.js.map +0 -1
  88. package/dist/AgentBasePersistence.d.ts.map +0 -1
  89. package/dist/AgentBasePersistence.js +0 -2
  90. package/dist/AgentBasePersistence.js.map +0 -1
package/dist/Agent.js CHANGED
@@ -1,118 +1,336 @@
1
- import { AgentBase } from "./AgentBase.js";
1
+ import { AgentBase, } from "./AgentBase.js";
2
+ import { agentEffort, agentKV, agentModel, agentProvider, agentRunKV, agentServiceTier, withAgentKV, withAgentRunKV, } from "./AgentContexts.js";
2
3
  /**
3
4
  * A thin wrapper around `AgentBase` that assembles its behavior from features. Each feature
4
5
  * implements any subset of the agent hooks on its own; the agent merges them into the singular
5
- * private hooks its internal base runs with. Observing hooks fan out to every feature in array
6
- * order, instructions concatenate, tools concatenate, lifecycle actions concatenate, and the
7
- * first feature to answer a reset injection wins.
6
+ * private hooks its internal base runs with.
7
+ *
8
+ * Features are independent. Observing hooks events and lifecycle brackets — fan out to every
9
+ * feature in array order with per-feature isolation, so one throwing feature never silences the
10
+ * others, and lifecycle actions concatenate across features with a failing feature losing only
11
+ * its own actions. Correctness hooks are loud instead: instructions and tools concatenate in
12
+ * feature order — extending the base state, which `AgentBase` puts first — and a failure there
13
+ * fails the turn rather than running with a wrong configuration. For a model change, every
14
+ * feature observes the change, the first returned handoff wins, and a feature failure during an
15
+ * incompatible change rejects the switch so the history survives.
8
16
  */
9
17
  export class Agent {
18
+ /** The session this agent is a facade over; every operation delegates straight to it. */
10
19
  #base;
11
- constructor(ctx, options) {
12
- const { features, ...base } = options;
13
- this.#base = new AgentBase(ctx, {
14
- ...base,
15
- hooks: mergeFeatures(features ?? []),
16
- });
20
+ /** The features whose hooks were merged into the base, kept in the order they were given. */
21
+ #features;
22
+ /**
23
+ * A new agent over a fresh identity, with its features' hooks merged into one set. Touches
24
+ * no storage.
25
+ */
26
+ static async create(ctx, options) {
27
+ const { features, base } = split(options);
28
+ return new Agent(await AgentBase.create(ctx, base), features);
17
29
  }
30
+ /**
31
+ * An agent over an identity that may already have durable state, with that state's one
32
+ * externally meaningful fact — whether it has work left — read before it is handed back.
33
+ */
34
+ static async load(ctx, options) {
35
+ const { features, base } = split(options);
36
+ return new Agent(await AgentBase.load(ctx, base), features);
37
+ }
38
+ /**
39
+ * Load the agent and set it going again if it has work left, or answer with nothing when it
40
+ * has none — how an owner coming up carries on what an earlier process was in the middle of.
41
+ */
42
+ static async loadActive(ctx, options) {
43
+ const { features, base } = split(options);
44
+ const loaded = await AgentBase.loadActive(ctx, base);
45
+ return loaded === undefined ? undefined : new Agent(loaded, features);
46
+ }
47
+ /**
48
+ * Wrap an already-built base. Private, because an agent is made by `create` or by `load`,
49
+ * and which of the two the caller means is worth saying.
50
+ */
51
+ constructor(base, features) {
52
+ this.#features = features;
53
+ this.#base = base;
54
+ }
55
+ /** The stable session identity this agent was created with. */
18
56
  get id() {
19
57
  return this.#base.id;
20
58
  }
59
+ /** Whether durable state says this agent still has work to resume. */
60
+ get active() {
61
+ return this.#base.active;
62
+ }
63
+ /**
64
+ * The feature this agent runs under `name`, when it has one. An individual feature holds the
65
+ * state of the single agent it was built for, so this is how that agent's owner reaches what
66
+ * belongs to it — a goal to pause, for instance. A shared feature is answered here too, but
67
+ * it is the collection's instance, serving every agent at once.
68
+ */
69
+ feature(name) {
70
+ return this.#features.find((feature) => feature.name === name);
71
+ }
72
+ /**
73
+ * The base's mutable instructions and tools, which every inference reads and every feature's
74
+ * own contribution extends.
75
+ */
21
76
  get state() {
22
77
  return this.#base.state;
23
78
  }
79
+ /** Queue a user message that injects as soon as the current response and tool batch finish. */
24
80
  async steer(ctx, message, options) {
25
81
  await this.#base.steer(ctx, message, options);
26
82
  }
83
+ /** Queue a user message that injects only when the agent would otherwise stop. */
27
84
  async send(ctx, message, options) {
28
85
  await this.#base.send(ctx, message, options);
29
86
  }
87
+ /** Start the loop without a new message, continuing a turn an earlier run left unfinished. */
30
88
  start() {
31
89
  this.#base.start();
32
90
  }
91
+ /** Wait until the agent has nothing left to do, including work it accepted but never began. */
33
92
  async waitForIdle() {
34
93
  await this.#base.waitForIdle();
35
94
  }
36
- async compact(ctx) {
37
- await this.#base.compact(ctx);
95
+ /** Ask for the conversation to be replaced by the provider's summary of it. */
96
+ async compact(ctx, options) {
97
+ await this.#base.compact(ctx, options);
38
98
  }
39
- async abort() {
40
- await this.#base.abort();
99
+ /** Cancel the active turn, leaving queued messages durable for the next one. */
100
+ async abort(ctx, options) {
101
+ await this.#base.abort(ctx, options);
41
102
  }
103
+ /** Finish everything already accepted, then destroy the provider session. */
42
104
  async close() {
43
105
  await this.#base.close();
44
106
  }
107
+ /**
108
+ * Wait for a close that has already been requested to finish, including when its original
109
+ * caller was inside the agent and could not wait for its own turn.
110
+ */
111
+ async waitForClosed() {
112
+ await this.#base.waitForClosed();
113
+ }
45
114
  }
46
115
  /**
47
116
  * Merge every feature's hook implementations into one `AgentBaseHooks`. A hook is provided only
48
- * when at least one feature implements it, so the base's own fallbackssuch as the mutable
49
- * state for instructions and tools — stay in effect otherwise.
117
+ * when at least one feature implements it, so the base's own behaviorthe mutable state alone
118
+ * for instructions and tools — stays in effect otherwise.
119
+ */
120
+ /**
121
+ * Separate the features from the options the base is built with, and merge their hooks into the
122
+ * one set the base observes the run through. Both factories need exactly this, and the merge has
123
+ * to happen before the base exists.
50
124
  */
51
- function mergeFeatures(features) {
125
+ function split(options) {
126
+ const { features, sharedKV, ...rest } = options;
127
+ const resolved = features ?? [];
128
+ return {
129
+ features: resolved,
130
+ base: { ...rest, hooks: mergeFeatures(resolved, options, sharedKV) },
131
+ };
132
+ }
133
+ function mergeFeatures(features, options, sharedKV) {
134
+ /** What one feature's hook is handed alongside the context, for this call. */
135
+ const scopeOf = (ctx, feature) => featureScope(ctx, feature, options, sharedKV);
52
136
  const withInstructions = features.filter((feature) => feature.instructions !== undefined);
53
137
  const withTools = features.filter((feature) => feature.tools !== undefined);
138
+ const withToolExecution = features.filter((feature) => feature.aroundToolExecution !== undefined);
54
139
  const withModelChanged = features.filter((feature) => feature.modelChanged !== undefined);
140
+ const withEvents = features.filter((feature) => feature.onEvent !== undefined);
141
+ // Observing hooks fan out with per-feature isolation: one throwing feature must never
142
+ // prevent the features after it from observing.
55
143
  const fanOut = (pick) => {
56
144
  const implemented = features.filter((feature) => pick(feature) !== undefined);
57
145
  if (implemented.length === 0)
58
146
  return undefined;
59
- return (ctx) => {
60
- for (const feature of implemented)
61
- pick(feature)?.(ctx);
147
+ return async (ctx, ...args) => {
148
+ for (const feature of implemented) {
149
+ try {
150
+ await pick(feature)?.(featureCtx(ctx, feature), scopeOf(ctx, feature), ...args);
151
+ }
152
+ catch {
153
+ // Features observe independently; one failing never silences the rest.
154
+ }
155
+ }
62
156
  };
63
157
  };
158
+ // Transactional hooks run in order inside one transaction, and a failure propagates: the
159
+ // features here are writing alongside the fact being committed, so containing one feature's
160
+ // failure would commit a conclusion the rest of the transaction contradicts.
161
+ const chain = (pick) => {
162
+ const implemented = features.filter((feature) => pick(feature) !== undefined);
163
+ if (implemented.length === 0)
164
+ return undefined;
165
+ return async (ctx) => {
166
+ for (const feature of implemented) {
167
+ await pick(feature)?.(featureCtx(ctx, feature), scopeOf(ctx, feature));
168
+ }
169
+ };
170
+ };
171
+ // Action hooks concatenate what every feature asks for; a failing feature loses only its
172
+ // own actions.
64
173
  const collect = (pick) => {
65
174
  const implemented = features.filter((feature) => pick(feature) !== undefined);
66
175
  if (implemented.length === 0)
67
176
  return undefined;
68
- return (ctx) => implemented.flatMap((feature) => pick(feature)?.(ctx) ?? []);
177
+ return async (ctx, ...args) => {
178
+ const actions = [];
179
+ for (const feature of implemented) {
180
+ try {
181
+ actions.push(...((await pick(feature)?.(featureCtx(ctx, feature), scopeOf(ctx, feature), ...args)) ?? []));
182
+ }
183
+ catch {
184
+ // Features act independently; one failing never discards the rest.
185
+ }
186
+ }
187
+ return actions;
188
+ };
69
189
  };
70
- const onEvent = fanOutEvent(features);
71
190
  return {
72
- ...(onEvent === undefined ? {} : { onEvent }),
191
+ ...(withEvents.length === 0
192
+ ? {}
193
+ : {
194
+ onEvent: ((ctx, event) => {
195
+ for (const feature of withEvents) {
196
+ try {
197
+ feature.onEvent?.(featureCtx(ctx, feature), scopeOf(ctx, feature), event);
198
+ }
199
+ catch {
200
+ // Features observe independently; one failing never silences
201
+ // the rest.
202
+ }
203
+ }
204
+ }),
205
+ }),
73
206
  ...(withInstructions.length === 0
74
207
  ? {}
75
208
  : {
76
- instructions: (ctx) => withInstructions
77
- .map((feature) => feature.instructions?.(ctx) ?? "")
78
- .filter((text) => text.length > 0)
79
- .join("\n\n"),
209
+ // Correctness hook: a failing feature propagates and fails the turn.
210
+ instructions: async (ctx) => {
211
+ const texts = [];
212
+ for (const feature of withInstructions) {
213
+ texts.push((await feature.instructions?.(featureCtx(ctx, feature), scopeOf(ctx, feature))) ?? "");
214
+ }
215
+ return texts.filter((text) => text.length > 0).join("\n\n");
216
+ },
80
217
  }),
81
218
  ...(withTools.length === 0
82
219
  ? {}
83
220
  : {
84
- tools: (ctx) => withTools.flatMap((feature) => [...(feature.tools?.(ctx) ?? [])]),
221
+ // Correctness hook: a failing feature propagates and fails the turn; the
222
+ // base validates the merged list against duplicate names.
223
+ tools: async (ctx) => {
224
+ const tools = [];
225
+ for (const feature of withTools) {
226
+ tools.push(...((await feature.tools?.(featureCtx(ctx, feature), scopeOf(ctx, feature))) ?? []));
227
+ }
228
+ return tools;
229
+ },
230
+ }),
231
+ ...(withToolExecution.length === 0
232
+ ? {}
233
+ : {
234
+ // Correctness middleware: the first feature is the outermost wrapper, and a
235
+ // failure propagates to the base so it becomes this call's error result.
236
+ aroundToolExecution: async (ctx, execution) => {
237
+ const invoke = async (index) => {
238
+ const feature = withToolExecution[index];
239
+ if (feature === undefined)
240
+ return await execution.execute();
241
+ let continued;
242
+ return await feature.aroundToolExecution?.(featureCtx(ctx, feature), scopeOf(ctx, feature), {
243
+ ...execution,
244
+ // A wrapper may inspect the continuation from more than one
245
+ // code path; every call joins the same downstream execution.
246
+ execute: () => (continued ??= invoke(index + 1)),
247
+ });
248
+ };
249
+ return await invoke(0);
250
+ },
85
251
  }),
86
252
  ...(withModelChanged.length === 0
87
253
  ? {}
88
254
  : {
89
- modelChanged: (ctx, change) => {
255
+ modelChanged: async (ctx, change) => {
90
256
  let injected;
91
- // Every feature observes the change; the first returned message wins.
257
+ let failed = false;
258
+ let failure;
259
+ // Every feature observes the change even when an earlier one fails;
260
+ // the first returned handoff wins.
92
261
  for (const feature of withModelChanged) {
93
- const message = feature.modelChanged?.(ctx, change);
94
- injected ??= message;
262
+ try {
263
+ const message = await feature.modelChanged?.(featureCtx(ctx, feature), scopeOf(ctx, feature), change);
264
+ injected ??= message;
265
+ }
266
+ catch (error) {
267
+ if (!failed) {
268
+ failed = true;
269
+ failure = error;
270
+ }
271
+ }
95
272
  }
273
+ // A failing feature during an incompatible change rejects the switch,
274
+ // preserving the history; on a compatible change it merely observed.
275
+ if (failed && change.wasReset)
276
+ throw failure;
96
277
  return injected;
97
278
  },
98
279
  }),
99
280
  ...spread("beforeAgentLoop", fanOut((feature) => feature.beforeAgentLoop)),
100
- ...spread("beforeTurn", fanOut((feature) => feature.beforeTurn)),
281
+ ...spread("beforeTurn", collect((feature) => feature.beforeTurn)),
101
282
  ...spread("beforeInference", fanOut((feature) => feature.beforeInference)),
102
283
  ...spread("afterInference", fanOut((feature) => feature.afterInference)),
103
284
  ...spread("afterTurn", collect((feature) => feature.afterTurn)),
104
285
  ...spread("afterAgentLoop", collect((feature) => feature.afterAgentLoop)),
286
+ ...spread("afterAgentSettledTransact", chain((feature) => feature.afterAgentSettledTransact)),
287
+ ...spread("afterAgentSettled", fanOut((feature) => feature.afterAgentSettled)),
105
288
  };
106
289
  }
107
- function fanOutEvent(features) {
108
- const implemented = features.filter((feature) => feature.onEvent !== undefined);
109
- if (implemented.length === 0)
110
- return undefined;
111
- return (ctx, event) => {
112
- for (const feature of implemented)
113
- feature.onEvent?.(ctx, event);
290
+ /**
291
+ * The context a feature's hooks run on: the agent's context with both key-value stores narrowed
292
+ * to the feature's own name, so features never see each other's persisted entries — and neither
293
+ * does a tool one of them runs.
294
+ */
295
+ function featureCtx(ctx, feature) {
296
+ const kv = agentKV(ctx);
297
+ const runKV = agentRunKV(ctx);
298
+ const scoped = kv === undefined ? ctx : withAgentKV(ctx, kv.scoped("feature", feature.name));
299
+ return runKV === undefined
300
+ ? scoped
301
+ : withAgentRunKV(scoped, runKV.scoped("feature", feature.name));
302
+ }
303
+ /**
304
+ * What a feature's hook is handed alongside the context: the agent it is serving, and its own
305
+ * scope of each of the three stores. The selection comes from the context the agent derived for
306
+ * this call, so a hook always sees the model, effort, and tier the work is actually running on
307
+ * rather than the ones the agent was built with.
308
+ */
309
+ function featureScope(ctx, feature, options, sharedKV) {
310
+ const kv = agentKV(ctx);
311
+ const runKV = agentRunKV(ctx);
312
+ if (kv === undefined || runKV === undefined) {
313
+ throw new Error(`The feature "${feature.name}" was called on a context carrying no agent stores.`);
314
+ }
315
+ const provider = agentProvider(ctx) ?? options.provider;
316
+ return {
317
+ agent: {
318
+ id: options.id,
319
+ provider,
320
+ providerKind: options.providers.typeOf(provider) ?? undefined,
321
+ model: agentModel(ctx) ?? options.model,
322
+ effort: agentEffort(ctx) ?? options.effort,
323
+ tier: agentServiceTier(ctx) ?? options.serviceTier,
324
+ },
325
+ kv: kv.scoped("feature", feature.name),
326
+ sharedKV: sharedKV.scoped(feature.name),
327
+ runKV: runKV.scoped("feature", feature.name),
114
328
  };
115
329
  }
330
+ /**
331
+ * One optional entry to spread into the merged hooks: the key when a merged implementation
332
+ * exists, and nothing at all when no feature implemented it, so the base keeps its own behavior.
333
+ */
116
334
  function spread(key, value) {
117
335
  return value === undefined ? {} : { [key]: value };
118
336
  }
package/dist/Agent.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Agent.js","sourceRoot":"","sources":["../sources/Agent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAuD,MAAM,gBAAgB,CAAC;AAahG;;;;;;GAMG;AACH,MAAM,OAAO,KAAK;IACL,KAAK,CAAY;IAE1B,YAAY,GAAY,EAAE,OAA2B;QACjD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE;YAC5B,GAAG,IAAI;YACP,KAAK,EAAE,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAC;SACvC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACzB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,KAAK,CACP,GAAY,EACZ,OAA2B,EAC3B,OAAiC;QAEjC,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,IAAI,CACN,GAAY,EACZ,OAA2B,EAC3B,OAAiC;QAEjC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,KAAK;QACD,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,WAAW;QACb,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAY;QACtB,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,C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