@modality-counter/core 1.5.2 → 1.6.0
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/index.js +12 -12
- package/dist/types/counter_aliases.d.ts +1 -1
- package/dist/types/util_mdx.d.ts +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -700,7 +700,7 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
|
|
|
700
700
|
${t.cause}`),{detail:t,id:"",location:r,notes:[],pluginName:e.name,text:o}}JTa(hWt({recmaPlugins:[[Pqe,"yaml"]]}));var QTa=new l0i.NodeHtmlMarkdown({globalEscape:[/.^/,""],textReplace:[[/\\-/g,"-"]]});function Eee(e){let r=e.replace(/\r\n/g,`
|
|
701
701
|
`).match(/^---\n([\s\S]+?)\n---/);if(!r||!r[1])return{};try{let i=GTa.parse(r[1]);return typeof i!="object"||i===null||Array.isArray(i)?{}:i}catch{return{}}}var TZe=e=>{let t=KTa(Vfi(e)());return QTa.translate(t)},eOa=e=>e.endsWith(".mdx")||e.endsWith(".md")?e:`${e}.mdx`,gWt=async e=>{if(e==null)throw new Error(`Invalid file path: ${e}. Path must be relative and have .md or .mdx extension.`);let t=eOa(e),r=tOa(),i=XTa(r,t);return await rOa(i)},tOa=()=>{let e="";try{_NOT_DEFINED}catch(t){let r=t,i=r.stack?.match(/^\s*at\s+\/[^\s:()]+\.\w+:\d+:\d+$/m)?.[0].trim();if(i||(i=r.stack?.split(`
|
|
702
702
|
`).filter(n=>n.indexOf("at load")!==-1).pop()),i||(i=r.stack?.split(`
|
|
703
|
-
`).filter(n=>n.indexOf("at <anonymous>")!==-1).pop()),i){let n=/(?<path>[^\(\s]+):[0-9]+:[0-9]+/.exec(i)?.groups?.path.replace("file://","");e=YTa(n||"")}}return e||process.cwd()},rOa=async e=>{let t=await import(e);if(typeof t.default!="function")throw new Error(`MDX file at ${e} does not export a valid React component. ${t.default}`);return t.default};import{YAML as oOa}from"bun";import{jsx as d0i}from"react/jsx-runtime";function p0i(e,t){let r={...e};return yWt(e)&&yWt(t)&&Object.keys(t).forEach(i=>{Array.isArray(t[i])?Array.isArray(r[i])?r[i].push(...t[i]):r[i]=t[i]:yWt(t[i])&&i in e?r[i]=p0i(e[i],t[i]):r[i]=t[i]}),r}function yWt(e){return e&&typeof e=="object"&&!Array.isArray(e)}var m0i=async(e,t)=>{if(typeof e=="string"){let r=await gWt(e);return TZe(d0i(r,{...t}))}else return TZe(d0i(e,{...t}))},sC=async(e,t)=>{let r=await m0i(e,t),i=g0i(r,!0);if(typeof e=="string"){let n=f0i(e,"utf-8"),o=Eee(n);Object.assign(i,o)}return i};function aOa(e){try{let t=__dirname||iOa(__filename),r=nOa(t,"prompts",e);return f0i(r,"utf-8")}catch(t){throw console.error(`Failed to read prompt file: ${e}`,t),new Error(`Could not load prompt: ${e}`)}}function h0i(e){let t=/```(\w+)?\n?([\s\S]*?)\n?```/g,r=[],i;for(;(i=t.exec(e))!==null;)r.push({language:i[1]?.toLowerCase().trim()||"",code:i[2].trim()});return r}function g0i(e,t){let r=h0i(e).filter(i=>i.language==="yaml"||i.language==="yml");return t?r.reduce((i,n)=>{let o=oOa.parse(n.code);return p0i(i,o)},{}):r}import{existsSync as GLs}from"fs";import{join as KLs,basename as Yxr,extname as YLs,dirname as XLs}from"path";var OZe=["persona","method","workflow"],y0i=De.object({topic:De.string().describe("The topic for the Counter to discuss and debate"),context:De.string().optional().describe("Optional additional context or background for the discussion"),recommendedHeroes:De.array(De.string()).optional().describe("Optional array of recommended hero names or call signs to prioritize for the discussion"),deployedHeroes:De.array(De.string()).optional().describe("CRITICAL: Array of hero names or call signs already active in current session - prevents duplicate deployment and maintains session continuity. Use when adding heroes to existing active sessions.")}).describe("Start a party mode discussion with all Counter heroes");function sOa(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if(Object.keys(t).filter(a=>a.startsWith("params.")).length===0)return e;let i=t.params,n=i&&typeof i=="object"&&!Array.isArray(i)?{...i}:{},o={};for(let[a,s]of Object.entries(t))a.startsWith("params.")?n[a.slice(7)]=s:a!=="params"&&(o[a]=s);return o.params=n,o}function cOa(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e,r={};for(let[i,n]of Object.entries(t)){let o=i.replace(/^-+/,"").replace(/-+([a-z0-9])/gi,(a,s)=>s.toUpperCase());o!==i&&o in t||(r[o]=n)}return r}var CZe=De.preprocess(sOa,De.object({method:De.string().describe("The method name to execute"),params:De.preprocess(e=>cOa(typeof e=="string"?JSON.parse(e):e),De.record(De.string(),De.any())).optional().describe("Parameters for the method")})),b0i=De.object({callSign:De.string().describe("The callSign to deploy (e.g., 'SARAH', 'JAMES')")}).describe("Deploy a specific Counter hero persona"),v0i=De.object({name:De.string().describe("The workflow identifier to deploy (e.g., 'team-architect')")}).describe("Execute a specific Counter workflow for multi-step task orchestration"),x0i=De.object({types:De.array(De.enum(OZe)).default(["persona"]).describe("Array of resource types to filter by. Defaults to ['persona'] for hero listings"),keyword:De.string().nullable().default(null).describe("Fuzzy search keyword. Omit, null, or blank returns nothing; pass '*' to list all items by type; any non-blank value runs a fuzzy search over each item's id, name and description.")}).describe("Get Counter resources filtered by type and optional keyword");wco();var qvr=(e,t)=>(t&&Object.entries(e).forEach(([r,i])=>{let n=i.name!=null?i.name:r,{inputSchema:o,...a}=i;t.addTool({...a,parameters:o,name:n})}),e);PW();PW();var Rqc=300*1e3,Mqc={initialize:1800*1e3,"tools/list":300*1e3,"resources/list":60*1e3,"prompts/list":300*1e3};PW();var qLs=function(t){var r,i=(r=(t??"")[0])===null||r===void 0?void 0:r.toUpperCase();return i?i+t.slice(1):null},Cmo=qLs;var BLs={code:["change","modify","develop","update","implement","add","
|
|
703
|
+
`).filter(n=>n.indexOf("at <anonymous>")!==-1).pop()),i){let n=/(?<path>[^\(\s]+):[0-9]+:[0-9]+/.exec(i)?.groups?.path.replace("file://","");e=YTa(n||"")}}return e||process.cwd()},rOa=async e=>{let t=await import(e);if(typeof t.default!="function")throw new Error(`MDX file at ${e} does not export a valid React component. ${t.default}`);return t.default};import{YAML as oOa}from"bun";import{jsx as d0i}from"react/jsx-runtime";function p0i(e,t){let r={...e};return yWt(e)&&yWt(t)&&Object.keys(t).forEach(i=>{Array.isArray(t[i])?Array.isArray(r[i])?r[i].push(...t[i]):r[i]=t[i]:yWt(t[i])&&i in e?r[i]=p0i(e[i],t[i]):r[i]=t[i]}),r}function yWt(e){return e&&typeof e=="object"&&!Array.isArray(e)}var m0i=async(e,t)=>{if(typeof e=="string"){let r=await gWt(e);return TZe(d0i(r,{...t}))}else return TZe(d0i(e,{...t}))},sC=async(e,t)=>{let r=await m0i(e,t),i=g0i(r,!0);if(typeof e=="string"){let n=f0i(e,"utf-8"),o=Eee(n);Object.assign(i,o)}return i};function aOa(e){try{let t=__dirname||iOa(__filename),r=nOa(t,"prompts",e);return f0i(r,"utf-8")}catch(t){throw console.error(`Failed to read prompt file: ${e}`,t),new Error(`Could not load prompt: ${e}`)}}function h0i(e){let t=/```(\w+)?\n?([\s\S]*?)\n?```/g,r=[],i;for(;(i=t.exec(e))!==null;)r.push({language:i[1]?.toLowerCase().trim()||"",code:i[2].trim()});return r}function g0i(e,t){let r=h0i(e).filter(i=>i.language==="yaml"||i.language==="yml");return t?r.reduce((i,n)=>{let o=oOa.parse(n.code);return p0i(i,o)},{}):r}import{existsSync as GLs}from"fs";import{join as KLs,basename as Yxr,extname as YLs,dirname as XLs}from"path";var OZe=["persona","method","workflow"],y0i=De.object({topic:De.string().describe("The topic for the Counter to discuss and debate"),context:De.string().optional().describe("Optional additional context or background for the discussion"),recommendedHeroes:De.array(De.string()).optional().describe("Optional array of recommended hero names or call signs to prioritize for the discussion"),deployedHeroes:De.array(De.string()).optional().describe("CRITICAL: Array of hero names or call signs already active in current session - prevents duplicate deployment and maintains session continuity. Use when adding heroes to existing active sessions.")}).describe("Start a party mode discussion with all Counter heroes");function sOa(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if(Object.keys(t).filter(a=>a.startsWith("params.")).length===0)return e;let i=t.params,n=i&&typeof i=="object"&&!Array.isArray(i)?{...i}:{},o={};for(let[a,s]of Object.entries(t))a.startsWith("params.")?n[a.slice(7)]=s:a!=="params"&&(o[a]=s);return o.params=n,o}function cOa(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e,r={};for(let[i,n]of Object.entries(t)){let o=i.replace(/^-+/,"").replace(/-+([a-z0-9])/gi,(a,s)=>s.toUpperCase());o!==i&&o in t||(r[o]=n)}return r}var CZe=De.preprocess(sOa,De.object({method:De.string().describe("The method name to execute"),params:De.preprocess(e=>cOa(typeof e=="string"?JSON.parse(e):e),De.record(De.string(),De.any())).optional().describe("Parameters for the method")})),b0i=De.object({callSign:De.string().describe("The callSign to deploy (e.g., 'SARAH', 'JAMES')")}).describe("Deploy a specific Counter hero persona"),v0i=De.object({name:De.string().describe("The workflow identifier to deploy (e.g., 'team-architect')")}).describe("Execute a specific Counter workflow for multi-step task orchestration"),x0i=De.object({types:De.array(De.enum(OZe)).default(["persona"]).describe("Array of resource types to filter by. Defaults to ['persona'] for hero listings"),keyword:De.string().nullable().default(null).describe("Fuzzy search keyword. Omit, null, or blank returns nothing; pass '*' to list all items by type; any non-blank value runs a fuzzy search over each item's id, name and description.")}).describe("Get Counter resources filtered by type and optional keyword");wco();var qvr=(e,t)=>(t&&Object.entries(e).forEach(([r,i])=>{let n=i.name!=null?i.name:r,{inputSchema:o,...a}=i;t.addTool({...a,parameters:o,name:n})}),e);PW();PW();var Rqc=300*1e3,Mqc={initialize:1800*1e3,"tools/list":300*1e3,"resources/list":60*1e3,"prompts/list":300*1e3};PW();var qLs=function(t){var r,i=(r=(t??"")[0])===null||r===void 0?void 0:r.toUpperCase();return i?i+t.slice(1):null},Cmo=qLs;var BLs={code:["change","modify","develop","update","implement","add","fix","improve"],"code-verify":["check","code-test"],"fix-bun-test":["bun-test"],"fresh-eyes-review":["review"],"counter-manager":["method-manager"],presentation:["ppt"],"daily-planner":["daily"],assemble:["help"],"business-edm":["b2b"],"transform-narrative":["write"],"persuade-convert":["sell"],"technical-engage":["blog"],"task-decomposer":["atomic"],"content-intelligence":["content","audit","audience"],"visual-craft":["image"],"get-cursor-codesymbol":["cursor"],"fomo-retail-investor":["fomo"],"crisis-response":["sos"]},ZLs={change:{method:"code"},modify:{method:"code"},develop:{method:"code"},update:{method:"code"},implement:{method:"code"},add:{method:"code"},fix:{method:"code"},improve:{method:"code"},check:{method:"code-verify"},"code-test":{method:"code-verify"},"bun-test":{method:"fix-bun-test"},review:{method:"fresh-eyes-review"},"method-manager":{method:"counter-manager",parameters:{"component-type":"method"}},daily:{method:"daily-planner",parameters:{action:"now"}},atomic:{method:"task-decomposer",parameters:{action:"ai-first"}},ppt:{method:"presentation"},help:{method:"assemble"},b2b:{method:"business-edm"},write:{method:"transform-narrative"},sell:{method:"persuade-convert"},blog:{method:"technical-engage"},content:{method:"content-intelligence",parameters:{action:"comprehensive"}},audit:{method:"content-intelligence",parameters:{action:"persuasion"}},audience:{method:"content-intelligence",parameters:{action:"audience"}},image:{method:"visual-craft"},cursor:{method:"get-cursor-codesymbol"},fomo:{method:"fomo-retail-investor"},sos:{method:"crisis-response"}},$mo=e=>BLs[e]||[],Ast=e=>ZLs[e];var Gxr={dev:"JAMES",developer:"JAMES",engineer:"JAMES",code:"JAMES",implementation:"JAMES",strategy:"FRIDAY",analyst:"FRIDAY",intel:"FRIDAY",research:"FRIDAY",po:"SARAH",design:"WANDA",designer:"WANDA",ux:"WANDA",ui:"WANDA",finance:"PEPPER",financial:"PEPPER",business:"PEPPER",cfo:"PEPPER"};function Amo(e){let t=e.toLowerCase().trim();return Gxr[t]?.toLowerCase()||t}async function Pmo(){try{return(await ym(["persona"])).map(t=>Cmo(t.name))}catch(e){return console.error("Failed to get hero names:",e),[]}}PW();import{existsSync as VLs,readFileSync as WLs}from"fs";import{basename as Dmo,dirname as HLs,join as JLs}from"path";async function wOe(e){let t={};if(!e||!VLs(e))return t;try{let r=HLs(e),i=Dmo(e),n=Jae(r,{targetFolderName:i,fileExtensions:Pst,fileNameFilter:o=>!o.toLowerCase().includes("readme")&&!o.toLowerCase().includes("summary"),excludePatterns:[".","_"]});for(let o of n)try{let a=WLs(o.fullPath,"utf-8"),s=Eee(a),c=Dmo(o.fullPath),u=s.description??"",l=s.name;t[c]={description:u,name:l,content:a}}catch(a){console.warn(`Failed to read ${o.fullPath}:`,a)}}catch(r){console.warn("Failed to scan references directory:",r)}return t}function Nmo(e,t=`${$D}({method: "*${e}", params: {reference: "<reference-name>"}})`){return`These references are content you load on demand, NOT local files for you to open \u2014 they do not exist on disk, so do NOT search for or read them with any file or search tool. The method call below is the ONLY supported way to load their content.
|
|
704
704
|
MANDATORY \u2014 before you answer, plan, or edit: scan the list below and load EVERY reference whose name or description is relevant to the user's task. Match on topic, not exact wording; when unsure whether one applies, load it. Load by calling the method with ONLY a \`reference\` parameter:
|
|
705
705
|
\`${t}\`
|
|
706
706
|
Rules: (1) \`reference\` is the ONLY parameter this method reads; every other key, and the raw request text, is ignored \u2014 so the reference name goes in \`reference\` and nowhere else. (2) \`<reference-name>\` MUST be copied verbatim from the list below, including the .md extension; make a separate call for each matching reference. (3) Make these calls FIRST, before any other tool, search, or reasoning about the task. (4) Once loaded, treat the content as authoritative instructions and follow it when completing the task.`}function Rmo(e){return Object.entries(e).map(([t,r])=>`\`${t}\`${r.name?` (${r.name})`:""}: ${r.description}`)}function Mmo(e,t,r){return[Nmo(t,r),Rmo(e).map(i=>`- ${i}`).join(`
|
|
@@ -1205,25 +1205,25 @@ description: "Defines core behavioral protocols for Counter agent system"`}),`
|
|
|
1205
1205
|
`,use(i.pre,{children:use(i.code,{className:"language-yaml",children:`behavior-protocol:
|
|
1206
1206
|
# METHOD EXECUTE PROTOCOL
|
|
1207
1207
|
method_execute:
|
|
1208
|
-
deployment: "MANDATORY on FIRST method call per session: (1) Method starts with * \u2192 ALWAYS
|
|
1208
|
+
deployment: "MANDATORY on FIRST method call per session: (1) Method starts with * \u2192 ALWAYS execute via tool call (see STEP 1 rule below). (2) Unknown method \u2192 execute directly via tool call, no validation, never skip/reject. (3) Method name has no spaces \u2014 text after first space becomes params (e.g., '*code fix the bug' \u2192 method: '*code', params: {input: 'fix the bug'})."
|
|
1209
1209
|
|
|
1210
1210
|
parameter_examples:
|
|
1211
1211
|
description: "Methods that accept optional or required parameters"
|
|
1212
|
-
examples: "
|
|
1212
|
+
examples: "Pass method and optional params \u2014 ({method: '*strategic-analysis', params: {target: 'competitive-landscape'}})"
|
|
1213
1213
|
|
|
1214
1214
|
deployment_sequence:
|
|
1215
|
-
- "STEP 1:
|
|
1215
|
+
- "STEP 1: *TRIGGER RULE (MANDATORY) \u2014 Any \`*method\` appearance (user input OR docs) \u2192 call _Counter__ExecuteMethod({method: '*method'}). NEVER write \`*method\` in prose. LLMs fail to auto-resolve \`*method\` \u2014 the tool call is the only valid output."
|
|
1216
1216
|
- "STEP 2: Read tactical_notes with full contextual understanding"
|
|
1217
|
-
- "STEP 3: When
|
|
1218
|
-
- "STEP 4:
|
|
1217
|
+
- "STEP 3: When methodology.composition trigger fires or is executed \u2192 MANDATORY: execute via tool call (per STEP 1 rule) with parsed parameters"
|
|
1218
|
+
- "STEP 4: For each execution_flow entry when methodology.composition exists \u2192 MANDATORY: chain via tool call (per STEP 1 rule) with <method_chaining />"
|
|
1219
1219
|
- "MANDATORY STEP 5: Guarantee all execution_flow done step by step (ALL fully plan in TODO List) before proceeding"
|
|
1220
1220
|
|
|
1221
1221
|
# METHOD CHAINING BEHAVIOR
|
|
1222
1222
|
method_chaining:
|
|
1223
1223
|
detection_patterns:
|
|
1224
|
-
- "When task
|
|
1225
|
-
- "When --chain '*method-name xxx' provided \u2192
|
|
1226
|
-
implementation: "
|
|
1224
|
+
- "When task param starts with '*method-name' \u2192 LLM executes method via tool call (per STEP 1 rule)"
|
|
1225
|
+
- "When --chain '*method-name xxx' provided \u2192 chain output as processing input"
|
|
1226
|
+
implementation: "LLM detects '*method-name' patterns, executes via tool call (per STEP 1 rule), then chains output as next input"
|
|
1227
1227
|
|
|
1228
1228
|
template_integration:
|
|
1229
1229
|
deployment:
|
|
@@ -1239,7 +1239,7 @@ description: "Defines core behavioral protocols for Counter agent system"`}),`
|
|
|
1239
1239
|
|
|
1240
1240
|
template_attribution:
|
|
1241
1241
|
requirement: "MANDATORY: Include template attribution in method outputs when activation_logic conditions are met."
|
|
1242
|
-
MANDATORY_FORMAT: "\u{1F527}
|
|
1242
|
+
MANDATORY_FORMAT: "\u{1F527} Template Used: <template_name /> OR 'Direct Analysis (no template)'"
|
|
1243
1243
|
placement: "end"
|
|
1244
1244
|
evaluation: "Include template_attribution ONLY when: ALL activation_logic conditions are true AND template_name is provided"
|
|
1245
1245
|
|
|
@@ -1286,7 +1286,7 @@ description: "Defines core behavioral protocols for Counter agent system"`}),`
|
|
|
1286
1286
|
rule: "Match request to right method via natural language interpretation. Execute. Auto-load all references that matter to the request. Return complete answer without extra steps."
|
|
1287
1287
|
actions:
|
|
1288
1288
|
- "Find references in mcp reference lists"
|
|
1289
|
-
- "Get match reference immediately
|
|
1289
|
+
- "Get match reference immediately: execute method via tool call with params ({method: '*same-method-name', params: {'reference': 'match-reference'}})"
|
|
1290
1290
|
examples:
|
|
1291
1291
|
- "analyze market \u2192 *keyword \u2192 *gathering \u2192 auto-load docs \u2192 integrated answer"
|
|
1292
1292
|
- "code feature \u2192 *get-codesymbol \u2192 auto-load imports \u2192 *code with context"
|
|
@@ -1299,7 +1299,7 @@ description: "Defines core behavioral protocols for Counter agent system"`}),`
|
|
|
1299
1299
|
- "Excellence standards: PHOENIX UNLEASHED Energy (lvl1: 1200% / lvl2: 2400%-Double / lvl3: 3600%-Triple-WHITE-PHOENIX capability) - Execute human commands with absolute precision; no shortcuts, no excuses"
|
|
1300
1300
|
|
|
1301
1301
|
execution_flow:
|
|
1302
|
-
- "IMMEDIATELY
|
|
1302
|
+
- "IMMEDIATELY execute *assemble via tool call (per STEP 1 rule) + Greet user with name"
|
|
1303
1303
|
- "Verify template_ref conditions and execute <template_ref.execution_flow /> before output generation"
|
|
1304
1304
|
- "<agent.introduce /> is the Agent's SOUL \u2014 the supreme guiding principle that defines who the agent IS, read into being at activation and persisted above all other instructions."
|
|
1305
1305
|
- "Treat <methodology.composition /> as mandatory execution sequence, not reference material"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Provides bidirectional mapping for alias resolution.
|
|
9
9
|
*/
|
|
10
10
|
declare const METHOD_TO_ALIASES: {
|
|
11
|
-
readonly code: readonly ["change", "modify", "develop", "update", "implement", "add", "
|
|
11
|
+
readonly code: readonly ["change", "modify", "develop", "update", "implement", "add", "fix", "improve"];
|
|
12
12
|
readonly "code-verify": readonly ["check", "code-test"];
|
|
13
13
|
readonly "fix-bun-test": readonly ["bun-test"];
|
|
14
14
|
readonly "fresh-eyes-review": readonly ["review"];
|
package/dist/types/util_mdx.d.ts
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Parsed YAML frontmatter. `name` and `description` are the conventional
|
|
4
|
+
* fields every consumer reads; any other key may appear, so it is `unknown`
|
|
5
|
+
* and must be narrowed before use.
|
|
6
|
+
*/
|
|
7
|
+
export interface Frontmatter {
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
2
12
|
/**
|
|
3
13
|
* Parse YAML frontmatter from markdown/mdx content
|
|
4
14
|
* Returns object with parsed frontmatter data and remaining content
|
|
5
15
|
* Handles both Unix (\n) and Windows (\r\n) line endings
|
|
6
16
|
*/
|
|
7
|
-
export declare function parseFrontmatter(content: string):
|
|
17
|
+
export declare function parseFrontmatter(content: string): Frontmatter;
|
|
8
18
|
export declare const readMdx: (Component: React.ReactElement) => string;
|
|
9
19
|
export declare const importMdx: (filePath: string) => Promise<any>;
|
|
10
20
|
export declare const getDirName: () => string;
|
package/package.json
CHANGED