@3ngram/server 1.3.0 → 1.4.2
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/dist/mcp/prompts.d.ts +5 -6
- package/dist/mcp/prompts.js +12 -10
- package/dist/mcp/prompts.js.map +1 -1
- package/dist/mcp/resources.js +4 -2
- package/dist/mcp/resources.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +4 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools-admin.js +61 -18
- package/dist/mcp/tools-admin.js.map +1 -1
- package/dist/mcp/tools-search.js +184 -83
- package/dist/mcp/tools-search.js.map +1 -1
- package/dist/mcp/tools.d.ts +4 -6
- package/dist/mcp/tools.js +43 -22
- package/dist/mcp/tools.js.map +1 -1
- package/dist/rest/route-helpers.d.ts +6 -1
- package/dist/rest/route-helpers.js +9 -0
- package/dist/rest/route-helpers.js.map +1 -1
- package/dist/rest/router.js +42 -13
- package/dist/rest/router.js.map +1 -1
- package/dist/rest/search-router.js +22 -8
- package/dist/rest/search-router.js.map +1 -1
- package/dist/routes/capabilities.js.map +1 -1
- package/package.json +4 -4
package/dist/mcp/prompts.d.ts
CHANGED
|
@@ -11,14 +11,13 @@ interface RegisterablePrompt {
|
|
|
11
11
|
register: (server: McpServer, ctx: ToolContext) => void;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* THE code-defined prompt surface
|
|
15
|
-
*
|
|
16
|
-
* array. Each entry carries its name (auditable) and a server-bound
|
|
17
|
-
* so the registry stays type-safe over heterogeneous arg shapes
|
|
14
|
+
* THE code-defined prompt surface — 2 today (briefing, debrief;
|
|
15
|
+
* docs/concepts/mcp-design.mdx). Length === registered count, auditable from this
|
|
16
|
+
* one array. Each entry carries its name (auditable) and a server-bound
|
|
17
|
+
* registrar, so the registry stays type-safe over heterogeneous arg shapes
|
|
18
|
+
* without an `any`.
|
|
18
19
|
*/
|
|
19
20
|
export declare const PROMPTS: readonly RegisterablePrompt[];
|
|
20
|
-
/** Hard ceiling per docs/concepts/mcp-design.mdx (v1: exactly 2; resources deferred). */
|
|
21
|
-
export declare const MAX_PROMPTS = 2;
|
|
22
21
|
/**
|
|
23
22
|
* Register every code-defined prompt on the McpServer. Called from
|
|
24
23
|
* {@link createMcpServer} alongside the registerTool loop; registerPrompt
|
package/dist/mcp/prompts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
// MCP PROMPTS — code-defined templates:
|
|
2
|
+
// MCP PROMPTS — code-defined templates: 2 today (briefing, debrief).
|
|
3
3
|
//
|
|
4
4
|
// A PROMPT is a reusable, parameterised message template the client surfaces to
|
|
5
5
|
// its user (a slash command, a menu entry); selecting it returns bounded text
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
// of a per-prompt scope, and these templates expose no data, so transport-level
|
|
17
17
|
// Bearer auth is the complete access control). Confirmed in routes/mcp.ts.
|
|
18
18
|
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
19
|
+
// SURFACE (docs/concepts/mcp-design.mdx): 2 prompts today (briefing, debrief).
|
|
20
|
+
// {@link PROMPTS}.length is the auditable count — there is no numeric ceiling.
|
|
21
|
+
// A prompt earns its place the same way a tool does: a JTBD no existing surface
|
|
22
|
+
// covers, plus scenarios in eval/fixtures/tool-selection.json, whose surface
|
|
23
|
+
// slice measures how hard the TOOL descriptions pull on a need that a prompt
|
|
24
|
+
// should serve.
|
|
22
25
|
//
|
|
23
26
|
// ARG TYPING: MCP delivers prompt arguments as STRINGS over the wire, so every
|
|
24
27
|
// arg shape is string-valued — z.enum for the bounded selectors/modes. The
|
|
@@ -169,14 +172,13 @@ const debriefPrompt = definePrompt({
|
|
|
169
172
|
},
|
|
170
173
|
});
|
|
171
174
|
/**
|
|
172
|
-
* THE code-defined prompt surface
|
|
173
|
-
*
|
|
174
|
-
* array. Each entry carries its name (auditable) and a server-bound
|
|
175
|
-
* so the registry stays type-safe over heterogeneous arg shapes
|
|
175
|
+
* THE code-defined prompt surface — 2 today (briefing, debrief;
|
|
176
|
+
* docs/concepts/mcp-design.mdx). Length === registered count, auditable from this
|
|
177
|
+
* one array. Each entry carries its name (auditable) and a server-bound
|
|
178
|
+
* registrar, so the registry stays type-safe over heterogeneous arg shapes
|
|
179
|
+
* without an `any`.
|
|
176
180
|
*/
|
|
177
181
|
export const PROMPTS = [briefingPrompt, debriefPrompt];
|
|
178
|
-
/** Hard ceiling per docs/concepts/mcp-design.mdx (v1: exactly 2; resources deferred). */
|
|
179
|
-
export const MAX_PROMPTS = 2;
|
|
180
182
|
/**
|
|
181
183
|
* Register every code-defined prompt on the McpServer. Called from
|
|
182
184
|
* {@link createMcpServer} alongside the registerTool loop; registerPrompt
|
package/dist/mcp/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/mcp/prompts.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/mcp/prompts.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,qEAAqE;AACrE,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,kFAAkF;AAClF,gFAAgF;AAChF,iFAAiF;AACjF,6DAA6D;AAC7D,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,kFAAkF;AAClF,+EAA+E;AAC/E,gFAAgF;AAChF,gFAAgF;AAChF,2EAA2E;AAC3E,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,gBAAgB;AAChB,EAAE;AACF,+EAA+E;AAC/E,2EAA2E;AAC3E,+EAA+E;AAC/E,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,kFAAkF;AAClF,gFAAgF;AAChF,kFAAkF;AAClF,g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CHANGED
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
//
|
|
8
8
|
// WHY A RESOURCE AT ALL: `resources/read` is CACHEABLE on 2026-07-28. A client
|
|
9
9
|
// that pulled a `truncated: true` search hit can cache the full body instead of
|
|
10
|
-
// re-calling get_memories every session.
|
|
11
|
-
//
|
|
10
|
+
// re-calling get_memories every session. A resource also adds no tool
|
|
11
|
+
// description to `tools/list`, so it costs nothing against the selection accuracy
|
|
12
|
+
// and description overlap the eval gates (hard rule 8) — the pressure a resource
|
|
13
|
+
// relieves is real, but it is not a free slot: see docs/concepts/mcp-surface.mdx.
|
|
12
14
|
//
|
|
13
15
|
// ADDRESSING — the id, not a version. `revise` does not modify a memory: it
|
|
14
16
|
// closes the predecessor's validity and APPENDS a successor with a NEW id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/mcp/resources.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,2DAA2D;AAC3D,EAAE;AACF,wFAAwF;AACxF,iFAAiF;AACjF,0BAA0B;AAC1B,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,iFAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/mcp/resources.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,2DAA2D;AAC3D,EAAE;AACF,wFAAwF;AACxF,iFAAiF;AACjF,0BAA0B;AAC1B,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,sEAAsE;AACtE,kFAAkF;AAClF,iFAAiF;AACjF,kFAAkF;AAClF,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,iFAAiF;AACjF,+EAA+E;AAC/E,qCAAqC;AACrC,EAAE;AACF,gFAAgF;AAChF,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,M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G,CAAC,IAAI;oBACb,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBAC3B;aACF;SACF,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC;AAED,kFAAkF;AAClF,MAAM,CAAC,MAAM,0BAA0B,GAAsB,sBAAsB,CAAA"}
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { type ToolContext } from './tools.js';
|
|
|
15
15
|
* This is a compression of the JTBD table in docs/concepts/mcp-design.mdx.
|
|
16
16
|
* Change them together — the doc links back here for exactly that reason.
|
|
17
17
|
*/
|
|
18
|
-
export declare const SERVER_INSTRUCTIONS = "3ngram is the user's persistent memory across sessions and tools.\n\nStart a session with `briefing` to load what is already known. Before saying something is not known, not decided, or not recorded, `search` for it \u2014 this corpus outlives the conversation you can see.\n\nMemory is append-only. Never rewrite or delete: use `revise` to supersede a memory that has become wrong, and `resolve` to settle a commitment or blocker. Superseding keeps the old version readable as history.\n\nWrite decisions, commitments, blockers, and stated preferences \u2014 the things that would be expensive to rediscover. Do not write transcript noise, restatements of what the user just said, or anything re-derivable from the code.\n\nScope and project decide what later reads return, so set them when you `remember`: a memory written with no project will not appear in that project's briefing.";
|
|
18
|
+
export declare const SERVER_INSTRUCTIONS = "3ngram is the user's persistent memory across sessions and tools.\n\nStart a session with `briefing` to load what is already known. Before saying something is not known, not decided, or not recorded, `search` for it (add order: \"chronological\" for an exhaustive listing instead of ranked relevance) \u2014 this corpus outlives the conversation you can see.\n\nMemory is append-only. Never rewrite or delete: use `revise` to supersede a memory that has become wrong, and `resolve` to settle a commitment or blocker. Superseding keeps the old version readable as history.\n\nWrite decisions, commitments, blockers, and stated preferences \u2014 the things that would be expensive to rediscover. Do not write transcript noise, restatements of what the user just said, or anything re-derivable from the code.\n\nScope and project decide what later reads return, so set them when you `remember`: a memory written with no project will not appear in that project's briefing.\n\nWhen a memory states something measurable, pass it as `facts` on the same `remember` call so `get_facts` can read it back without re-parsing prose. Values are text: put the unit in the predicate and keep one measure per fact.";
|
|
19
19
|
/**
|
|
20
20
|
* Tool definitions, prompt definitions, and the discovery advertisement change
|
|
21
21
|
* only with a server deployment. One hour avoids reconnect refetches without
|
package/dist/mcp/server.js
CHANGED
|
@@ -30,13 +30,15 @@ const SERVER_INFO = { name: '3ngram', version: SERVER_VERSION };
|
|
|
30
30
|
*/
|
|
31
31
|
export const SERVER_INSTRUCTIONS = `3ngram is the user's persistent memory across sessions and tools.
|
|
32
32
|
|
|
33
|
-
Start a session with \`briefing\` to load what is already known. Before saying something is not known, not decided, or not recorded, \`search\` for it — this corpus outlives the conversation you can see.
|
|
33
|
+
Start a session with \`briefing\` to load what is already known. Before saying something is not known, not decided, or not recorded, \`search\` for it (add order: "chronological" for an exhaustive listing instead of ranked relevance) — this corpus outlives the conversation you can see.
|
|
34
34
|
|
|
35
35
|
Memory is append-only. Never rewrite or delete: use \`revise\` to supersede a memory that has become wrong, and \`resolve\` to settle a commitment or blocker. Superseding keeps the old version readable as history.
|
|
36
36
|
|
|
37
37
|
Write decisions, commitments, blockers, and stated preferences — the things that would be expensive to rediscover. Do not write transcript noise, restatements of what the user just said, or anything re-derivable from the code.
|
|
38
38
|
|
|
39
|
-
Scope and project decide what later reads return, so set them when you \`remember\`: a memory written with no project will not appear in that project's briefing
|
|
39
|
+
Scope and project decide what later reads return, so set them when you \`remember\`: a memory written with no project will not appear in that project's briefing.
|
|
40
|
+
|
|
41
|
+
When a memory states something measurable, pass it as \`facts\` on the same \`remember\` call so \`get_facts\` can read it back without re-parsing prose. Values are text: put the unit in the predicate and keep one measure per fact.`;
|
|
40
42
|
/**
|
|
41
43
|
* Tool definitions, prompt definitions, and the discovery advertisement change
|
|
42
44
|
* only with a server deployment. One hour avoids reconnect refetches without
|
package/dist/mcp/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[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mcp/tools-admin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// MCP ADMIN tools: configure_scope, describe_environment,
|
|
3
|
-
// review_proposals —
|
|
3
|
+
// review_proposals — the D3 slice of the registered surface. THIN
|
|
4
4
|
// adapters: each validates at the ONE schema boundary
|
|
5
5
|
// (packages/schema), calls the COMPLETE core service, shapes the structured
|
|
6
6
|
// result, and holds zero business logic.
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
// action-discriminated unions are registered without a permissive raw-shape
|
|
28
28
|
// bridge. The exact per-action contract is enforced at the transport boundary.
|
|
29
29
|
import { log, mcpToolErrors } from '@3ngram/config';
|
|
30
|
-
import {
|
|
30
|
+
import { acceptProposalAnyKind, createScope, deleteScope, describeEnvironment, listAllProposals, listScopes, rejectProposalAnyKind, renameScope, setRetrievalDefault, setScopeAliases, } from '@3ngram/core';
|
|
31
31
|
import { MEMORY_READ_SCOPE, MEMORY_WRITE_SCOPE } from '@3ngram/core/auth';
|
|
32
|
-
import { configureScopeInputV2Schema, configureScopeOutputV2Schema, describeEnvironmentInputSchema, describeEnvironmentOutputV2Schema, reviewProposalsInputSchema,
|
|
32
|
+
import { configureScopeInputV2Schema, configureScopeOutputV2Schema, describeEnvironmentInputSchema, describeEnvironmentOutputV2Schema, reviewProposalsInputSchema, reviewProposalsOutputV2Schema, } from '@3ngram/schema';
|
|
33
33
|
import { parseOutput } from '../output-validation.js';
|
|
34
34
|
import { SERVER_VERSION } from '../version.js';
|
|
35
35
|
import { READ_ONLY_ANNOTATIONS } from './tool-annotations.js';
|
|
@@ -174,11 +174,21 @@ async function runReviewProposals(input, ctx) {
|
|
|
174
174
|
// access is asserted BEFORE the db op (self-host allowAllAccess allows all).
|
|
175
175
|
if (ctx.access)
|
|
176
176
|
await ctx.access.assertRead(ctx.userId);
|
|
177
|
-
const proposals = await
|
|
178
|
-
|
|
177
|
+
const { proposals, factProposals } = await listAllProposals(ctx.userId, {
|
|
178
|
+
status: input.status,
|
|
179
|
+
limit: input.limit,
|
|
180
|
+
});
|
|
181
|
+
return ok(parseOutput('review_proposals', reviewProposalsOutputV2Schema, {
|
|
179
182
|
action: 'list',
|
|
180
183
|
proposals: proposals.map(toProposalOutput),
|
|
184
|
+
// `count` stays the EDGE count: it is the shipped field, and a tenant
|
|
185
|
+
// with no fact proposals must see the identical response it always has.
|
|
181
186
|
count: proposals.length,
|
|
187
|
+
// Key OMITTED when there are none, so an edge-only tenant's response is
|
|
188
|
+
// byte-identical to V1 rather than growing an empty array.
|
|
189
|
+
...(factProposals.length > 0
|
|
190
|
+
? { factProposals: factProposals.map(toFactProposalOutput) }
|
|
191
|
+
: {}),
|
|
182
192
|
}));
|
|
183
193
|
}
|
|
184
194
|
const denied = requireScope('review_proposals', ctx, MEMORY_WRITE_SCOPE);
|
|
@@ -189,18 +199,51 @@ async function runReviewProposals(input, ctx) {
|
|
|
189
199
|
// allowAllAccess allows all).
|
|
190
200
|
if (ctx.access)
|
|
191
201
|
await ctx.access.assertWrite(ctx.userId);
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
202
|
+
// The id alone identifies the kind (uuidv7, disjoint across both tables), so
|
|
203
|
+
// the shipped single-id input is unchanged; core probes edge then fact.
|
|
204
|
+
const decided = input.action === 'accept'
|
|
205
|
+
? await acceptProposalAnyKind(ctx.userId, input.proposalId, 'user_mcp')
|
|
206
|
+
: await rejectProposalAnyKind(ctx.userId, input.proposalId);
|
|
207
|
+
return ok(parseOutput('review_proposals', reviewProposalsOutputV2Schema, toDecisionOutput(decided)));
|
|
208
|
+
}
|
|
209
|
+
/** Shape a core fact-proposal record for the structured output (Dates -> ISO). */
|
|
210
|
+
function toFactProposalOutput(p) {
|
|
211
|
+
return {
|
|
212
|
+
id: p.id,
|
|
213
|
+
memoryId: p.memoryId,
|
|
214
|
+
subject: p.subject,
|
|
215
|
+
predicate: p.predicate,
|
|
216
|
+
value: p.value,
|
|
217
|
+
memoryType: p.memoryType,
|
|
218
|
+
confidence: p.confidence,
|
|
219
|
+
validFrom: p.validFrom === null ? null : p.validFrom.toISOString(),
|
|
220
|
+
validTo: p.validTo === null ? null : p.validTo.toISOString(),
|
|
221
|
+
rationale: p.rationale,
|
|
222
|
+
status: p.status,
|
|
223
|
+
decidedAt: p.decidedAt === null ? null : p.decidedAt.toISOString(),
|
|
224
|
+
createdAt: p.createdAt.toISOString(),
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Map a decided proposal to its output variant. The two kinds get DISTINCT
|
|
229
|
+
* discriminator literals so a client matching on `applied`/`rejected` keeps
|
|
230
|
+
* receiving the edge payload it was written against.
|
|
231
|
+
*/
|
|
232
|
+
function toDecisionOutput(decided) {
|
|
233
|
+
switch (decided.kind) {
|
|
234
|
+
case 'edge':
|
|
235
|
+
return { action: 'rejected', proposal: toProposalOutput(decided.proposal) };
|
|
236
|
+
case 'edge_applied':
|
|
237
|
+
return { action: 'applied', proposal: toProposalOutput(decided.proposal) };
|
|
238
|
+
case 'fact':
|
|
239
|
+
return { action: 'rejected_fact', proposal: toFactProposalOutput(decided.proposal) };
|
|
240
|
+
case 'fact_applied':
|
|
241
|
+
return {
|
|
242
|
+
action: 'applied_fact',
|
|
243
|
+
proposal: toFactProposalOutput(decided.proposal),
|
|
244
|
+
factId: decided.factId,
|
|
245
|
+
};
|
|
198
246
|
}
|
|
199
|
-
const proposal = await rejectProposal(ctx.userId, input.proposalId);
|
|
200
|
-
return ok(parseOutput('review_proposals', reviewProposalsOutputSchema, {
|
|
201
|
-
action: 'rejected',
|
|
202
|
-
proposal: toProposalOutput(proposal),
|
|
203
|
-
}));
|
|
204
247
|
}
|
|
205
248
|
/**
|
|
206
249
|
* Build the three admin tool definitions. `toolNames` is injected by the
|
|
@@ -280,9 +323,9 @@ export function createAdminTools(toolNames) {
|
|
|
280
323
|
requiredScope: { anyOf: [MEMORY_READ_SCOPE, MEMORY_WRITE_SCOPE] },
|
|
281
324
|
config: {
|
|
282
325
|
title: 'Review Proposals',
|
|
283
|
-
description: 'List
|
|
326
|
+
description: 'List proposals awaiting review (optionally by status), reject one, or accept one. Two kinds are reviewed the same way: consolidation proposals, where accepting materializes the proposed edge and a supersedes/updates edge also closes the predecessor; and extracted-fact proposals, where accepting writes the structured fact so `get_facts` can read it. Accept and reject take the proposal id either way. Reject and accept require the write scope.',
|
|
284
327
|
inputSchema: reviewProposalsInputSchema,
|
|
285
|
-
outputSchema:
|
|
328
|
+
outputSchema: reviewProposalsOutputV2Schema,
|
|
286
329
|
// Per-action (list is a read; reject/accept are writes), so the hints
|
|
287
330
|
// describe the write path. destructiveHint: false: accepting materializes
|
|
288
331
|
// an edge, and a supersedes/updates edge CLOSES the predecessor's validity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-admin.js","sourceRoot":"","sources":["../../src/mcp/tools-admin.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0DAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"tools-admin.js","sourceRoot":"","sources":["../../src/mcp/tools-admin.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0DAA0D;AAC1D,kEAAkE;AAClE,sDAAsD;AACtD,4EAA4E;AAC5E,yCAAyC;AACzC,EAAE;AACF,oEAAoE;AACpE,+EAA+E;AAC/E,iFAAiF;AACjF,gFAAgF;AAChF,iFAAiF;AACjF,iFAAiF;AACjF,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,gFAAgF;AAChF,gFAAgF;AAChF,+DAA+D;AAC/D,EAAE;AACF,6DAA6D;AAC7D,gFAAgF;AAChF,kFAAkF;AAClF,iDAAiD;AACjD,EAAE;AACF,gFAAgF;AAChF,4EAA4E;AAC5E,+EAA+E;AAC/E,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EACL,qBA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