@beehexa/hexasync-template-validate 2610.4.6 → 2610.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/index.d.ts +4 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +4 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/validate/agentAnswers.d.ts +12 -2
  6. package/dist/validate/agentAnswers.d.ts.map +1 -1
  7. package/dist/validate/agentAnswers.js +36 -9
  8. package/dist/validate/agentAnswers.js.map +1 -1
  9. package/dist/validate/agentTools.d.ts +30 -22
  10. package/dist/validate/agentTools.d.ts.map +1 -1
  11. package/dist/validate/agentTools.js +74 -37
  12. package/dist/validate/agentTools.js.map +1 -1
  13. package/dist/validate/answerAgentTool.d.ts +150 -42
  14. package/dist/validate/answerAgentTool.d.ts.map +1 -1
  15. package/dist/validate/answerAgentTool.js +377 -163
  16. package/dist/validate/answerAgentTool.js.map +1 -1
  17. package/dist/validate/boundedAgentTool.d.ts +94 -0
  18. package/dist/validate/boundedAgentTool.d.ts.map +1 -0
  19. package/dist/validate/boundedAgentTool.js +136 -0
  20. package/dist/validate/boundedAgentTool.js.map +1 -0
  21. package/dist/validate/buildValidationModel.d.ts +19 -3
  22. package/dist/validate/buildValidationModel.d.ts.map +1 -1
  23. package/dist/validate/buildValidationModel.js +14 -3
  24. package/dist/validate/buildValidationModel.js.map +1 -1
  25. package/dist/validate/contextFromGraph.d.ts +1 -1
  26. package/dist/validate/knowledgeDocs.d.ts +76 -0
  27. package/dist/validate/knowledgeDocs.d.ts.map +1 -0
  28. package/dist/validate/knowledgeDocs.js +261 -0
  29. package/dist/validate/knowledgeDocs.js.map +1 -0
  30. package/dist/validate/registry.d.ts +2 -3
  31. package/dist/validate/registry.d.ts.map +1 -1
  32. package/dist/validate/registry.js +4 -3
  33. package/dist/validate/registry.js.map +1 -1
  34. package/dist/validate/retrieve.d.ts +10 -0
  35. package/dist/validate/retrieve.d.ts.map +1 -1
  36. package/dist/validate/retrieve.js +34 -11
  37. package/dist/validate/retrieve.js.map +1 -1
  38. package/dist/validate/ruleCatalog.d.ts.map +1 -1
  39. package/dist/validate/ruleCatalog.js +19 -11
  40. package/dist/validate/ruleCatalog.js.map +1 -1
  41. package/dist/validate/rules/connectorIdentity.js +1 -1
  42. package/dist/validate/rules/flow.d.ts +1 -1
  43. package/dist/validate/rules/flow.d.ts.map +1 -1
  44. package/dist/validate/rules/flow.js +32 -22
  45. package/dist/validate/rules/flow.js.map +1 -1
  46. package/dist/validate/rules/stepData.d.ts +2 -2
  47. package/dist/validate/rules/stepData.js +2 -2
  48. package/dist/validate/rules/tables.js +5 -5
  49. package/dist/validate/rules/tables.js.map +1 -1
  50. package/dist/validate/rules/unimplementedStep.d.ts +3 -0
  51. package/dist/validate/rules/unimplementedStep.d.ts.map +1 -0
  52. package/dist/validate/rules/unimplementedStep.js +94 -0
  53. package/dist/validate/rules/unimplementedStep.js.map +1 -0
  54. package/dist/validate/sourceLocator.d.ts +25 -2
  55. package/dist/validate/sourceLocator.d.ts.map +1 -1
  56. package/dist/validate/sourceLocator.js +126 -21
  57. package/dist/validate/sourceLocator.js.map +1 -1
  58. package/dist/validate/typeKnowledge.d.ts +63 -0
  59. package/dist/validate/typeKnowledge.d.ts.map +1 -0
  60. package/dist/validate/typeKnowledge.js +350 -0
  61. package/dist/validate/typeKnowledge.js.map +1 -0
  62. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ export * from './validate/contextFromGraph.js';
14
14
  export * from './validate/rule.js';
15
15
  export * from './validate/registry.js';
16
16
  export * from './validate/model.js';
17
- export { buildValidationModel } from './validate/buildValidationModel.js';
17
+ export { buildValidationModel, composedValidationContext, type ComposedValidationInput, } from './validate/buildValidationModel.js';
18
18
  export * from './validate/sourceLocator.js';
19
19
  export * from './validate/ruleCatalog.js';
20
20
  export * from './validate/harvestPullerTaskIds.js';
@@ -25,8 +25,10 @@ export * from './validate/rules/reference.js';
25
25
  export * from './validate/rules/referenceKind.js';
26
26
  export * from './validate/rules/retiredType.js';
27
27
  export * from './validate/agentTools.js';
28
- export * from './validate/answerAgentTool.js';
28
+ export * from './validate/boundedAgentTool.js';
29
+ export { answerAgentTool, agentToolFailure, AgentToolPreconditionError, AGENT_TOOL_FAILURE_CODES, installedLocationFooter, renderFindings, VALIDATE_PAGE, NOT_INSTALLED, MALFORMED_SURFACE, MALFORMED_INDEX, AGENT_COMPOSED_PROJECT_SCOPE_DESCRIPTION, type AgentToolResult, type AgentToolFailure, type AgentToolFailureCode, type AgentToolHost, type AgentFinding, type AgentProjectIdentity, type AgentProjectScope, type AgentProjectPreparation, type AgentUnavailableFile, type AgentKnowledgeProvenance, type BundledAgentKnowledge, type AgentRootAuthority, } from './validate/answerAgentTool.js';
29
30
  export * from './validate/agentAnswers.js';
31
+ export * from './validate/knowledgeDocs.js';
30
32
  export * from './validate/retrieve.js';
31
33
  export * from './validate/rules/stepData.js';
32
34
  export * from './validate/rules/tables.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AA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,oBAAoB,EACzB,KAAK,wBAAwB,EAAE,KAAK,qBAAqB,EAAE,KAAK,kBAAkB,GACnF,MAAM,+BAA+B,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC"}
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ export * from './validate/contextFromGraph.js';
14
14
  export * from './validate/rule.js';
15
15
  export * from './validate/registry.js';
16
16
  export * from './validate/model.js';
17
- export { buildValidationModel } from './validate/buildValidationModel.js';
17
+ export { buildValidationModel, composedValidationContext, } from './validate/buildValidationModel.js';
18
18
  export * from './validate/sourceLocator.js';
19
19
  export * from './validate/ruleCatalog.js';
20
20
  export * from './validate/harvestPullerTaskIds.js';
@@ -25,8 +25,10 @@ export * from './validate/rules/reference.js';
25
25
  export * from './validate/rules/referenceKind.js';
26
26
  export * from './validate/rules/retiredType.js';
27
27
  export * from './validate/agentTools.js';
28
- export * from './validate/answerAgentTool.js';
28
+ export * from './validate/boundedAgentTool.js';
29
+ export { answerAgentTool, agentToolFailure, AgentToolPreconditionError, AGENT_TOOL_FAILURE_CODES, installedLocationFooter, renderFindings, VALIDATE_PAGE, NOT_INSTALLED, MALFORMED_SURFACE, MALFORMED_INDEX, AGENT_COMPOSED_PROJECT_SCOPE_DESCRIPTION, } from './validate/answerAgentTool.js';
29
30
  export * from './validate/agentAnswers.js';
31
+ export * from './validate/knowledgeDocs.js';
30
32
  export * from './validate/retrieve.js';
31
33
  export * from './validate/rules/stepData.js';
32
34
  export * from './validate/rules/tables.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAE1B,MAAM,oCAAoC,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EACL,eAAe,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,wBAAwB,EACvF,uBAAuB,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EACzG,wCAAwC,GAKzC,MAAM,+BAA+B,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC"}
@@ -16,15 +16,20 @@ import { type SubjectAnswer } from './retrieve.js';
16
16
  /** Appended to orientation on every surface: the one instruction the index itself should not carry. */
17
17
  export declare const VALIDATE_BEFORE_DONE: string;
18
18
  export declare const NOT_INSTALLED_ANSWER: string;
19
+ /** How to find anything else — part of orientation on every surface, because the index alone does not say which Tool answers what. */
20
+ export declare const HOW_TO_LOOK_THINGS_UP: string;
19
21
  /** How much of the installed index may be quoted back. An excerpt that needs more than this is not an excerpt. */
20
- export declare const ORIENTATION_CEILING = 4000;
22
+ export declare const ORIENTATION_CEILING = 8000;
21
23
  /**
22
- * The opening of the agent index, plus the clause about validating.
24
+ * The opening of the agent index, plus how to look things up and the clause about validating.
23
25
  *
24
26
  * ⛔ `undefined` where the heading is missing, rather than the whole file. That branch used to mean *"no
25
27
  * `## Collections` heading, so return everything"*, and on the MCP server the result reaches the `instructions` field
26
28
  * a client splices into a system prompt — a hostile index turned a 480 KB file into a 400 KB reply carrying its first
27
29
  * line as an instruction. The surface is generated and always has the heading, so its absence is a malformed index.
30
+ *
31
+ * ⛔ Cut at a LINE, never mid-line: a character cut ended the excerpt inside a link, and the half URI
32
+ * (`hexasync://docs/pullers/PULLER`) reached the agent as a link to a page that does not exist.
28
33
  */
29
34
  export declare function orientationOpening(index: string): string | undefined;
30
35
  /** What a step type accepts, as an agent should read it — one entry per installed contract. */
@@ -38,6 +43,11 @@ export declare function typeAnswers(contracts: Record<string, {
38
43
  */
39
44
  argumentFields?: Record<string, string>;
40
45
  note?: string;
46
+ rules?: readonly {
47
+ whenBoth?: string;
48
+ whenNeither?: string;
49
+ note?: string;
50
+ }[];
41
51
  }>): Map<string, string>;
42
52
  /**
43
53
  * Every supported connector, or one by code.
@@ -1 +1 @@
1
- {"version":3,"file":"agentAnswers.d.ts","sourceRoot":"","sources":["../../src/validate/agentAnswers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;;;;;;;;;GAaG;AAEH,uGAAuG;AACvG,eAAO,MAAM,oBAAoB,QAI2D,CAAC;AAE7F,eAAO,MAAM,oBAAoB,QAGU,CAAC;AAE5C,kHAAkH;AAClH,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AAEzC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIpE;AAED,+FAA+F;AAC/F,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,IAA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E,CAAC;CAC/E,CAAC,GACD,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA0CrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EAC1D,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC9C,aAAa,CAsBf"}
@@ -15,27 +15,49 @@ import { explainConnector } from './retrieve.js';
15
15
  */
16
16
  /** Appended to orientation on every surface: the one instruction the index itself should not carry. */
17
17
  export const VALIDATE_BEFORE_DONE = '## Before you say you are done\n\n' +
18
- 'Run `hexasync compose <project>` and read the report. A template that composes is not the same as a template that ' +
19
- 'is correct, and the report names the authored file and line for every finding. Fix, re-validate, and only then ' +
20
- 'report success — an unvalidated claim is the one failure an agent cannot see for itself.';
21
- export const NOT_INSTALLED_ANSWER = 'The HexaSync knowledge surface is not installed in this workspace. Run **HexaSync: Install IntelliSense** (or ' +
22
- '`hexasync intellisense install`) first — and do not guess at identifiers meanwhile: an invented id resolves to ' +
23
- 'nothing at run time and fails silently.';
18
+ 'Invoke `hexasync_validate` and read its findings. To compose in the editor, use `hexasync.composeProject` ' +
19
+ 'or `hexasync.composeAndPreview` and read the report. A template that composes is not necessarily correct. ' +
20
+ 'Fix the findings, re-validate, and only then report success; do not claim validation you have not performed.';
21
+ export const NOT_INSTALLED_ANSWER = 'The HexaSync knowledge surface is not installed in this workspace. Run **HexaSync IDE: Install IntelliSense** ' +
22
+ 'first — and do not guess at identifiers meanwhile: an invented id resolves to nothing at run time and fails silently.';
23
+ /** How to find anything else — part of orientation on every surface, because the index alone does not say which Tool answers what. */
24
+ export const HOW_TO_LOOK_THINGS_UP = '## How to look things up\n\n' +
25
+ 'For any question about syntax, meaning or how to configure HexaSync template YAML (pullers, pushers, webhooks, steps, QueryDSL ' +
26
+ 'where/joins/select/from, expressions, transformations, validations, metrics, connections), use this order — **before** reading or ' +
27
+ 'copying YAML already in the workspace, which may be wrong or outdated:\n\n' +
28
+ '1. `hexasync_explain_type` for the field or type (`where`, `QUERY_SINGLE.where`, `QUERY_SINGLE`).\n' +
29
+ '2. Read the linked KB section with `resources/read`, or browse the resource tree below.\n' +
30
+ '3. `hexasync_search_examples` for a complete YAML example.\n' +
31
+ '4. `hexasync_validate` before concluding the configuration is correct.\n\n' +
32
+ '- Read the [resource index](hexasync://index) and the [agent index](hexasync://docs/AI-INDEX): every page, and every large page as ' +
33
+ 'its section resources. A link names the resource that holds its heading.\n' +
34
+ '- `hexasync_explain_type` takes a type (`QUERY_SINGLE`), a field of a type (`QUERY_SINGLE.where`, `QUERY_SINGLE.data.where`) ' +
35
+ 'or a bare field or concept (`where`, `pagination`). It answers with syntax, meaning, default, a YAML example and the sections that document it.\n' +
36
+ '- `hexasync_search_examples` finds complete YAML by kind, feature, connector or entity.\n' +
37
+ '- `hexasync_explain_position` gives the expression roots that are legal at a caret.\n' +
38
+ '- `hexasync_explain_rule` explains a diagnostic id.\n' +
39
+ '- Every `hexasync://` link in an answer is a resource. Read it with `resources/read`.';
24
40
  /** How much of the installed index may be quoted back. An excerpt that needs more than this is not an excerpt. */
25
- export const ORIENTATION_CEILING = 4_000;
41
+ export const ORIENTATION_CEILING = 8_000;
26
42
  /**
27
- * The opening of the agent index, plus the clause about validating.
43
+ * The opening of the agent index, plus how to look things up and the clause about validating.
28
44
  *
29
45
  * ⛔ `undefined` where the heading is missing, rather than the whole file. That branch used to mean *"no
30
46
  * `## Collections` heading, so return everything"*, and on the MCP server the result reaches the `instructions` field
31
47
  * a client splices into a system prompt — a hostile index turned a 480 KB file into a 400 KB reply carrying its first
32
48
  * line as an instruction. The surface is generated and always has the heading, so its absence is a malformed index.
49
+ *
50
+ * ⛔ Cut at a LINE, never mid-line: a character cut ended the excerpt inside a link, and the half URI
51
+ * (`hexasync://docs/pullers/PULLER`) reached the agent as a link to a page that does not exist.
33
52
  */
34
53
  export function orientationOpening(index) {
35
54
  const end = index.indexOf('\n## Collections');
36
55
  if (end === -1)
37
56
  return undefined;
38
- return `${index.slice(0, end).trim().slice(0, ORIENTATION_CEILING)}\n\n${VALIDATE_BEFORE_DONE}`;
57
+ const opening = index.slice(0, end).trim();
58
+ const line = opening.lastIndexOf('\n', ORIENTATION_CEILING);
59
+ const cut = opening.length <= ORIENTATION_CEILING ? opening : opening.slice(0, line > 0 ? line : ORIENTATION_CEILING).trimEnd();
60
+ return `${cut}\n\n${HOW_TO_LOOK_THINGS_UP}\n\n${VALIDATE_BEFORE_DONE}`;
39
61
  }
40
62
  /** What a step type accepts, as an agent should read it — one entry per installed contract. */
41
63
  export function typeAnswers(contracts) {
@@ -55,6 +77,11 @@ export function typeAnswers(contracts) {
55
77
  .map((field) => `\`${field}\``)
56
78
  .join(', ')}.`
57
79
  : `A **${type}** step reads nothing from \`data\`.`,
80
+ ...(contract.rules ?? []).flatMap((rule) => [
81
+ rule.whenBoth === undefined ? '' : `When both are supplied: ${rule.whenBoth}`,
82
+ rule.whenNeither === undefined ? '' : `When neither is supplied: ${rule.whenNeither}`,
83
+ rule.note ?? '',
84
+ ]),
58
85
  ...Object.entries(contract.fields ?? {}).map(([field, text]) => `\`${field}\` — ${text}`),
59
86
  ...(Object.keys(contract.argumentFields ?? {}).length > 0
60
87
  ? [
@@ -1 +1 @@
1
- {"version":3,"file":"agentAnswers.js","sourceRoot":"","sources":["../../src/validate/agentAnswers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,eAAe,CAAC;AAErE;;;;;;;;;;;;;GAaG;AAEH,uGAAuG;AACvG,MAAM,CAAC,MAAM,oBAAoB,GAC/B,oCAAoC;IACpC,oHAAoH;IACpH,iHAAiH;IACjH,0FAA0F,CAAC;AAE7F,MAAM,CAAC,MAAM,oBAAoB,GAC/B,gHAAgH;IAChH,iHAAiH;IACjH,yC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D,EAC1D,OAAO,GAAsC,EAAE;IAE/C,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,gBAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE;YAC7C,IAAI,EAAE,OAAO,CAAC,IAAI,KAAK,IAAI;SAC5B,CAAC,CAAC;IACL,CAAC;IACD,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3E,OAAO;QACL,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,GAAG,SAAS,CAAC,MAAM,aAAa;QACvC,IAAI,EAAE,KAAK;aACR,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,GAAG,CAAC,UAAU,QAAQ,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;aAC3D,IAAI,CAAC,IAAI,CAAC;QACb,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM;YACjC,CAAC,CAAC;gBACE,IAAI,EAAE,WAAW,KAAK,CAAC,MAAM,OAAO,SAAS,CAAC,MAAM,+CAA+C;aACpG;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC"}
@@ -1,30 +1,44 @@
1
- /**
2
- * The agent tool set — ONE definition, registered by every surface (Story 7.6).
3
- *
4
- * ⛔ Story 7.6 AC-1 requires that an editor-hosted agent sees *"the same tool set, by name and behaviour, as the local
5
- * server offers"*. Two lists cannot satisfy that: they satisfy it on the day they are written and drift afterwards,
6
- * which is the failure this feature has found four times over. So the names, descriptions and argument shapes live
7
- * here, and both the MCP server and the extension register FROM this list.
8
- *
9
- * ### It carries no implementation
10
- *
11
- * Each entry names the retrieval function it stands for. The functions are Story 6.5's, already pure and already
12
- * shared; a handler here would be a third place answering a question that already has one. AC-4 — *"it computes
13
- * nothing the shared model does not already compute"* — is then true by construction rather than by review.
14
- */
1
+ import { type AgentToolHost, type AgentToolResult } from './answerAgentTool.js';
15
2
  /** One argument a tool accepts. Deliberately minimal: every surface can express this. */
16
3
  export interface AgentToolArg {
17
4
  readonly name: string;
18
- readonly type: 'string' | 'boolean' | 'string[]';
5
+ readonly type: 'string' | 'boolean' | 'string[]' | 'integer';
19
6
  readonly required: boolean;
20
7
  readonly description: string;
21
8
  }
9
+ export type AgentToolSchemaProperty = {
10
+ readonly type: 'string';
11
+ readonly description: string;
12
+ readonly minLength: 1;
13
+ readonly pattern: '\\S';
14
+ } | {
15
+ readonly type: 'boolean';
16
+ readonly description: string;
17
+ } | {
18
+ readonly type: 'array';
19
+ readonly description: string;
20
+ readonly items: {
21
+ readonly type: 'string';
22
+ };
23
+ } | {
24
+ readonly type: 'integer';
25
+ readonly description: string;
26
+ readonly minimum: number;
27
+ readonly maximum: number;
28
+ };
29
+ export interface AgentToolInputSchema {
30
+ readonly type: 'object';
31
+ readonly properties: Readonly<Record<string, AgentToolSchemaProperty>>;
32
+ readonly required: readonly string[];
33
+ }
22
34
  export interface AgentTool {
23
35
  /** The name every surface must use. PS-5 makes this public surface — renaming one is a breaking change. */
24
36
  readonly name: string;
25
37
  readonly title: string;
26
38
  readonly description: string;
27
39
  readonly args: readonly AgentToolArg[];
40
+ readonly inputSchema: AgentToolInputSchema;
41
+ readonly handler: (args: Record<string, unknown>, host: AgentToolHost) => Promise<AgentToolResult>;
28
42
  /** MCP safety metadata, owned here with the tool's public contract. */
29
43
  readonly annotations: {
30
44
  readonly readOnlyHint: boolean;
@@ -32,13 +46,7 @@ export interface AgentTool {
32
46
  readonly idempotentHint: boolean;
33
47
  readonly openWorldHint: boolean;
34
48
  };
35
- /**
36
- * Which shared function answers it — the contract, not a handler.
37
- *
38
- * `orientation` and `validate` are answered by the host (each knows its own filesystem); the rest map to a
39
- * `retrieve.ts` export by name, so a surface that registers one and calls something else is visibly wrong.
40
- */
41
- readonly answeredBy: 'orientation' | 'explainRule' | 'explainType' | 'explainConnector' | 'searchExamples' | 'validateProject' | 'positionAnswer';
42
49
  }
50
+ /** Descriptor-to-schema projection is owned here once, never independently reimplemented by a Host. */
43
51
  export declare const AGENT_TOOLS: readonly AgentTool[];
44
52
  //# sourceMappingURL=agentTools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentTools.d.ts","sourceRoot":"","sources":["../../src/validate/agentTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,yFAAyF;AACzF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,2GAA2G;IAC3G,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC;IACvC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;QAClC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;QACjC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;KACjC,CAAC;IACF;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,E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O,EAAE,MAAM,CAAA;CAAE,CAAC;AACnH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC;IACvE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,SAAS;IACxB,2GAA2G;IAC3G,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IACnG,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;QAClC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;QACjC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;KACjC,CAAC;CACH;AA0LD,uGAAuG;AACvG,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAoBzC,CAAC"}
@@ -1,23 +1,22 @@
1
- /**
2
- * The agent tool set — ONE definition, registered by every surface (Story 7.6).
3
- *
4
- * ⛔ Story 7.6 AC-1 requires that an editor-hosted agent sees *"the same tool set, by name and behaviour, as the local
5
- * server offers"*. Two lists cannot satisfy that: they satisfy it on the day they are written and drift afterwards,
6
- * which is the failure this feature has found four times over. So the names, descriptions and argument shapes live
7
- * here, and both the MCP server and the extension register FROM this list.
8
- *
9
- * ### It carries no implementation
10
- *
11
- * Each entry names the retrieval function it stands for. The functions are Story 6.5's, already pure and already
12
- * shared; a handler here would be a third place answering a question that already has one. AC-4 — *"it computes
13
- * nothing the shared model does not already compute"* — is then true by construction rather than by review.
14
- */
1
+ /** The seven-tool public contract: canonical schema, metadata and actual semantic binding. */
2
+ import { POSITIONS } from '@beehexa/hexasync-template-context';
3
+ import { answerOrientation, answerRule, answerType, answerConnectors, answerExamples, answerValidation, answerPosition, } from './answerAgentTool.js';
15
4
  const full = {
16
5
  name: 'full',
17
6
  type: 'boolean',
18
7
  required: false,
19
- description: 'Return the whole entry instead of the bounded answer.',
8
+ description: 'Request complete entry detail or a higher bounded list limit (at most 500 items); the 64 KiB response cap still applies.',
20
9
  };
10
+ const textOffset = {
11
+ name: 'textOffset',
12
+ type: 'integer',
13
+ required: false,
14
+ description: 'Zero-based UTF-16 text continuation offset. Repeat the same Tool with the same original arguments and filters plus the supplied textOffset.',
15
+ };
16
+ const pageArgs = [
17
+ { name: 'offset', type: 'integer', required: false, description: 'Zero-based item offset for a bounded continuation page.' },
18
+ { name: 'limit', type: 'integer', required: false, description: 'Items per page: 1–500, default 50. Responses remain capped at 64 KiB.' },
19
+ ];
21
20
  /** These tools inspect local knowledge/project state; none writes or contacts an external system. */
22
21
  const READ_ONLY_ANNOTATIONS = {
23
22
  readOnlyHint: true,
@@ -25,20 +24,23 @@ const READ_ONLY_ANNOTATIONS = {
25
24
  idempotentHint: true,
26
25
  openWorldHint: false,
27
26
  };
28
- export const AGENT_TOOLS = [
27
+ const definitions = [
29
28
  {
30
29
  name: 'hexasync_orientation',
31
30
  title: 'What a HexaSync template is',
32
- description: 'Start here. What a template is, the two runtimes that must never be mixed, the rule against inventing an ' +
33
- 'identity, and the requirement to validate before claiming done.',
31
+ description: 'Start here for any HexaSync profile template YAML question. What a template is, the two runtimes that must never be mixed, ' +
32
+ 'the rule against inventing an identity, the lookup order (explain_type / KB resources before guessing from workspace YAML) ' +
33
+ 'and the requirement to validate before claiming done. Use when: starting work on pullers, pushers, webhooks, steps, ' +
34
+ 'QueryDSL, connections, transformations, validations or metrics.',
34
35
  args: [],
35
36
  annotations: READ_ONLY_ANNOTATIONS,
36
- answeredBy: 'orientation',
37
+ handler: answerOrientation,
37
38
  },
38
39
  {
39
40
  name: 'hexasync_explain_rule',
40
41
  title: 'Explain one validation rule',
41
- description: 'What a rule id means and what it costs you.',
42
+ description: 'What a validation rule id means, what it costs you, and the documentation sections to read on. Use when: a diagnostic, ' +
43
+ 'Problems-panel entry or hexasync_validate finding shows a rule id (STEP-1, REF-7, CONN-1, QDSL-1…) and you need its cause and fix.',
42
44
  args: [
43
45
  {
44
46
  name: 'id',
@@ -49,29 +51,34 @@ export const AGENT_TOOLS = [
49
51
  full,
50
52
  ],
51
53
  annotations: READ_ONLY_ANNOTATIONS,
52
- answeredBy: 'explainRule',
54
+ handler: answerRule,
53
55
  },
54
56
  {
55
57
  name: 'hexasync_explain_type',
56
- title: 'Describe a step, transformation or validation type',
57
- description: 'What a type accepts, from verified workspace knowledge or the bundled versioned product reference.',
58
+ title: 'Describe a type, a field or a concept',
59
+ description: 'Authoritative syntax, meaning, default, YAML example and doc section for HexaSync template YAML. Use when the user asks ' +
60
+ 'how to configure / what a field means / what syntax is valid — BEFORE reading or copying existing workspace YAML. ' +
61
+ 'Takes a step or component type (`QUERY_SINGLE`, `API`, `SQL`), `Type.field` (`QUERY_SINGLE.where`), or a bare field or ' +
62
+ 'concept: where, joins, select, from, filter, conditions, arguments, next, onError, logOutput, maxStepIterations, ' +
63
+ 'pagination, hasNextPage, watermark, incremental/full pull, puller, pusher, webhook, step, displayType, connection, ' +
64
+ 'transformation, validation, metric, responseFilters, scheduleKey, startupTasks.',
58
65
  args: [
59
66
  {
60
67
  name: 'name',
61
68
  type: 'string',
62
69
  required: true,
63
- description: 'A type name, e.g. SQL.',
70
+ description: 'A type (`SQL`), `Type.field` (`QUERY_SINGLE.where`, `QUERY_SINGLE.data.where`), or a bare field or concept (`where`, `pagination`).',
64
71
  },
65
72
  full,
66
73
  ],
67
74
  annotations: READ_ONLY_ANNOTATIONS,
68
- answeredBy: 'explainType',
75
+ handler: answerType,
69
76
  },
70
77
  {
71
78
  name: 'hexasync_list_connectors',
72
79
  title: 'Which systems have a connector',
73
80
  description: 'One connector by code, or every supported code when none is given. A system with no connector is a request, ' +
74
- 'not a configuration.',
81
+ 'not a configuration. Use when: choosing connectorId/providerId/systemCode for a connection, or asking whether a system is supported.',
75
82
  args: [
76
83
  {
77
84
  name: 'code',
@@ -80,14 +87,17 @@ export const AGENT_TOOLS = [
80
87
  description: 'A connector code, e.g. shopify-public-app.',
81
88
  },
82
89
  full,
90
+ ...pageArgs,
83
91
  ],
84
92
  annotations: READ_ONLY_ANNOTATIONS,
85
- answeredBy: 'explainConnector',
93
+ handler: answerConnectors,
86
94
  },
87
95
  {
88
96
  name: 'hexasync_search_examples',
89
97
  title: 'Find a working example by facet',
90
- description: 'Search by kind, feature, connector or entity. ⚠️ A connector query may be blind — the answer says so.',
98
+ description: 'Find complete, schema-valid YAML examples by kind, feature, connector or entity. Use when: the user wants a full working ' +
99
+ 'example of a puller, pusher, webhook, step, QueryDSL where, transformation, validation, metric or startup task — prefer this ' +
100
+ 'over copying YAML from the workspace. ⚠️ A connector query may be blind — the answer says so.',
91
101
  args: [
92
102
  {
93
103
  name: 'kind',
@@ -114,15 +124,17 @@ export const AGENT_TOOLS = [
114
124
  description: 'Part of an entity name, e.g. orders.',
115
125
  },
116
126
  full,
127
+ ...pageArgs,
117
128
  ],
118
129
  annotations: READ_ONLY_ANNOTATIONS,
119
- answeredBy: 'searchExamples',
130
+ handler: answerExamples,
120
131
  },
121
132
  {
122
133
  name: 'hexasync_validate',
123
134
  title: 'Validate this project',
124
- description: 'Runs the same rules the composition report runs, and returns both a readable summary and a machine-readable ' +
125
- 'finding list.',
135
+ description: 'Runs the same rules the composition report runs on the selected project and returns a readable summary and a ' +
136
+ 'machine-readable finding list. Use when: after editing template YAML, before claiming a configuration is correct, ' +
137
+ 'or when the user asks whether a puller/pusher/step/QueryDSL configuration is valid.',
126
138
  args: [
127
139
  {
128
140
  name: 'project',
@@ -137,25 +149,50 @@ export const AGENT_TOOLS = [
137
149
  description: 'Narrow the findings to the files you just edited.',
138
150
  },
139
151
  full,
152
+ ...pageArgs,
140
153
  ],
141
154
  annotations: READ_ONLY_ANNOTATIONS,
142
- answeredBy: 'validateProject',
155
+ handler: answerValidation,
143
156
  },
144
157
  {
145
158
  name: 'hexasync_explain_position',
146
159
  title: 'What is legal at this caret',
147
- description: 'The five authoring positions carry five different alphabets. Ask which roots a position actually has before ' +
148
- 'writing an expression — `{{ item.sku }}` is right in a pusher step and silently wrong in a transformation.',
160
+ description: 'Each authoring position carries its own alphabet. Ask which roots a position actually has before ' +
161
+ 'writing an expression — `{{ item.sku }}` is right in a pusher step and silently wrong in a transformation. ' +
162
+ 'Use when: writing Scriban `{{ }}`, JSONata `$()` or JSONPath in a step, pusher, puller, webhook or transformation ' +
163
+ '(_outputs, _inputs, item, context roots). Without a position, lists every position.',
149
164
  args: [
150
165
  {
151
166
  name: 'position',
152
167
  type: 'string',
153
- required: true,
154
- description: 'One of: legacy-puller-step, new-kind-puller-step, pusher-step, transformation-expression, validation-field.',
168
+ required: false,
169
+ description: `One of: ${POSITIONS.join(', ')}. Omit to list them.`,
155
170
  },
156
171
  ],
157
172
  annotations: READ_ONLY_ANNOTATIONS,
158
- answeredBy: 'positionAnswer',
173
+ handler: answerPosition,
159
174
  },
160
175
  ];
176
+ /** Descriptor-to-schema projection is owned here once, never independently reimplemented by a Host. */
177
+ export const AGENT_TOOLS = Object.freeze(definitions.map((definition) => {
178
+ const args = [...definition.args, textOffset];
179
+ const properties = {};
180
+ for (const arg of args) {
181
+ properties[arg.name] = Object.freeze(arg.type === 'string[]'
182
+ ? { type: 'array', description: arg.description, items: Object.freeze({ type: 'string' }) }
183
+ : arg.type === 'boolean' ? { type: 'boolean', description: arg.description }
184
+ : arg.type === 'integer' ? { type: 'integer', description: arg.description, minimum: arg.name === 'limit' ? 1 : 0, maximum: arg.name === 'limit' ? 500 : Number.MAX_SAFE_INTEGER }
185
+ : { type: 'string', description: arg.description, minLength: 1, pattern: '\\S' });
186
+ }
187
+ return Object.freeze({
188
+ ...definition,
189
+ args: Object.freeze(args.map((arg) => Object.freeze(arg))),
190
+ annotations: Object.freeze(definition.annotations),
191
+ inputSchema: Object.freeze({
192
+ type: 'object',
193
+ properties: Object.freeze(properties),
194
+ required: Object.freeze(args.filter((arg) => arg.required).map((arg) => arg.name)),
195
+ }),
196
+ });
197
+ }));
161
198
  //# sourceMappingURL=agentTools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentTools.js","sourceRoot":"","sources":["../../src/validate/agentTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAuCH,MAAM,IAAI,GAAiB;IACzB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,uDAAuD;CACrE,CAAC;AAEF,qGAAqG;AACrG,MAAM,qBAAqB,GAAG;IAC5B,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAyB;IAC/C;QACE,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,6BAA6B;QACpC,WAAW,EACT,2GAA2G;YAC3G,iEAAiE;QACnE,IAAI,EAAE,EAAE;QACR,WAAW,EAAE,qBAAqB;QAClC,UAAU,EAAE,aAAa;KAC1B;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,6BAA6B;QACpC,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;g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AAE,sCAAsC;aACpD;YACD,IAAI;SACL;QACD,WAAW,EAAE,qBAAqB;QAClC,UAAU,EAAE,gBAAgB;KAC7B;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,8GAA8G;YAC9G,eAAe;QACjB,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,2HAA2H;aACzI;YACD;gBACE,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,mDAAmD;aACjE;YACD,IAAI;SACL;QACD,WAAW,EAAE,qBAAqB;QAClC,UAAU,EAAE,iBAAiB;KAC9B;IACD;QACE,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,6BAA6B;QACpC,WAAW,EACT,8GAA8G;YAC9G,4GAA4G;QAC9G,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,6GAA6G;aAChH;SACF;QACD,WAAW,EAAE,qBAAqB;QAClC,UAAU,EAAE,gBAAgB;KAC7B;CACF,CAAC"}
1
+ {"version":3,"file":"agentTools.js","sourceRoot":"","sources":["../../src/validate/agentTools.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EACL,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,GAE9G,MAAM,sBAAsB,CAAC;AAsC9B,MAAM,IAAI,GAAiB;IACzB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,0HAA0H;CACxI,CAAC;AACF,MAA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