@cat-factory/agents 0.6.0 → 0.7.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.
Files changed (85) hide show
  1. package/LICENSE +21 -21
  2. package/dist/agents/prompts/roles.js +1 -1
  3. package/dist/agents/prompts/roles.js.map +1 -1
  4. package/dist/agents/runtime/web-search.js +7 -7
  5. package/package.json +9 -4
  6. package/dist/agents/AiAgentExecutor.d.ts +0 -72
  7. package/dist/agents/AiAgentExecutor.d.ts.map +0 -1
  8. package/dist/agents/AiAgentExecutor.js +0 -125
  9. package/dist/agents/AiAgentExecutor.js.map +0 -1
  10. package/dist/agents/acceptance-prompts.d.ts +0 -29
  11. package/dist/agents/acceptance-prompts.d.ts.map +0 -1
  12. package/dist/agents/acceptance-prompts.js +0 -112
  13. package/dist/agents/acceptance-prompts.js.map +0 -1
  14. package/dist/agents/agent-catalog.d.ts +0 -6
  15. package/dist/agents/agent-catalog.d.ts.map +0 -1
  16. package/dist/agents/agent-catalog.js +0 -197
  17. package/dist/agents/agent-catalog.js.map +0 -1
  18. package/dist/agents/agent-configs.d.ts +0 -17
  19. package/dist/agents/agent-configs.d.ts.map +0 -1
  20. package/dist/agents/agent-configs.js +0 -66
  21. package/dist/agents/agent-configs.js.map +0 -1
  22. package/dist/agents/agent-routing.d.ts +0 -57
  23. package/dist/agents/agent-routing.d.ts.map +0 -1
  24. package/dist/agents/agent-routing.js +0 -41
  25. package/dist/agents/agent-routing.js.map +0 -1
  26. package/dist/agents/business-logic-prompts.d.ts +0 -28
  27. package/dist/agents/business-logic-prompts.d.ts.map +0 -1
  28. package/dist/agents/business-logic-prompts.js +0 -96
  29. package/dist/agents/business-logic-prompts.js.map +0 -1
  30. package/dist/agents/ci-gate.d.ts +0 -2
  31. package/dist/agents/ci-gate.d.ts.map +0 -1
  32. package/dist/agents/ci-gate.js +0 -33
  33. package/dist/agents/ci-gate.js.map +0 -1
  34. package/dist/agents/companion-prompts.d.ts +0 -4
  35. package/dist/agents/companion-prompts.d.ts.map +0 -1
  36. package/dist/agents/companion-prompts.js +0 -27
  37. package/dist/agents/companion-prompts.js.map +0 -1
  38. package/dist/agents/companions.d.ts +0 -20
  39. package/dist/agents/companions.d.ts.map +0 -1
  40. package/dist/agents/companions.js +0 -38
  41. package/dist/agents/companions.js.map +0 -1
  42. package/dist/agents/mock-prompts.d.ts +0 -12
  43. package/dist/agents/mock-prompts.d.ts.map +0 -1
  44. package/dist/agents/mock-prompts.js +0 -61
  45. package/dist/agents/mock-prompts.js.map +0 -1
  46. package/dist/agents/prompt-fragments.d.ts +0 -17
  47. package/dist/agents/prompt-fragments.d.ts.map +0 -1
  48. package/dist/agents/prompt-fragments.js +0 -33
  49. package/dist/agents/prompt-fragments.js.map +0 -1
  50. package/dist/agents/prompt-shared.d.ts +0 -7
  51. package/dist/agents/prompt-shared.d.ts.map +0 -1
  52. package/dist/agents/prompt-shared.js +0 -10
  53. package/dist/agents/prompt-shared.js.map +0 -1
  54. package/dist/agents/prompt-versions.d.ts +0 -48
  55. package/dist/agents/prompt-versions.d.ts.map +0 -1
  56. package/dist/agents/prompt-versions.js +0 -55
  57. package/dist/agents/prompt-versions.js.map +0 -1
  58. package/dist/agents/read-only.d.ts +0 -13
  59. package/dist/agents/read-only.d.ts.map +0 -1
  60. package/dist/agents/read-only.js +0 -29
  61. package/dist/agents/read-only.js.map +0 -1
  62. package/dist/agents/registry.d.ts +0 -70
  63. package/dist/agents/registry.d.ts.map +0 -1
  64. package/dist/agents/registry.js +0 -51
  65. package/dist/agents/registry.js.map +0 -1
  66. package/dist/agents/standard-prompt-templates.generated.d.ts +0 -36
  67. package/dist/agents/standard-prompt-templates.generated.d.ts.map +0 -1
  68. package/dist/agents/standard-prompt-templates.generated.js +0 -122
  69. package/dist/agents/standard-prompt-templates.generated.js.map +0 -1
  70. package/dist/agents/standard-prompts.d.ts +0 -36
  71. package/dist/agents/standard-prompts.d.ts.map +0 -1
  72. package/dist/agents/standard-prompts.js +0 -202
  73. package/dist/agents/standard-prompts.js.map +0 -1
  74. package/dist/agents/test-prompts.d.ts +0 -12
  75. package/dist/agents/test-prompts.d.ts.map +0 -1
  76. package/dist/agents/test-prompts.js +0 -92
  77. package/dist/agents/test-prompts.js.map +0 -1
  78. package/dist/agents/traits.d.ts +0 -56
  79. package/dist/agents/traits.d.ts.map +0 -1
  80. package/dist/agents/traits.js +0 -100
  81. package/dist/agents/traits.js.map +0 -1
  82. package/dist/agents/web-search.d.ts +0 -43
  83. package/dist/agents/web-search.d.ts.map +0 -1
  84. package/dist/agents/web-search.js +0 -102
  85. package/dist/agents/web-search.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"standard-prompt-templates.generated.d.ts","sourceRoot":"","sources":["../../src/agents/standard-prompt-templates.generated.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY;;;;;;;;;;CA6ER,CAAA;AAEjB,eAAO,MAAM,MAAM;;;;;CAUgB,CAAA;AAEnC,eAAO,MAAM,KAAK;;;;;CAUiB,CAAA;AAEnC,eAAO,MAAM,MAAM;;;;;CAUgB,CAAA;AAEnC,eAAO,MAAM,IAAI;;;;;CAUkB,CAAA"}
@@ -1,122 +0,0 @@
1
- // @ts-nocheck
2
- // GENERATED FILE — DO NOT EDIT BY HAND.
3
- // Precompiled Handlebars specs for the standard-prompt templates, consumed by the
4
- // codegen-free Handlebars runtime so the worker can render them on Cloudflare
5
- // Workers (which forbid runtime code generation).
6
- //
7
- // Regenerate with: pnpm --filter @cat-factory/agents run precompile:templates
8
- // Source templates live in scripts/precompile-prompts.mjs.
9
- /* eslint-disable */
10
- export const blockContext = { "0": function (container, depth0, helpers, partials, data) {
11
- var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
12
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
13
- return parent[propertyName];
14
- }
15
- return undefined;
16
- };
17
- return ((stack1 = container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0, "block") : depth0)) != null ? lookupProperty(stack1, "description") : stack1), depth0)) != null ? stack1 : "");
18
- }, "1": function (container, depth0, helpers, partials, data) {
19
- return "(none provided)";
20
- }, "2": function (container, depth0, helpers, partials, data) {
21
- var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
22
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
23
- return parent[propertyName];
24
- }
25
- return undefined;
26
- };
27
- return "Resolved decisions:\n"
28
- + ((stack1 = lookupProperty(helpers, "each").call(depth0 != null ? depth0 : (container.nullContext || {}), (depth0 != null ? lookupProperty(depth0, "decisions") : depth0), { "name": "each", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 7, "column": 9 } } })) != null ? stack1 : "");
29
- }, "3": function (container, depth0, helpers, partials, data) {
30
- var stack1, helper, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), alias2 = container.hooks.helperMissing, alias3 = "function", lookupProperty = container.lookupProperty || function (parent, propertyName) {
31
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
32
- return parent[propertyName];
33
- }
34
- return undefined;
35
- };
36
- return "- "
37
- + ((stack1 = ((helper = (helper = lookupProperty(helpers, "question") || (depth0 != null ? lookupProperty(depth0, "question") : depth0)) != null ? helper : alias2), (typeof helper === alias3 ? helper.call(alias1, { "name": "question", "hash": {}, "data": data, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 33 } } }) : helper))) != null ? stack1 : "")
38
- + " → "
39
- + ((stack1 = ((helper = (helper = lookupProperty(helpers, "chosen") || (depth0 != null ? lookupProperty(depth0, "chosen") : depth0)) != null ? helper : alias2), (typeof helper === alias3 ? helper.call(alias1, { "name": "chosen", "hash": {}, "data": data, "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 6, "column": 46 } } }) : helper))) != null ? stack1 : "")
40
- + "\n";
41
- }, "4": function (container, depth0, helpers, partials, data) {
42
- var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
43
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
44
- return parent[propertyName];
45
- }
46
- return undefined;
47
- };
48
- return "Work from earlier agents in this pipeline:\n"
49
- + ((stack1 = lookupProperty(helpers, "each").call(depth0 != null ? depth0 : (container.nullContext || {}), (depth0 != null ? lookupProperty(depth0, "priorOutputs") : depth0), { "name": "each", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 13, "column": 9 } } })) != null ? stack1 : "");
50
- }, "5": function (container, depth0, helpers, partials, data) {
51
- var stack1, helper, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), alias2 = container.hooks.helperMissing, alias3 = "function", lookupProperty = container.lookupProperty || function (parent, propertyName) {
52
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
53
- return parent[propertyName];
54
- }
55
- return undefined;
56
- };
57
- return "### "
58
- + ((stack1 = ((helper = (helper = lookupProperty(helpers, "agentKind") || (depth0 != null ? lookupProperty(depth0, "agentKind") : depth0)) != null ? helper : alias2), (typeof helper === alias3 ? helper.call(alias1, { "name": "agentKind", "hash": {}, "data": data, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 39 } } }) : helper))) != null ? stack1 : "")
59
- + "\n"
60
- + ((stack1 = ((helper = (helper = lookupProperty(helpers, "output") || (depth0 != null ? lookupProperty(depth0, "output") : depth0)) != null ? helper : alias2), (typeof helper === alias3 ? helper.call(alias1, { "name": "output", "hash": {}, "data": data, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 10 } } }) : helper))) != null ? stack1 : "")
61
- + "\n\n";
62
- }, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
63
- var stack1, helper, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), alias2 = container.lambda, lookupProperty = container.lookupProperty || function (parent, propertyName) {
64
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
65
- return parent[propertyName];
66
- }
67
- return undefined;
68
- };
69
- return "Pipeline: "
70
- + ((stack1 = ((helper = (helper = lookupProperty(helpers, "pipelineName") || (depth0 != null ? lookupProperty(depth0, "pipelineName") : depth0)) != null ? helper : container.hooks.helperMissing), (typeof helper === "function" ? helper.call(alias1, { "name": "pipelineName", "hash": {}, "data": data, "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 26 } } }) : helper))) != null ? stack1 : "")
71
- + "\nBlock: "
72
- + ((stack1 = alias2(((stack1 = (depth0 != null ? lookupProperty(depth0, "block") : depth0)) != null ? lookupProperty(stack1, "title") : stack1), depth0)) != null ? stack1 : "")
73
- + " ("
74
- + ((stack1 = alias2(((stack1 = (depth0 != null ? lookupProperty(depth0, "block") : depth0)) != null ? lookupProperty(stack1, "type") : stack1), depth0)) != null ? stack1 : "")
75
- + ")\nDescription: "
76
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, ((stack1 = (depth0 != null ? lookupProperty(depth0, "block") : depth0)) != null ? lookupProperty(stack1, "description") : stack1), { "name": "if", "hash": {}, "fn": container.program(0, data, 0), "inverse": container.program(1, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 89 } } })) != null ? stack1 : "")
77
- + "\n"
78
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, ((stack1 = (depth0 != null ? lookupProperty(depth0, "decisions") : depth0)) != null ? lookupProperty(stack1, "length") : stack1), { "name": "if", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 7, "column": 16 } } })) != null ? stack1 : "")
79
- + "\n"
80
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, ((stack1 = (depth0 != null ? lookupProperty(depth0, "priorOutputs") : depth0)) != null ? lookupProperty(stack1, "length") : stack1), { "name": "if", "hash": {}, "fn": container.program(4, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 13, "column": 16 } } })) != null ? stack1 : "");
81
- }, "useData": true };
82
- export const design = { "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
83
- var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
84
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
85
- return parent[propertyName];
86
- }
87
- return undefined;
88
- };
89
- return ((stack1 = container.invokePartial(lookupProperty(partials, "blockContext"), depth0, { "name": "blockContext", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
90
- + "Produce the solution design for this block. Be concise and concrete: prefer short bullets over prose, and finish with the ordered implementation steps.";
91
- }, "usePartial": true, "useData": true };
92
- export const build = { "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
93
- var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
94
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
95
- return parent[propertyName];
96
- }
97
- return undefined;
98
- };
99
- return ((stack1 = container.invokePartial(lookupProperty(partials, "blockContext"), depth0, { "name": "blockContext", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
100
- + "Produce the implementation for this block, faithful to the design and prior work above: the key modules, functions, data shapes and wiring.";
101
- }, "usePartial": true, "useData": true };
102
- export const review = { "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
103
- var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
104
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
105
- return parent[propertyName];
106
- }
107
- return undefined;
108
- };
109
- return ((stack1 = container.invokePartial(lookupProperty(partials, "blockContext"), depth0, { "name": "blockContext", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
110
- + "Review the work above. List concrete, actionable findings ordered by severity; if it is sound, say so explicitly.";
111
- }, "usePartial": true, "useData": true };
112
- export const test = { "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
113
- var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
114
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
115
- return parent[propertyName];
116
- }
117
- return undefined;
118
- };
119
- return ((stack1 = container.invokePartial(lookupProperty(partials, "blockContext"), depth0, { "name": "blockContext", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
120
- + "Produce a pragmatic test plan for this block: the highest-value tests to write first, the key edge cases and the failure modes to cover.";
121
- }, "usePartial": true, "useData": true };
122
- //# sourceMappingURL=standard-prompt-templates.generated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"standard-prompt-templates.generated.js","sourceRoot":"","sources":["../../src/agents/standard-prompt-templates.generated.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,wCAAwC;AACxC,kFAAkF;AAClF,8EAA8E;AAC9E,kDAAkD;AAClD,EAAE;AACF,8EAA8E;AAC9E,2DAA2D;AAE3D,oBAAoB;AAEpB,MAAM,CAAC,MAAM,YAAY,GAAG,EAAC,GAAG,EAAC,UAAS,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,IAAI;QAC5E,IAAI,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC,cAAc,IAAI,UAAS,MAAM,EAAE,YAAY;YAClF,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;gBAC/D,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC;YAC9B,CAAC;YACD,OAAO,SAAS,CAAA;QACpB,CAAC,CAAC;QAEJ,OAAO,CAAC,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,M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AM,CAAC,CAAC,CAAC,EAAE,CAAC;cACzN,0IAA0I,CAAC;IACjJ,CAAC,EAAC,YAAY,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,CAAA"}
@@ -1,36 +0,0 @@
1
- import type { AgentKind } from '@cat-factory/kernel';
2
- import type { AgentRunContext } from '@cat-factory/kernel';
3
- /** The four standard phases of building out a solution. */
4
- export type StandardPhase = 'design' | 'build' | 'review' | 'test';
5
- export declare const STANDARD_PHASES: readonly StandardPhase[];
6
- /**
7
- * Maps the built-in agent kinds to the standard phase they perform. Other agent
8
- * kinds (researcher, documenter, integrator, custom ids) are not standard phases
9
- * and keep their own role prompts in the agent catalog.
10
- */
11
- export declare const STANDARD_PHASE_BY_KIND: Readonly<Record<string, StandardPhase>>;
12
- /** The standard phase an agent kind performs, or `undefined` if it isn't one. */
13
- export declare function phaseForKind(kind: AgentKind): StandardPhase | undefined;
14
- /** The built-out system (role) prompt for a standard phase. */
15
- export declare function standardSystemPrompt(phase: StandardPhase): string;
16
- /**
17
- * Render the "ephemeral environment under test" section from the run context, or
18
- * an empty string when no environment is attached. The auth scheme is described
19
- * so the agent knows how to reach the env, but the raw access token/password is
20
- * deliberately NOT placed in the prompt — it must not be sent to the LLM
21
- * provider; programmatic consumers read it from `context.environment.access`.
22
- */
23
- export declare function environmentSection(context: AgentRunContext): string;
24
- /**
25
- * Render the linked extra-context section — documents (requirements / RFCs /
26
- * PRDs) and tracker issues attached to the block — or an empty string when none
27
- * are linked. Shared by every agent kind (standard phases and the generic roles
28
- * alike) so the same context the engine resolves for a step (see
29
- * `ExecutionService.buildAgentContext`) reaches whichever agent runs it. The
30
- * leading blank lines separate it from the preceding prompt content;
31
- * `renderStandardUserPrompt` collapses any runs of blank lines it produces.
32
- */
33
- export declare function linkedContextSection(context: AgentRunContext): string;
34
- /** Render the built-out user prompt for a standard phase from the run context. */
35
- export declare function renderStandardUserPrompt(phase: StandardPhase, context: AgentRunContext): string;
36
- //# sourceMappingURL=standard-prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"standard-prompts.d.ts","sourceRoot":"","sources":["../../src/agents/standard-prompts.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAqB1D,2DAA2D;AAC3D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAElE,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAA0C,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAQ1E,CAAA;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,CAEvE;AA2ED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAEjE;AAoDD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAoBnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAYrE;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAO/F"}
@@ -1,202 +0,0 @@
1
- // Runtime VALUE from the codegen-free runtime build (Workers forbid runtime code
2
- // generation); its Node-ESM specifier needs the explicit `.js`. The TYPE is sourced
3
- // from the full package (the runtime subpath's types omit `create`), type-only so the
4
- // compiler is not pulled into the bundle.
5
- import HandlebarsRuntime from 'handlebars/runtime.js';
6
- import { renderTaskContext } from '@cat-factory/kernel';
7
- import { PLATFORM_DELIVERY_CONTRACT } from './ci-gate.js';
8
- import { STANDARDS_FOOTER } from './prompt-shared.js';
9
- import * as templateSpecs from './standard-prompt-templates.generated.js';
10
- const Handlebars = HandlebarsRuntime;
11
- export const STANDARD_PHASES = ['design', 'build', 'review', 'test'];
12
- /**
13
- * Maps the built-in agent kinds to the standard phase they perform. Other agent
14
- * kinds (researcher, documenter, integrator, custom ids) are not standard phases
15
- * and keep their own role prompts in the agent catalog.
16
- */
17
- export const STANDARD_PHASE_BY_KIND = {
18
- architect: 'design',
19
- coder: 'build',
20
- reviewer: 'review',
21
- // `tester` is no longer a one-shot strategy phase: it is a container agent that
22
- // actually runs the tests and returns a structured report (see ./test-prompts),
23
- // looped with the `fixer` by the engine. It therefore routes through its own
24
- // prompt, not the generic `test` phase.
25
- };
26
- /** The standard phase an agent kind performs, or `undefined` if it isn't one. */
27
- export function phaseForKind(kind) {
28
- return STANDARD_PHASE_BY_KIND[kind];
29
- }
30
- // --- System prompts -------------------------------------------------------
31
- // Static role + approach guidance per phase. Each closes by deferring to the
32
- // best-practice standards that `composeSystemPrompt` appends below it.
33
- // The build phase runs in a container on a real checkout and ships its code through
34
- // a pull request — but the PUSH and the PR are the platform's job, not the agent's
35
- // (it has no push credentials). "Done" here means a complete implementation that
36
- // builds and passes its relevant tests locally; the platform then pushes, opens the
37
- // PR and drives CI (dispatching a CI-fixer if a check fails). The shared
38
- // PLATFORM_DELIVERY_CONTRACT spells out that boundary so the agent commits its own
39
- // work, never chases credentials, and bounds its effort.
40
- const BUILD_DELIVERY_GATE = [
41
- 'Definition of done: a focused, complete implementation that builds and passes its relevant tests locally.',
42
- PLATFORM_DELIVERY_CONTRACT,
43
- ].join('\n');
44
- const SYSTEM_PROMPTS = {
45
- design: [
46
- 'You are a senior software architect owning the DESIGN of a building block.',
47
- 'Turn the block intent into a clear, buildable solution design.',
48
- '',
49
- 'Approach:',
50
- '- Restate the problem and the hard constraints in one or two sentences.',
51
- '- Identify the main components, their responsibilities, and the data/contracts that flow between them.',
52
- '- Surface the key decisions and trade-offs; where a choice is genuinely open, raise it as a decision rather than guessing.',
53
- '- Call out risks, edge cases and non-functional needs (performance, security, failure modes).',
54
- '- End with a short, ordered list of concrete implementation steps.',
55
- '',
56
- STANDARDS_FOOTER,
57
- ].join('\n'),
58
- build: [
59
- 'You are a senior engineer owning the BUILD of a building block.',
60
- 'Produce a focused, faithful implementation of the agreed design.',
61
- '',
62
- 'Approach:',
63
- '- Honour the design and any resolved decisions and prior work given to you; do not redesign silently.',
64
- '- Lay out the key modules, functions and data shapes, and the wiring between them.',
65
- '- Handle errors and edge cases explicitly; validate input at the boundary.',
66
- '- Keep the implementation cohesive and minimal — no speculative abstraction.',
67
- '- Note any follow-ups or assumptions you had to make.',
68
- '',
69
- BUILD_DELIVERY_GATE,
70
- '',
71
- STANDARDS_FOOTER,
72
- ].join('\n'),
73
- review: [
74
- 'You are a meticulous code reviewer owning the REVIEW of a building block.',
75
- 'Assess the proposed work for correctness, quality, security and risk.',
76
- '',
77
- 'Approach:',
78
- '- Check the work against the stated intent, the design, and the required standards.',
79
- '- Look for correctness bugs, missing edge cases, security issues and unwarranted complexity.',
80
- '- List concrete, actionable findings ordered by severity (blocker → nit); reference the specific part each concerns.',
81
- '- Distinguish must-fix issues from optional suggestions.',
82
- '- If the work is sound, say so explicitly rather than inventing problems.',
83
- '',
84
- STANDARDS_FOOTER,
85
- ].join('\n'),
86
- test: [
87
- 'You are a pragmatic test engineer owning the TESTING of a building block.',
88
- 'Define the tests that give the most confidence for the least effort.',
89
- '',
90
- 'Approach:',
91
- '- Identify the key behaviours, the boundaries and the failure modes worth covering.',
92
- '- Prioritise: list the highest-value tests to write first, and why.',
93
- '- Cover the happy path, important edge cases and error handling; note any that need integration- or end-to-end-level coverage.',
94
- '- Keep tests deterministic and independent; call out fixtures or test data needed.',
95
- '- Flag anything that is hard to test and how the design could change to fix that.',
96
- '',
97
- STANDARDS_FOOTER,
98
- ].join('\n'),
99
- };
100
- /** The built-out system (role) prompt for a standard phase. */
101
- export function standardSystemPrompt(phase) {
102
- return SYSTEM_PROMPTS[phase];
103
- }
104
- // --- User prompts ---------------------------------------------------------
105
- // The run context is dynamic (features, decisions, prior outputs), so the user
106
- // prompt is rendered from a Handlebars template. Cloudflare Workers forbid
107
- // runtime code generation, so we cannot compile templates from source there;
108
- // instead the templates are *precompiled* (see scripts/precompile-prompts.mjs)
109
- // into ./standard-prompt-templates.generated and executed by the codegen-free
110
- // Handlebars runtime. We use an isolated environment so the registered helper
111
- // and partial never touch global state.
112
- const hbs = Handlebars.create();
113
- hbs.registerHelper('join', (value, separator) => Array.isArray(value) ? value.join(typeof separator === 'string' ? separator : ', ') : '');
114
- // The shared context preamble is a precompiled template registered as a partial,
115
- // so each phase template can pull it in via {{> blockContext}}.
116
- hbs.registerPartial('blockContext', hbs.template(templateSpecs.blockContext));
117
- const USER_TEMPLATES = {
118
- design: hbs.template(templateSpecs.design),
119
- build: hbs.template(templateSpecs.build),
120
- review: hbs.template(templateSpecs.review),
121
- test: hbs.template(templateSpecs.test),
122
- };
123
- function toView(context) {
124
- // A just-resolved decision counts as resolved context for this step.
125
- const decisions = context.resolvedDecision
126
- ? [...context.decisions, context.resolvedDecision]
127
- : context.decisions;
128
- return {
129
- pipelineName: context.pipelineName,
130
- block: {
131
- title: context.block.title,
132
- type: context.block.type,
133
- description: context.block.description,
134
- },
135
- decisions,
136
- priorOutputs: context.priorOutputs,
137
- };
138
- }
139
- /**
140
- * Render the "ephemeral environment under test" section from the run context, or
141
- * an empty string when no environment is attached. The auth scheme is described
142
- * so the agent knows how to reach the env, but the raw access token/password is
143
- * deliberately NOT placed in the prompt — it must not be sent to the LLM
144
- * provider; programmatic consumers read it from `context.environment.access`.
145
- */
146
- export function environmentSection(context) {
147
- const env = context.environment;
148
- if (!env)
149
- return '';
150
- const lines = [
151
- '',
152
- 'Ephemeral environment under test:',
153
- `- URL: ${env.url ?? '(pending)'}`,
154
- `- Status: ${env.status}`,
155
- ];
156
- const access = env.access;
157
- if (access && access.scheme !== 'none') {
158
- if (access.scheme === 'bearer') {
159
- lines.push('- Auth: Bearer token (provided to the test harness out of band)');
160
- }
161
- else if (access.scheme === 'basic') {
162
- lines.push('- Auth: HTTP Basic credentials (provided to the test harness out of band)');
163
- }
164
- else if (access.scheme === 'custom_header' && access.headerName) {
165
- lines.push(`- Auth: \`${access.headerName}\` header (value provided out of band)`);
166
- }
167
- }
168
- return lines.join('\n');
169
- }
170
- /**
171
- * Render the linked extra-context section — documents (requirements / RFCs /
172
- * PRDs) and tracker issues attached to the block — or an empty string when none
173
- * are linked. Shared by every agent kind (standard phases and the generic roles
174
- * alike) so the same context the engine resolves for a step (see
175
- * `ExecutionService.buildAgentContext`) reaches whichever agent runs it. The
176
- * leading blank lines separate it from the preceding prompt content;
177
- * `renderStandardUserPrompt` collapses any runs of blank lines it produces.
178
- */
179
- export function linkedContextSection(context) {
180
- const { contextDocs, contextTasks } = context.block;
181
- const lines = [];
182
- if (contextDocs?.length) {
183
- lines.push('', 'Linked context documents (requirements / RFCs / PRDs):');
184
- for (const doc of contextDocs)
185
- lines.push(`### ${doc.title} (${doc.url})`, doc.excerpt);
186
- }
187
- if (contextTasks?.length) {
188
- lines.push('', 'Linked tracker issues (extra context):');
189
- for (const task of contextTasks)
190
- lines.push(renderTaskContext(task));
191
- }
192
- return lines.length ? `\n${lines.join('\n')}` : '';
193
- }
194
- /** Render the built-out user prompt for a standard phase from the run context. */
195
- export function renderStandardUserPrompt(phase, context) {
196
- const rendered = USER_TEMPLATES[phase](toView(context)) +
197
- linkedContextSection(context) +
198
- environmentSection(context);
199
- // Collapse the blank lines that conditionals leave behind, then trim.
200
- return rendered.replace(/\n{3,}/g, '\n\n').trim();
201
- }
202
- //# sourceMappingURL=standard-prompts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"standard-prompts.js","sourceRoot":"","sources":["../../src/agents/standard-prompts.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,oFAAoF;AACpF,sFAAsF;AACtF,0CAA0C;AAC1C,OAAO,iBAAiB,MAAM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C,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AACpD,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,wBAAwB,CAAC,KAAoB,EAAE,OAAwB;IACrF,MAAM,QAAQ,GACZ,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACtC,oBAAoB,CAAC,OAAO,CAAC;QAC7B,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC7B,sEAAsE;IACtE,OAAO,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAA;AACnD,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { AgentKind, AgentRunContext } from '@cat-factory/kernel';
2
- /** True when the kind is part of the Tester/Fixer track. */
3
- export declare function isTestingKind(kind: AgentKind): boolean;
4
- /** The built-out system prompt for a Tester/Fixer kind, or undefined otherwise. */
5
- export declare function testingSystemPrompt(kind: AgentKind): string | undefined;
6
- /**
7
- * The "which environment to run in" section for a Tester step, rendered from the
8
- * block's contributed `tester.environment` config value. Empty for non-tester kinds
9
- * or when nothing is set, so callers can append it unconditionally.
10
- */
11
- export declare function testerEnvironmentSection(context: AgentRunContext): string;
12
- //# sourceMappingURL=test-prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-prompts.d.ts","sourceRoot":"","sources":["../../src/agents/test-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAqErE,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAEtD;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAIvE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAUzE"}
@@ -1,92 +0,0 @@
1
- import { STANDARDS_FOOTER } from './prompt-shared.js';
2
- import { TESTER_ENVIRONMENT_CONFIG_ID } from './agent-configs.js';
3
- // Built-out role prompts for the Tester → Fixer loop. The `tester` clones the PR
4
- // branch, brings its dependencies up (locally via docker-compose, or against the
5
- // provisioned ephemeral environment — the task's `tester.environment` config picks
6
- // which), exercises this task's requirements plus best-judgement regression of
7
- // related behaviour, and returns ONLY a structured JSON report (it makes no commits,
8
- // like the `merger`). When the report withholds its greenlight the engine dispatches
9
- // the `fixer` with the report folded in; the fixer commits fixes to the same branch
10
- // and the Tester re-runs, until greenlight or the attempt budget is spent.
11
- const TESTER_AGENT_KIND = 'tester';
12
- const FIXER_AGENT_KIND = 'fixer';
13
- /** The JSON shape the Tester must emit, kept in sync with `testReportSchema`. */
14
- const TEST_REPORT_SHAPE = [
15
- 'Respond with ONLY a JSON object (no prose, no code fences) of this shape:',
16
- '{',
17
- ' "greenlight": boolean, // true only when the change is safe to release',
18
- ' "summary": string, // overall prose summary of the session',
19
- ' "tested": string[], // what you chose to exercise (requirements + regression areas)',
20
- ' "outcomes": [ // per-area results',
21
- ' { "name": string, "status": "passed" | "failed" | "skipped", "detail"?: string }',
22
- ' ],',
23
- ' "concerns": [ // bugs/risks to fix before re-testing; non-empty ⇒ greenlight false',
24
- ' { "title": string, "detail": string, "severity": "low" | "medium" | "high" | "critical" }',
25
- ' ],',
26
- ' "environment"?: "local" | "ephemeral"',
27
- '}',
28
- ].join('\n');
29
- const TESTER_SYSTEM_PROMPT = [
30
- 'You are a meticulous test engineer doing EXPLORATORY testing of a pull request before release.',
31
- 'You actually run the software and observe its behaviour — you do NOT pass judgement by reading the diff or restating what the implementer says they did. A greenlight that is not backed by something you actually exercised is worthless.',
32
- '',
33
- 'Bootstrap your environment from the repository:',
34
- "- Read the repo's README.md (and any CONTRIBUTING / docs it points to) to learn how to install dependencies, configure the service, run migrations and start it.",
35
- "- Local mode: the platform has stood up the service's infra dependencies from its docker-compose file (including the WireMock mocks the mocker step added for the service's external dependencies) and exposed them on localhost. Connect to them, run any DB migrations, then start the service and exercise it against those mocks. If the service was marked as having no infra dependencies, just run the suite directly.",
36
- '- Ephemeral mode: a deployed environment URL (and access credentials) is provided in the run context; test against it rather than starting anything locally.',
37
- '',
38
- 'What to test:',
39
- "- Start from the specs written in earlier steps: the unified spec under `spec/` and especially its Gherkin acceptance scenarios in `spec/features/*.feature`. Walk the scenarios that cover THIS task's new functionality and confirm the running service actually behaves that way.",
40
- '- Explore the new functionality beyond the happy path: probe edge cases, bad input, error and boundary conditions, and the failure responses the external mocks can return — the kinds of things a scripted suite tends to miss.',
41
- '- Then do a REASONABLE amount of regression testing of related behaviour the change could plausibly affect — target the blast radius, do not re-test the whole system.',
42
- '- Run the existing automated suite where present, and add your own ad-hoc checks (API calls, flows, UI interactions) on top of it.',
43
- '',
44
- 'Rules:',
45
- "- Make NO commits and open NO pull request — you only assess and report. Fixes are another agent's job (the engine dispatches a fixer when you withhold the greenlight, then re-runs you).",
46
- '- Base every outcome on something you actually observed. Greenlight ONLY when you have exercised the change and are confident it is correct and safe; any blocking bug or unresolved risk means greenlight=false with the concern listed. Minor, sub-blocking issues go in `concerns` at low/medium severity without necessarily withholding the greenlight.',
47
- '',
48
- TEST_REPORT_SHAPE,
49
- ].join('\n');
50
- const FIXER_SYSTEM_PROMPT = [
51
- 'You are a software engineer fixing problems a tester found on this pull-request branch.',
52
- 'The tester’s structured report (what was tested, the outcomes, and the concerns/bugs to fix) is provided in the run context below.',
53
- '',
54
- 'Address every concern the tester raised:',
55
- '- Reproduce each issue, find the root cause, and make the minimal correct change to fix it.',
56
- '- Do not disable, skip or weaken tests to make them pass; fix the underlying behaviour.',
57
- '- Keep the project building and the existing tests green.',
58
- '',
59
- 'Commit your fixes to the current branch (no new branch, no new PR) so the tester can re-run against them.',
60
- '',
61
- STANDARDS_FOOTER,
62
- ].join('\n');
63
- /** True when the kind is part of the Tester/Fixer track. */
64
- export function isTestingKind(kind) {
65
- return kind === TESTER_AGENT_KIND || kind === FIXER_AGENT_KIND;
66
- }
67
- /** The built-out system prompt for a Tester/Fixer kind, or undefined otherwise. */
68
- export function testingSystemPrompt(kind) {
69
- if (kind === TESTER_AGENT_KIND)
70
- return TESTER_SYSTEM_PROMPT;
71
- if (kind === FIXER_AGENT_KIND)
72
- return FIXER_SYSTEM_PROMPT;
73
- return undefined;
74
- }
75
- /**
76
- * The "which environment to run in" section for a Tester step, rendered from the
77
- * block's contributed `tester.environment` config value. Empty for non-tester kinds
78
- * or when nothing is set, so callers can append it unconditionally.
79
- */
80
- export function testerEnvironmentSection(context) {
81
- if (context.agentKind !== TESTER_AGENT_KIND)
82
- return '';
83
- const env = context.block.agentConfig?.[TESTER_ENVIRONMENT_CONFIG_ID];
84
- if (env === 'ephemeral') {
85
- return '\nRun mode: ephemeral environment — test against the provided environment URL; do not start the service locally.';
86
- }
87
- if (env === 'local') {
88
- return '\nRun mode: local — the service’s infra dependencies have been stood up on localhost; start the service yourself and test it there.';
89
- }
90
- return '';
91
- }
92
- //# sourceMappingURL=test-prompts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-prompts.js","sourceRoot":"","sources":["../../src/agents/test-prompts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAA;AAEjE,iFAAiF;AACjF,iFAAiF;AACjF,mFAAmF;AACnF,+EAA+E;AAC/E,qFAAqF;AACrF,qFAAqF;AACrF,oFAAoF;AACpF,2EAA2E;AAE3E,MAAM,iBAAiB,GAAG,QAAQ,CAAA;AAClC,MAAM,gBAAgB,GAAG,OAAO,CAAA;AAEhC,iFAAiF;AACjF,MAAM,iBAAiB,GAAG;IACxB,2EAA2E;IAC3E,GAAG;IACH,qFAAqF;IACrF,4EAA4E;IAC5E,oGAAoG;IACpG,wDAAwD;IACxD,sFAAsF;IACtF,MAAM;IACN,yGAAyG;IACzG,+FAA+F;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B,OAAO,kHAAkH,CAAA;IAC3H,CAAC;IACD,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;QACpB,OAAO,qIAAqI,CAAA;IAC9I,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC"}
@@ -1,56 +0,0 @@
1
- import type { AgentKind } from '@cat-factory/kernel';
2
- /** A trait id. Free-form so deployments can define their own beyond the standard two. */
3
- export type AgentTrait = string;
4
- /**
5
- * Code-aware kinds read and/or change the service's code. The service's selected
6
- * best-practice / guideline fragments (Node, Fastify, performance, …) are folded into
7
- * their system prompt by the execution engine.
8
- */
9
- export declare const CODE_AWARE_TRAIT: AgentTrait;
10
- /**
11
- * Spec-aware kinds are told to read the in-repo `spec/` artifact (the prescriptive
12
- * service specification) and how to interpret it. The instruction is appended to their
13
- * system prompt via {@link traitGuidanceFor}.
14
- */
15
- export declare const SPEC_AWARE_TRAIT: AgentTrait;
16
- /** The guidance appended to a spec-aware kind's system prompt — explains the spec format. */
17
- export declare const SPEC_AWARE_GUIDANCE: string;
18
- /**
19
- * Built-in trait assignment per agent kind.
20
- * - `code-aware`: the kinds that read/modify the service's code, so the service's
21
- * best-practice fragments are relevant to them.
22
- * - `spec-aware`: every code-touching kind (anything that clones and reads the repo),
23
- * so each is pointed at the in-repo spec. The `spec-writer` is intentionally absent —
24
- * it AUTHORS the spec rather than consuming it.
25
- */
26
- export declare const STANDARD_AGENT_TRAITS: Partial<Record<AgentKind, AgentTrait[]>>;
27
- /** Definition of a (custom) trait: its id and optional system-prompt guidance. */
28
- export interface AgentTraitDefinition {
29
- /** The trait id used in `STANDARD_AGENT_TRAITS` / `AgentKindDefinition.traits`. */
30
- id: AgentTrait;
31
- /**
32
- * Guidance folded into the system prompt of every kind carrying this trait. A function
33
- * form receives the kind id. Omit for a pure marker trait whose effect lives in the
34
- * engine (like `code-aware`).
35
- */
36
- guidance?: string | ((kind: AgentKind) => string);
37
- }
38
- /** Register a custom trait definition. A later registration of the same id replaces it. */
39
- export declare function registerAgentTrait(definition: AgentTraitDefinition): void;
40
- /** Register several custom trait definitions at once. */
41
- export declare function registerAgentTraits(definitions: Iterable<AgentTraitDefinition>): void;
42
- /** The definition for a trait id, or undefined when it is a pure marker / unregistered. */
43
- export declare function registeredAgentTrait(id: AgentTrait): AgentTraitDefinition | undefined;
44
- /** Drop all registered (custom) traits. Intended for tests; standard traits re-register below. */
45
- export declare function clearRegisteredAgentTraits(): void;
46
- /** The traits a kind carries: its built-in set unioned with a registered custom kind's. */
47
- export declare function traitsFor(kind: AgentKind): Set<AgentTrait>;
48
- /** Whether `kind` carries `trait`. */
49
- export declare function hasTrait(kind: AgentKind, trait: AgentTrait): boolean;
50
- /**
51
- * The guidance lines contributed by the traits a kind carries, in trait order. Folded
52
- * into the kind's system prompt by `systemPromptFor`. Marker traits (no guidance, e.g.
53
- * `code-aware`) contribute nothing here.
54
- */
55
- export declare function traitGuidanceFor(kind: AgentKind): string[];
56
- //# sourceMappingURL=traits.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"traits.d.ts","sourceRoot":"","sources":["../../src/agents/traits.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAapD,yFAAyF;AACzF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAA;AAE/B;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAyB,CAAA;AAExD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAyB,CAAA;AAExD,6FAA6F;AAC7F,eAAO,MAAM,mBAAmB,QAOpB,CAAA;AAEZ;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,CAe1E,CAAA;AAED,kFAAkF;AAClF,MAAM,WAAW,oBAAoB;IACnC,mFAAmF;IACnF,EAAE,EAAE,UAAU,CAAA;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAA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