text
stringlengths
55
456k
metadata
dict
# 基于 SPG 建模的产业链企业图谱 [English](./README.md) | [简体中文](./README_cn.md) ## 1. 建模文件 schema 文件语法介绍参见 [声明式 schema](https://openspg.yuque.com/ndx6g9/0.6/fzhov4l2sst6bede)。 企业供应链图谱 schema 建模参考文件 [SupplyChain.schema](./SupplyChain.schema)。 执行以下脚本,完成 schema 创建: ```bash knext schema commit ``` ## 2. SPG 建模方法 vs 属性图建模方法 本节对比 SPG 语义建模和普通建模的差异。 ### 2.1 语义属性 vs 文本属性 假定存在如下公司信息:"北大药份限公司"生产的产品有四个"医疗器械批发,医药批发,制药,其他化学药品"。 ```text id,name,products CSF0000000254,北大*药*份限公司,"医疗器械批发,医药批发,制药,其他化学药品" ``` #### 2.1.1 基于文本属性建模 ```text //文本属性建模 Company(企业): EntityType properties: product(经营产品): Text ``` 此时经营产品只为文本,不包含语义信息,是无法得到“北大药份限公司”的上下游产业链相关信息,极不方便维护也不方便使用。 #### 2.1.2 基于关系建模 ```text Product(产品): EntityType properties: name(产品名): Text relations: isA(上位产品): Product Company(企业): EntityType relations: product(经营产品): Product ``` 但如此建模,则需要将数据分为 3 列: ```text id,name,product CSF0000000254,北大*药*份限公司,医疗器械批发 CSF0000000254,北大*药*份限公司,医药批发 CSF0000000254,北大*药*份限公司,制药 CSF0000000254,北大*药*份限公司,其他化学药品 ``` 这种方式也存在两个缺点: 1. 原始数据需要做一次清洗,转换成多行。 2. 需要新增维护关系数据,当原始数据发生变更时,需要删除原有关系,再新增数据,容易导致数据错误。 #### 2.1.3 基于 SPG 语义属性建模 SPG 支持语义属性,可简化知识构建,如下: ```text Product(产品): ConceptType hypernymPredicate: isA Company(企业): EntityType properties: product(经营产品): Product constraint: MultiValue ``` 企业中具有一个经营产品属性,且该属性的类型为 ``Product`` 类型,只需将如下数据导入,可自动实现属性到关系的转换。 ```text id,name,products CSF0000000254,北大*药*份限公司,"医疗器械批发,医药批发,制药,其他化学药品" ``` ### 2.2 逻辑表达的属性、关系 vs 数据表达的属性、关系 假定需要得到企业所在行业,根据当前已有数据,可执行如下查询语句: ```cypher MATCH (s:Company)-[:product]->(o:Product)-[:belongToIndustry]->(i:Industry) RETURN s.id, i.id ``` 该方式需要熟悉图谱 schema,对人员上手要求比较高,故也有一种实践是将这类属性重新导入图谱,如下: ```text Company(企业): EntityType properties: product(经营产品): Product constraint: MultiValue relations: belongToIndustry(所在行业): Industry ``` 新增一个关系类型,来直接获取公司所属行业信息。 这种方式缺点主要有两个: 1. 需要用户手动维护新增关系数据,增加使用维护成本。 2. 由于新关系和图谱数据存在来源依赖,非常容易导致图谱数据出现不一致问题。 针对上述缺点,SPG 支持逻辑表达属性和关系,如下建模方式: ```text Company(企业): EntityType properties: product(经营产品): Product constraint: MultiValue relations: belongToIndustry(所在行业): Industry rule: [[ Define (s:Company)-[p:belongToIndustry]->(o:Industry) { Structure { (s)-[:product]->(c:Product)-[:belongToIndustry]->(o) } Constraint { } } ]] ``` 具体内容可参见 [产业链企业信用图谱查询任务](../reasoner/README_cn.md) 中场景 1、场景 2 的示例。 ### 2.3 概念体系 vs 实体体系 现有图谱方案也有常识图谱,例如 ConceptNet 等,但在业务落地中,不同业务有各自体现业务语义的类目体系,基本上不存在一个常识图谱可应用到所有业务场景,故常见的实践为将业务领域体系创建为实体,和其他实体数据混用,这就导致在同一个分类体系上,既要对 schema 的扩展建模,又要对语义上的细分类建模,数据结构定义和语义建模的耦合,导致工程实现及维护管理的复杂性,也增加了业务梳理和表示(认知)领域知识的困难。 SPG 区分了概念和实体,用于解耦语义和数据,如下: ```text Product(产品): ConceptType hypernymPredicate: isA Company(企业): EntityType properties: product(经营产品): Product constraint: MultiValue ``` 产品被定义为概念,公司被定义为实体,相互独立演进,两者通过 SPG 提供的语义属性进行挂载关联,用户无需手动维护企业和产品之间关联。 ### 2.4 事件时空多元表达 事件多要素结构表示也是一类超图(HyperGrpah)无损表示的问题,它表达的是时空多元要素的时空关联性,事件是各要素因某种行为而产生的临时关联,一旦行为结束,这种关联也随即消失。在以往的属性图中,事件只能使用实体进行替代,由文本属性表达事件内容,如下类似事件: ![KAG SupplyChain Event Demo](/_static/images/examples/supplychain/kag-supplychain-event-demo.png) ```text Event(事件): properties: eventTime(发生时间): Long subject(涉事主体): Text object(客体): Text place(地点): Text industry(涉事行业): Text ``` 这种表达方式,是无法体现真实事件的多元关联性,SPG 提供了事件建模,可实现事件多元要素的关联,如下: ```text CompanyEvent(公司事件): EventType properties: subject(主体): Company index(指标): Index trend(趋势): Trend belongTo(属于): TaxOfCompanyEvent ``` 上述的事件中,属性类型均为已被定义类型,没有基本类型表达,SPG 基于此申明实现事件多元要素表达,具体应用示例可见 [产业链企业信用图谱查询任务](../reasoner/README_cn.md) 中场景 3 的具体描述。
{ "source": "OpenSPG/KAG", "title": "kag/examples/supplychain/schema/README_cn.md", "url": "https://github.com/OpenSPG/KAG/blob/master/kag/examples/supplychain/schema/README_cn.md", "date": "2024-09-21T13:56:44", "stars": 5456, "description": "KAG is a logical form-guided reasoning and retrieval framework based on OpenSPG engine and LLMs. It is used to build logical reasoning and factual Q&A solutions for professional domain knowledge bases. It can effectively overcome the shortcomings of the traditional RAG vector similarity calculation model.", "file_size": 3871 }
# 1、周杰伦 <font style="color:rgb(51, 51, 51);background-color:rgb(224, 237, 255);">华语流行乐男歌手、音乐人、演员、导演、编剧</font> 周杰伦(Jay Chou),1979年1月18日出生于台湾省新北市,祖籍福建省永春县,华语流行乐男歌手、音乐人、演员、导演、编剧,毕业于[淡江中学](https://baike.baidu.com/item/%E6%B7%A1%E6%B1%9F%E4%B8%AD%E5%AD%A6/5340877?fromModule=lemma_inlink)。 2000年,发行个人首张音乐专辑《[Jay](https://baike.baidu.com/item/Jay/5291?fromModule=lemma_inlink)》 [26]。2001年,凭借专辑《[范特西](https://baike.baidu.com/item/%E8%8C%83%E7%89%B9%E8%A5%BF/22666?fromModule=lemma_inlink)》奠定其融合中西方音乐的风格 [16]。2002年,举行“The One”世界巡回演唱会 [1]。2003年,成为美国《[时代](https://baike.baidu.com/item/%E6%97%B6%E4%BB%A3/1944848?fromModule=lemma_inlink)》杂志封面人物 [2];同年,发行音乐专辑《[叶惠美](https://baike.baidu.com/item/%E5%8F%B6%E6%83%A0%E7%BE%8E/893?fromModule=lemma_inlink)》 [21],该专辑获得[第15届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC15%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/9773084?fromModule=lemma_inlink)最佳流行音乐演唱专辑奖 [23]。2004年,发行音乐专辑《[七里香](https://baike.baidu.com/item/%E4%B8%83%E9%87%8C%E9%A6%99/2181450?fromModule=lemma_inlink)》 [29],该专辑在亚洲的首月销量达到300万张 [316];同年,获得[世界音乐大奖](https://baike.baidu.com/item/%E4%B8%96%E7%95%8C%E9%9F%B3%E4%B9%90%E5%A4%A7%E5%A5%96/6690633?fromModule=lemma_inlink)中国区最畅销艺人奖 [320]。2005年,主演个人首部电影《[头文字D](https://baike.baidu.com/item/%E5%A4%B4%E6%96%87%E5%AD%97D/2711022?fromModule=lemma_inlink)》 [314],并凭借该片获得[第25届香港电影金像奖](https://baike.baidu.com/item/%E7%AC%AC25%E5%B1%8A%E9%A6%99%E6%B8%AF%E7%94%B5%E5%BD%B1%E9%87%91%E5%83%8F%E5%A5%96/10324781?fromModule=lemma_inlink)和[第42届台湾电影金马奖](https://baike.baidu.com/item/%E7%AC%AC42%E5%B1%8A%E5%8F%B0%E6%B9%BE%E7%94%B5%E5%BD%B1%E9%87%91%E9%A9%AC%E5%A5%96/10483829?fromModule=lemma_inlink)的最佳新演员奖 [3] [315]。2006年起,连续三年获得世界音乐大奖中国区最畅销艺人奖 [4]。 2007年,自编自导爱情电影《[不能说的秘密](https://baike.baidu.com/item/%E4%B8%8D%E8%83%BD%E8%AF%B4%E7%9A%84%E7%A7%98%E5%AF%86/39267?fromModule=lemma_inlink)》 [321],同年,成立[杰威尔音乐有限公司](https://baike.baidu.com/item/%E6%9D%B0%E5%A8%81%E5%B0%94%E9%9F%B3%E4%B9%90%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8/5929467?fromModule=lemma_inlink) [10]。2008年,凭借歌曲《[青花瓷](https://baike.baidu.com/item/%E9%9D%92%E8%8A%B1%E7%93%B7/9864403?fromModule=lemma_inlink)》获得[第19届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC19%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/3968762?fromModule=lemma_inlink)最佳作曲人奖 [292]。2009年,入选美国[CNN](https://baike.baidu.com/item/CNN/86482?fromModule=lemma_inlink)“25位亚洲最具影响力人物” [6];同年,凭借专辑《[魔杰座](https://baike.baidu.com/item/%E9%AD%94%E6%9D%B0%E5%BA%A7/49875?fromModule=lemma_inlink)》获得[第20届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC20%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/8055336?fromModule=lemma_inlink)最佳国语男歌手奖 [7]。2010年,入选美国《[Fast Company](https://baike.baidu.com/item/Fast%20Company/6508066?fromModule=lemma_inlink)》杂志评出的“全球百大创意人物”。2011年,凭借专辑《[跨时代](https://baike.baidu.com/item/%E8%B7%A8%E6%97%B6%E4%BB%A3/516122?fromModule=lemma_inlink)》获得[第22届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC22%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/7220967?fromModule=lemma_inlink)最佳国语男歌手奖 [294]。2012年,登上[福布斯中国名人榜](https://baike.baidu.com/item/%E7%A6%8F%E5%B8%83%E6%96%AF%E4%B8%AD%E5%9B%BD%E5%90%8D%E4%BA%BA%E6%A6%9C/2125?fromModule=lemma_inlink)榜首 [8]。2014年,发行个人首张数字音乐专辑《[哎呦,不错哦](https://baike.baidu.com/item/%E5%93%8E%E5%91%A6%EF%BC%8C%E4%B8%8D%E9%94%99%E5%93%A6/9851748?fromModule=lemma_inlink)》 [295]。2023年,凭借专辑《[最伟大的作品](https://baike.baidu.com/item/%E6%9C%80%E4%BC%9F%E5%A4%A7%E7%9A%84%E4%BD%9C%E5%93%81/61539892?fromModule=lemma_inlink)》成为首位获得[国际唱片业协会](https://baike.baidu.com/item/%E5%9B%BD%E9%99%85%E5%94%B1%E7%89%87%E4%B8%9A%E5%8D%8F%E4%BC%9A/1486316?fromModule=lemma_inlink)“全球畅销专辑榜”冠军的华语歌手 [287]。 ## <font style="color:rgb(51, 51, 51);">1.1、早年经历</font> 周杰伦出生于台湾省新北市,祖籍福建省泉州市永春县 [13]。4岁的时候,母亲[叶惠美](https://baike.baidu.com/item/%E5%8F%B6%E6%83%A0%E7%BE%8E/2325933?fromModule=lemma_inlink)把他送到淡江山叶幼儿音乐班学习钢琴。初中二年级时,父母因性格不合离婚,周杰伦归母亲叶惠美抚养。中考时,没有考上普通高中,同年,因为擅长钢琴而被[淡江中学](https://baike.baidu.com/item/%E6%B7%A1%E6%B1%9F%E4%B8%AD%E5%AD%A6/5340877?fromModule=lemma_inlink)第一届音乐班录取。高中毕业以后,两次报考[台北大学](https://baike.baidu.com/item/%E5%8F%B0%E5%8C%97%E5%A4%A7%E5%AD%A6/7685732?fromModule=lemma_inlink)音乐系均没有被录取,于是开始在一家餐馆打工。 1997年9月,周杰伦在母亲的鼓励下报名参加了台北星光电视台的娱乐节目《[超级新人王](https://baike.baidu.com/item/%E8%B6%85%E7%BA%A7%E6%96%B0%E4%BA%BA%E7%8E%8B/6107880?fromModule=lemma_inlink)》 [26],并在节目中邀人演唱了自己创作的歌曲《梦有翅膀》。当主持人[吴宗宪](https://baike.baidu.com/item/%E5%90%B4%E5%AE%97%E5%AE%AA/29494?fromModule=lemma_inlink)看到这首歌曲的曲谱后,就邀请周杰伦到[阿尔发音乐](https://baike.baidu.com/item/%E9%98%BF%E5%B0%94%E5%8F%91%E9%9F%B3%E4%B9%90/279418?fromModule=lemma_inlink)公司担任音乐助理。1998年,创作歌曲《[眼泪知道](https://baike.baidu.com/item/%E7%9C%BC%E6%B3%AA%E7%9F%A5%E9%81%93/2106916?fromModule=lemma_inlink)》,公司把这首歌曲给到[刘德华](https://baike.baidu.com/item/%E5%88%98%E5%BE%B7%E5%8D%8E/114923?fromModule=lemma_inlink)后被退歌,后为[张惠妹](https://baike.baidu.com/item/%E5%BC%A0%E6%83%A0%E5%A6%B9/234310?fromModule=lemma_inlink)创作的歌曲《[双截棍](https://baike.baidu.com/item/%E5%8F%8C%E6%88%AA%E6%A3%8D/2986610?fromModule=lemma_inlink)》和《[忍者](https://baike.baidu.com/item/%E5%BF%8D%E8%80%85/1498981?fromModule=lemma_inlink)》(后收录于周杰伦个人音乐专辑《[范特西](https://baike.baidu.com/item/%E8%8C%83%E7%89%B9%E8%A5%BF/22666?fromModule=lemma_inlink)》中)也被退回 [14]。 ![](https://intranetproxy.alipay.com/skylark/lark/0/2024/jpeg/358/1716184862505-4372e22f-65bb-42b1-950b-d2ce835acb4c.jpeg) ## 1.2、演艺经历 2000年,在[杨峻荣](https://baike.baidu.com/item/%E6%9D%A8%E5%B3%BB%E8%8D%A3/8379373?fromModule=lemma_inlink)的推荐下,周杰伦开始演唱自己创作的歌曲;11月7日,发行个人首张音乐专辑《[Jay](https://baike.baidu.com/item/Jay/5291?fromModule=lemma_inlink)》 [26],并包办专辑全部歌曲的作曲、和声编写以及监制工作,该专辑融合了[R&B](https://baike.baidu.com/item/R&B/15271596?fromModule=lemma_inlink)、[嘻哈](https://baike.baidu.com/item/%E5%98%BB%E5%93%88/161896?fromModule=lemma_inlink)等多种音乐风格,其中的主打歌曲《[星晴](https://baike.baidu.com/item/%E6%98%9F%E6%99%B4/4798844?fromModule=lemma_inlink)》获得第24届[十大中文金曲](https://baike.baidu.com/item/%E5%8D%81%E5%A4%A7%E4%B8%AD%E6%96%87%E9%87%91%E6%9B%B2/823339?fromModule=lemma_inlink)优秀国语歌曲金奖 [15],而他也凭借该专辑在华语乐坛受到关注,并在次年举办的[第12届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC12%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/61016222?fromModule=lemma_inlink)颁奖典礼上凭借该专辑获得最佳流行音乐演唱专辑奖、入围最佳制作人奖,凭借专辑中的歌曲《[可爱女人](https://baike.baidu.com/item/%E5%8F%AF%E7%88%B1%E5%A5%B3%E4%BA%BA/3225780?fromModule=lemma_inlink)》提名[第12届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC12%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/61016222?fromModule=lemma_inlink)最佳作曲人奖。 2001年9月,周杰伦发行个人第二张音乐专辑《[范特西](https://baike.baidu.com/item/%E8%8C%83%E7%89%B9%E8%A5%BF/22666?fromModule=lemma_inlink)》 [26],他除了担任专辑的制作人外,还包办了专辑中所有歌曲的作曲,该专辑是周杰伦确立其唱片风格的作品,其中结合中西方音乐元素的主打歌曲《[双截棍](https://baike.baidu.com/item/%E5%8F%8C%E6%88%AA%E6%A3%8D/2986610?fromModule=lemma_inlink)》成为饶舌歌曲的代表作之一,该专辑的发行也让周杰伦打开东南亚市场 [16],并于次年凭借该专辑获得[第13届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC13%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/12761754?fromModule=lemma_inlink)最佳专辑制作人奖、最佳流行音乐专辑奖 [241],以及香港唱片销量大奖颁奖典礼十大销量国语唱片等奖项,周杰伦亦凭借专辑中的歌曲《[爱在西元前](https://baike.baidu.com/item/%E7%88%B1%E5%9C%A8%E8%A5%BF%E5%85%83%E5%89%8D/3488?fromModule=lemma_inlink)》获得第13届台湾金曲奖最佳作曲人奖 [228];10月,为[李玟](https://baike.baidu.com/item/%E6%9D%8E%E7%8E%9F/333755?fromModule=lemma_inlink)创作融合中西方音乐元素的歌曲《[刀马旦](https://baike.baidu.com/item/%E5%88%80%E9%A9%AC%E6%97%A6/3894792?fromModule=lemma_inlink)》 [325];12月24日,发行个人音乐EP《[范特西plus](https://baike.baidu.com/item/%E8%8C%83%E7%89%B9%E8%A5%BFplus/4950842?fromModule=lemma_inlink)》,收录了他在桃园巨蛋演唱会上演唱的《[你比从前快乐](https://baike.baidu.com/item/%E4%BD%A0%E6%AF%94%E4%BB%8E%E5%89%8D%E5%BF%AB%E4%B9%90/3564385?fromModule=lemma_inlink)》《[世界末日](https://baike.baidu.com/item/%E4%B8%96%E7%95%8C%E6%9C%AB%E6%97%A5/5697158?fromModule=lemma_inlink)》等歌曲;同年,获得第19届[十大劲歌金曲颁奖典礼](https://baike.baidu.com/item/%E5%8D%81%E5%A4%A7%E5%8A%B2%E6%AD%8C%E9%87%91%E6%9B%B2%E9%A2%81%E5%A5%96%E5%85%B8%E7%A4%BC/477072?fromModule=lemma_inlink)最受欢迎唱作歌星金奖、[叱咤乐坛流行榜颁奖典礼](https://baike.baidu.com/item/%E5%8F%B1%E5%92%A4%E4%B9%90%E5%9D%9B%E6%B5%81%E8%A1%8C%E6%A6%9C%E9%A2%81%E5%A5%96%E5%85%B8%E7%A4%BC/1325994?fromModule=lemma_inlink)叱咤乐坛生力军男歌手金奖等奖项。 2002年,参演个人首部电视剧《[星情花园](https://baike.baidu.com/item/%E6%98%9F%E6%83%85%E8%8A%B1%E5%9B%AD/8740841?fromModule=lemma_inlink)》;2月,在新加坡新达城国际会议展览中心举行演唱会;7月,发行个人第三张音乐专辑《[八度空间](https://baike.baidu.com/item/%E5%85%AB%E5%BA%A6%E7%A9%BA%E9%97%B4/1347996?fromModule=lemma_inlink)》 [26] [317],除了包办专辑中所有歌曲的作曲外,他还担任专辑的制作人 [17],该专辑以节奏蓝调风格的歌曲为主,并获得[g-music](https://baike.baidu.com/item/g-music/6992427?fromModule=lemma_inlink)风云榜白金音乐奖十大金碟奖、华语流行乐传媒大奖十大华语唱片奖、[新加坡金曲奖](https://baike.baidu.com/item/%E6%96%B0%E5%8A%A0%E5%9D%A1%E9%87%91%E6%9B%B2%E5%A5%96/6360377?fromModule=lemma_inlink)大奖年度最畅销男歌手专辑奖等奖项 [18];9月28日,在台北体育场举行“THE ONE”演唱会;12月12日至16日,在[香港体育馆](https://baike.baidu.com/item/%E9%A6%99%E6%B8%AF%E4%BD%93%E8%82%B2%E9%A6%86/2370398?fromModule=lemma_inlink)举行5场“THE ONE”演唱会;12月25日,在美国拉斯维加斯举办“THE ONE”演唱会;同年,获得第1届MTV日本音乐录影带大奖亚洲最杰出艺人奖、第2届[全球华语歌曲排行榜](https://baike.baidu.com/item/%E5%85%A8%E7%90%83%E5%8D%8E%E8%AF%AD%E6%AD%8C%E6%9B%B2%E6%8E%92%E8%A1%8C%E6%A6%9C/3189656?fromModule=lemma_inlink)最受欢迎创作歌手奖和最佳制作人奖 [350]、第9届[新加坡金曲奖](https://baike.baidu.com/item/%E6%96%B0%E5%8A%A0%E5%9D%A1%E9%87%91%E6%9B%B2%E5%A5%96/6360377?fromModule=lemma_inlink)亚太最受推崇男歌手奖等奖项 [19]。 ![](https://intranetproxy.alipay.com/skylark/lark/0/2024/jpeg/358/1716184907939-9c85df36-04bb-483b-8b1b-a1fe6c52429a.jpeg) 2003年2月,成为美国《[时代周刊](https://baike.baidu.com/item/%E6%97%B6%E4%BB%A3%E5%91%A8%E5%88%8A/6643818?fromModule=lemma_inlink)》亚洲版的封面人物 [2];3月,在[第3届音乐风云榜](https://baike.baidu.com/item/%E7%AC%AC3%E5%B1%8A%E9%9F%B3%E4%B9%90%E9%A3%8E%E4%BA%91%E6%A6%9C/23707987?fromModule=lemma_inlink)上获得港台年度最佳唱作人奖、年度风云大奖等奖项,其演唱的歌曲《[暗号](https://baike.baidu.com/item/%E6%9A%97%E5%8F%B7/3948301?fromModule=lemma_inlink)》则获得港台年度十大金曲奖 [236];5月17日,在[马来西亚](https://baike.baidu.com/item/%E9%A9%AC%E6%9D%A5%E8%A5%BF%E4%BA%9A/202243?fromModule=lemma_inlink)[吉隆坡](https://baike.baidu.com/item/%E5%90%89%E9%9A%86%E5%9D%A1/967683?fromModule=lemma_inlink)[默迪卡体育场](https://baike.baidu.com/item/%E9%BB%98%E8%BF%AA%E5%8D%A1%E4%BD%93%E8%82%B2%E5%9C%BA/8826151?fromModule=lemma_inlink)举行“THE ONE”演唱会;7月16日,他的歌曲《[以父之名](https://baike.baidu.com/item/%E4%BB%A5%E7%88%B6%E4%B9%8B%E5%90%8D/1341?fromModule=lemma_inlink)》在亚洲超过50家电台首播,预计有8亿人同时收听,而该曲首播的当日也被这些电台定为“[周杰伦日](https://baike.baidu.com/item/%E5%91%A8%E6%9D%B0%E4%BC%A6%E6%97%A5/9734555?fromModule=lemma_inlink)” [20];7月31日,发行个人第四张音乐专辑《[叶惠美](https://baike.baidu.com/item/%E5%8F%B6%E6%83%A0%E7%BE%8E/893?fromModule=lemma_inlink)》 [21] [26],他不仅包办了专辑所有歌曲的作曲,还担任专辑的制作人和造型师 [21],该专辑发行首月在亚洲的销量突破200万张 [22],并于次年获得[第15届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC15%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/9773084?fromModule=lemma_inlink)最佳流行音乐演唱专辑奖、第4届全球华语歌曲排行榜年度最受欢迎专辑等奖项 [23-24],专辑主打歌曲《[东风破](https://baike.baidu.com/item/%E4%B8%9C%E9%A3%8E%E7%A0%B4/1674691?fromModule=lemma_inlink)》也是周杰伦具有代表性的中国风作品之一,而他亦凭借该曲获得[第4届华语音乐传媒大奖](https://baike.baidu.com/item/%E7%AC%AC4%E5%B1%8A%E5%8D%8E%E8%AF%AD%E9%9F%B3%E4%B9%90%E4%BC%A0%E5%AA%92%E5%A4%A7%E5%A5%96/18003952?fromModule=lemma_inlink)最佳作曲人奖;9月12日,在[北京工人体育场](https://baike.baidu.com/item/%E5%8C%97%E4%BA%AC%E5%B7%A5%E4%BA%BA%E4%BD%93%E8%82%B2%E5%9C%BA/2214906?fromModule=lemma_inlink)举行“THE ONE”演唱会;11月13日,发行个人音乐EP《[寻找周杰伦](https://baike.baidu.com/item/%E5%AF%BB%E6%89%BE%E5%91%A8%E6%9D%B0%E4%BC%A6/2632938?fromModule=lemma_inlink)》 [25],该EP收录了周杰伦为同名电影《[寻找周杰伦](https://baike.baidu.com/item/%E5%AF%BB%E6%89%BE%E5%91%A8%E6%9D%B0%E4%BC%A6/1189?fromModule=lemma_inlink)》创作的两首歌曲《[轨迹](https://baike.baidu.com/item/%E8%BD%A8%E8%BF%B9/2770132?fromModule=lemma_inlink)》《[断了的弦](https://baike.baidu.com/item/%E6%96%AD%E4%BA%86%E7%9A%84%E5%BC%A6/1508695?fromModule=lemma_inlink)》 [25];12月12日,在[上海体育场](https://baike.baidu.com/item/%E4%B8%8A%E6%B5%B7%E4%BD%93%E8%82%B2%E5%9C%BA/9679224?fromModule=lemma_inlink)举办“THE ONE”演唱会,并演唱了变奏版的《[双截棍](https://baike.baidu.com/item/%E5%8F%8C%E6%88%AA%E6%A3%8D/2986610?fromModule=lemma_inlink)》、加长版的《[爷爷泡的茶](https://baike.baidu.com/item/%E7%88%B7%E7%88%B7%E6%B3%A1%E7%9A%84%E8%8C%B6/2746283?fromModule=lemma_inlink)》等歌曲;同年,客串出演的电影处女作《[寻找周杰伦](https://baike.baidu.com/item/%E5%AF%BB%E6%89%BE%E5%91%A8%E6%9D%B0%E4%BC%A6/1189?fromModule=lemma_inlink)》上映 [90]。 2004年1月21日,首次登上[中央电视台春节联欢晚会](https://baike.baidu.com/item/%E4%B8%AD%E5%A4%AE%E7%94%B5%E8%A7%86%E5%8F%B0%E6%98%A5%E8%8A%82%E8%81%94%E6%AC%A2%E6%99%9A%E4%BC%9A/7622174?fromModule=lemma_inlink)的舞台,并演唱歌曲《[龙拳](https://baike.baidu.com/item/%E9%BE%99%E6%8B%B3/2929202?fromModule=lemma_inlink)》 [27-28];3月,在[第4届音乐风云榜](https://baike.baidu.com/item/%E7%AC%AC4%E5%B1%8A%E9%9F%B3%E4%B9%90%E9%A3%8E%E4%BA%91%E6%A6%9C/23707984?fromModule=lemma_inlink)上获得台湾地区最受欢迎男歌手奖、年度风云大奖、年度港台及海外华人最佳制作人等奖项 [326];8月3日,发行融合嘻哈、R&B、[古典音乐](https://baike.baidu.com/item/%E5%8F%A4%E5%85%B8%E9%9F%B3%E4%B9%90/106197?fromModule=lemma_inlink)等风格的音乐专辑《[七里香](https://baike.baidu.com/item/%E4%B8%83%E9%87%8C%E9%A6%99/2181450?fromModule=lemma_inlink)》 [29] [289],该专辑发行当月在亚洲的销量突破300万张 [316],而专辑同名主打歌曲《[七里香](https://baike.baidu.com/item/%E4%B8%83%E9%87%8C%E9%A6%99/12009481?fromModule=lemma_inlink)》则获得[第27届十大中文金曲](https://baike.baidu.com/item/%E7%AC%AC27%E5%B1%8A%E5%8D%81%E5%A4%A7%E4%B8%AD%E6%96%87%E9%87%91%E6%9B%B2/12709616?fromModule=lemma_inlink)十大金曲奖、优秀流行国语歌曲奖金奖,以及[第5届全球华语歌曲排行榜](https://baike.baidu.com/item/%E7%AC%AC5%E5%B1%8A%E5%85%A8%E7%90%83%E5%8D%8E%E8%AF%AD%E6%AD%8C%E6%9B%B2%E6%8E%92%E8%A1%8C%E6%A6%9C/24682097?fromModule=lemma_inlink)年度25大金曲等奖项 [30];9月,获得第16届[世界音乐大奖](https://baike.baidu.com/item/%E4%B8%96%E7%95%8C%E9%9F%B3%E4%B9%90%E5%A4%A7%E5%A5%96/6690633?fromModule=lemma_inlink)中国区最畅销艺人奖 [320];10月起,在台北、香港、洛杉矶、蒙特维尔等地举行“无与伦比”世界巡回演唱会。 2005年1月11日,在第11届[全球华语榜中榜](https://baike.baidu.com/item/%E5%85%A8%E7%90%83%E5%8D%8E%E8%AF%AD%E6%A6%9C%E4%B8%AD%E6%A6%9C/10768347?fromModule=lemma_inlink)颁奖盛典上获得港台最佳男歌手奖、港台最受欢迎男歌手奖、港台最佳创作歌手奖等奖项 [31];4月,凭借专辑《[七里香](https://baike.baidu.com/item/%E4%B8%83%E9%87%8C%E9%A6%99/2181450?fromModule=lemma_inlink)》入围[第16届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC16%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/4745538?fromModule=lemma_inlink)最佳国语男演唱人奖、最佳流行音乐演唱专辑奖,凭借歌曲《[七里香](https://baike.baidu.com/item/%E4%B8%83%E9%87%8C%E9%A6%99/12009481?fromModule=lemma_inlink)》入围第16届台湾金曲奖最佳作曲人奖;6月23日,由其担任男主角主演的电影《[头文字D](https://baike.baidu.com/item/%E5%A4%B4%E6%96%87%E5%AD%97D/2711022?fromModule=lemma_inlink)》上映 [91],他在该片中饰演[藤原拓海](https://baike.baidu.com/item/%E8%97%A4%E5%8E%9F%E6%8B%93%E6%B5%B7/702611?fromModule=lemma_inlink) [314] [347],这也是他主演的个人首部电影 [314],他也凭借该片获得[第42届台湾电影金马奖](https://baike.baidu.com/item/%E7%AC%AC42%E5%B1%8A%E5%8F%B0%E6%B9%BE%E7%94%B5%E5%BD%B1%E9%87%91%E9%A9%AC%E5%A5%96/10483829?fromModule=lemma_inlink)最佳新演员奖 [3]、[第25届香港电影金像奖](https://baike.baidu.com/item/%E7%AC%AC25%E5%B1%8A%E9%A6%99%E6%B8%AF%E7%94%B5%E5%BD%B1%E9%87%91%E5%83%8F%E5%A5%96/10324781?fromModule=lemma_inlink)最佳新演员奖 [315];7月1日,在上海体育场举行“无与伦比巡回演唱会” [32];7月9日,在北京工人体育场举行“无与伦比巡回演唱会” [33]。8月31日,在日本发行个人首张精选专辑《[Initial J](https://baike.baidu.com/item/Initial%20J/2268270?fromModule=lemma_inlink)》 [327],该专辑收录了周杰伦为电影《头文字D》演唱的主题曲《[一路向北](https://baike.baidu.com/item/%E4%B8%80%E8%B7%AF%E5%90%91%E5%8C%97/52259?fromModule=lemma_inlink)》和《[飘移](https://baike.baidu.com/item/%E9%A3%98%E7%A7%BB/1246934?fromModule=lemma_inlink)》 [34];11月1日,发行个人第六张音乐专辑《[11月的萧邦](https://baike.baidu.com/item/11%E6%9C%88%E7%9A%84%E8%90%A7%E9%82%A6/467565?fromModule=lemma_inlink)》 [296],并包办了专辑中所有歌曲的作曲以及专辑的造型设计 [35],该专辑发行后以4.28%的销售份额获得台湾[G-MUSIC](https://baike.baidu.com/item/G-MUSIC/6992427?fromModule=lemma_inlink)年终排行榜冠军;同年,其创作的歌曲《[蜗牛](https://baike.baidu.com/item/%E8%9C%97%E7%89%9B/8578273?fromModule=lemma_inlink)》入选“上海中学生爱国主义歌曲推荐目录” [328]。 2006年1月11日,在第12届全球华语榜中榜颁奖盛典上获得最佳男歌手奖、最佳创作歌手奖、最受欢迎男歌手奖,并凭借歌曲《[夜曲](https://baike.baidu.com/item/%E5%A4%9C%E6%9B%B2/3886391?fromModule=lemma_inlink)》及其MV分别获得年度最佳歌曲奖、最受欢迎音乐录影带奖 [234];1月20日,发行个人音乐EP《[霍元甲](https://baike.baidu.com/item/%E9%9C%8D%E5%85%83%E7%94%B2/24226609?fromModule=lemma_inlink)》 [329],同名主打歌曲《[霍元甲](https://baike.baidu.com/item/%E9%9C%8D%E5%85%83%E7%94%B2/8903362?fromModule=lemma_inlink)》是[李连杰](https://baike.baidu.com/item/%E6%9D%8E%E8%BF%9E%E6%9D%B0/202569?fromModule=lemma_inlink)主演的同名电影《[霍元甲](https://baike.baidu.com/item/%E9%9C%8D%E5%85%83%E7%94%B2/8903304?fromModule=lemma_inlink)》的主题曲 [36];1月23日,在[第28届十大中文金曲](https://baike.baidu.com/item/%E7%AC%AC28%E5%B1%8A%E5%8D%81%E5%A4%A7%E4%B8%AD%E6%96%87%E9%87%91%E6%9B%B2/13467291?fromModule=lemma_inlink)颁奖典礼上获得了优秀流行歌手大奖、全年最高销量歌手大奖男歌手奖 [246];2月5日至6日,在日本东京举行演唱会;9月,发行个人第七张音乐专辑《[依然范特西](https://baike.baidu.com/item/%E4%BE%9D%E7%84%B6%E8%8C%83%E7%89%B9%E8%A5%BF/7709602?fromModule=lemma_inlink)》 [290],该专辑延续了周杰伦以往的音乐风格,并融合了中国风、说唱等音乐风格,其中与[费玉清](https://baike.baidu.com/item/%E8%B4%B9%E7%8E%89%E6%B8%85/651674?fromModule=lemma_inlink)合唱的中国风歌曲《[千里之外](https://baike.baidu.com/item/%E5%8D%83%E9%87%8C%E4%B9%8B%E5%A4%96/781?fromModule=lemma_inlink)》获得第13届全球华语音乐榜中榜年度最佳歌曲奖、[第29届十大中文金曲](https://baike.baidu.com/item/%E7%AC%AC29%E5%B1%8A%E5%8D%81%E5%A4%A7%E4%B8%AD%E6%96%87%E9%87%91%E6%9B%B2/7944447?fromModule=lemma_inlink)全国最受欢迎中文歌曲奖等奖项 [37-38],该专辑发行后以5.34%的销售份额位列台湾五大唱片排行榜第一位 [39],并获得[中华音乐人交流协会](https://baike.baidu.com/item/%E4%B8%AD%E5%8D%8E%E9%9F%B3%E4%B9%90%E4%BA%BA%E4%BA%A4%E6%B5%81%E5%8D%8F%E4%BC%9A/3212583?fromModule=lemma_inlink)年度十大优良专辑奖、IFPI香港唱片销量大奖最高销量国语唱片奖等奖项 [40];12月,发行个人音乐EP《[黄金甲](https://baike.baidu.com/item/%E9%BB%84%E9%87%91%E7%94%B2/62490685?fromModule=lemma_inlink)》 [330],该专辑获得IFPI香港唱片销量大奖十大畅销国语唱片奖 [332];同年,获得世界音乐大奖中国区最畅销艺人奖 [4];12月14日,主演的古装动作片《[满城尽带黄金甲](https://baike.baidu.com/item/%E6%BB%A1%E5%9F%8E%E5%B0%BD%E5%B8%A6%E9%BB%84%E9%87%91%E7%94%B2/18156?fromModule=lemma_inlink)》在中国内地上映 [331],他在片中饰演武功超群的二王子元杰,并凭借该片获得第16届上海影评人奖最佳男演员奖,而他为该片创作并演唱的主题曲《[菊花台](https://baike.baidu.com/item/%E8%8F%8A%E8%8A%B1%E5%8F%B0/2999088?fromModule=lemma_inlink)》则获得了[第26届香港电影金像奖](https://baike.baidu.com/item/%E7%AC%AC26%E5%B1%8A%E9%A6%99%E6%B8%AF%E7%94%B5%E5%BD%B1%E9%87%91%E5%83%8F%E5%A5%96/10324838?fromModule=lemma_inlink)最佳原创电影歌曲奖 [92] [220]。 ![](https://intranetproxy.alipay.com/skylark/lark/0/2024/jpeg/358/1716184907940-eb369354-d912-42d0-89d1-deddfa87f15b.jpeg) 2007年2月,首度担任导演并自导自演爱情片《[不能说的秘密](https://baike.baidu.com/item/%E4%B8%8D%E8%83%BD%E8%AF%B4%E7%9A%84%E7%A7%98%E5%AF%86/39267?fromModule=lemma_inlink)》 [93] [321],该片上映后获得[第44届台湾电影金马奖](https://baike.baidu.com/item/%E7%AC%AC44%E5%B1%8A%E5%8F%B0%E6%B9%BE%E7%94%B5%E5%BD%B1%E9%87%91%E9%A9%AC%E5%A5%96/10483746?fromModule=lemma_inlink)年度台湾杰出电影奖、[第27届香港电影金像奖](https://baike.baidu.com/item/%E7%AC%AC27%E5%B1%8A%E9%A6%99%E6%B8%AF%E7%94%B5%E5%BD%B1%E9%87%91%E5%83%8F%E5%A5%96/3846497?fromModule=lemma_inlink)最佳亚洲电影提名等奖项 [5],而他电影创作并演唱的同名主题曲《[不能说的秘密](https://baike.baidu.com/item/%E4%B8%8D%E8%83%BD%E8%AF%B4%E7%9A%84%E7%A7%98%E5%AF%86/1863255?fromModule=lemma_inlink)》获得了第44届台湾电影金马奖最佳原创电影歌曲奖 [5];5月,凭借《千里之外》和《[红模仿](https://baike.baidu.com/item/%E7%BA%A2%E6%A8%A1%E4%BB%BF/8705177?fromModule=lemma_inlink)》分别入围[第18届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC18%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/4678259?fromModule=lemma_inlink)最佳年度歌曲、最佳音乐录像带导演等奖项 [41];6月,凭借单曲《[霍元甲](https://baike.baidu.com/item/%E9%9C%8D%E5%85%83%E7%94%B2/8903362?fromModule=lemma_inlink)》获得第18届台湾金曲奖最佳单曲制作人奖 [42];11月2日,发行个人第八张音乐专辑《[我很忙](https://baike.baidu.com/item/%E6%88%91%E5%BE%88%E5%BF%99/1374653?fromModule=lemma_inlink)》 [243] [291],并在专辑中首次尝试美式乡村的音乐风格,而他也于次年凭借专辑中的中国风歌曲《[青花瓷](https://baike.baidu.com/item/%E9%9D%92%E8%8A%B1%E7%93%B7/9864403?fromModule=lemma_inlink)》获得[第19届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC19%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/3968762?fromModule=lemma_inlink)最佳作曲人奖以及最佳年度歌曲奖 [43] [292];11月4日,凭借专辑《[依然范特西](https://baike.baidu.com/item/%E4%BE%9D%E7%84%B6%E8%8C%83%E7%89%B9%E8%A5%BF/7709602?fromModule=lemma_inlink)》蝉联世界音乐大奖中国区最畅销艺人奖 [44];11月24日,在上海八万人体育场举行演唱会,并在演唱会中模仿了[维塔斯](https://baike.baidu.com/item/%E7%BB%B4%E5%A1%94%E6%96%AF/3770095?fromModule=lemma_inlink)的假声唱法 [45];12月,在香港体育馆举行7场“周杰伦07-08世界巡回香港站演唱会”。 2008年1月10日,周杰伦自导自演的爱情文艺片《[不能说的秘密](https://baike.baidu.com/item/%E4%B8%8D%E8%83%BD%E8%AF%B4%E7%9A%84%E7%A7%98%E5%AF%86/39267?fromModule=lemma_inlink)》在韩国上映 [94];2月6日,在[2008年中央电视台春节联欢晚会](https://baike.baidu.com/item/2008%E5%B9%B4%E4%B8%AD%E5%A4%AE%E7%94%B5%E8%A7%86%E5%8F%B0%E6%98%A5%E8%8A%82%E8%81%94%E6%AC%A2%E6%99%9A%E4%BC%9A/8970911?fromModule=lemma_inlink)上演唱歌曲《青花瓷》 [46];之后,《青花瓷》的歌词出现在山东、江苏两省的高考试题中 [47];2月16日,在日本[武道馆](https://baike.baidu.com/item/%E6%AD%A6%E9%81%93%E9%A6%86/1989260?fromModule=lemma_inlink)连开两场演唱会,成为继[邓丽君](https://baike.baidu.com/item/%E9%82%93%E4%B8%BD%E5%90%9B/27007?fromModule=lemma_inlink)、[王菲](https://baike.baidu.com/item/%E7%8E%8B%E8%8F%B2/11029?fromModule=lemma_inlink)之后第三位在武道馆开唱的华人歌手;同月,其主演的爱情喜剧片《[大灌篮](https://baike.baidu.com/item/%E5%A4%A7%E7%81%8C%E7%AF%AE/9173184?fromModule=lemma_inlink)》上映 [334],在片中饰演见义勇为、好打不平的孤儿[方世杰](https://baike.baidu.com/item/%E6%96%B9%E4%B8%96%E6%9D%B0/9936534?fromModule=lemma_inlink) [335],并为该片创作、演唱主题曲《[周大侠](https://baike.baidu.com/item/%E5%91%A8%E5%A4%A7%E4%BE%A0/10508241?fromModule=lemma_inlink)》 [334];4月30日,发行为[北京奥运会](https://baike.baidu.com/item/%E5%8C%97%E4%BA%AC%E5%A5%A5%E8%BF%90%E4%BC%9A/335299?fromModule=lemma_inlink)创作并演唱的歌曲《[千山万水](https://baike.baidu.com/item/%E5%8D%83%E5%B1%B1%E4%B8%87%E6%B0%B4/3167078?fromModule=lemma_inlink)》 [253];7月,在第19届台湾金曲奖颁奖典礼上凭借专辑《[不能说的秘密电影原声带](https://baike.baidu.com/item/%E4%B8%8D%E8%83%BD%E8%AF%B4%E7%9A%84%E7%A7%98%E5%AF%86%E7%94%B5%E5%BD%B1%E5%8E%9F%E5%A3%B0%E5%B8%A6/7752656?fromModule=lemma_inlink)》获得演奏类最佳专辑制作人奖,凭借《[琴房](https://baike.baidu.com/item/%E7%90%B4%E6%88%BF/2920397?fromModule=lemma_inlink)》获得演奏类最佳作曲人奖 [43];10月15日,发行个人第九张音乐专辑《[魔杰座](https://baike.baidu.com/item/%E9%AD%94%E6%9D%B0%E5%BA%A7/49875?fromModule=lemma_inlink)》 [297],该专辑融合了嘻哈、民谣等音乐风格,推出首周在G-MUSIC排行榜、五大唱片排行榜上获得冠军,发行一星期在亚洲的销量突破100万张 [48];11月,凭借专辑《[我很忙](https://baike.baidu.com/item/%E6%88%91%E5%BE%88%E5%BF%99/1374653?fromModule=lemma_inlink)》第四次获得世界音乐大奖中国区最畅销艺人奖 [4],并成为首位连续三届获得该奖项的华人歌手 [44]。 2009年1月25日,在[2009年中央电视台春节联欢晚会](https://baike.baidu.com/item/2009%E5%B9%B4%E4%B8%AD%E5%A4%AE%E7%94%B5%E8%A7%86%E5%8F%B0%E6%98%A5%E8%8A%82%E8%81%94%E6%AC%A2%E6%99%9A%E4%BC%9A/5938543?fromModule=lemma_inlink)上与[宋祖英](https://baike.baidu.com/item/%E5%AE%8B%E7%A5%96%E8%8B%B1/275282?fromModule=lemma_inlink)合作演唱歌曲《[本草纲目](https://baike.baidu.com/item/%E6%9C%AC%E8%8D%89%E7%BA%B2%E7%9B%AE/10619620?fromModule=lemma_inlink)》 [333];5月,在[昆山市体育中心](https://baike.baidu.com/item/%E6%98%86%E5%B1%B1%E5%B8%82%E4%BD%93%E8%82%B2%E4%B8%AD%E5%BF%83/10551658?fromModule=lemma_inlink)体育场举行演唱会;6月,在[第20届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC20%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/8055336?fromModule=lemma_inlink)颁奖典礼上,周杰伦凭借歌曲《[稻香](https://baike.baidu.com/item/%E7%A8%BB%E9%A6%99/11539?fromModule=lemma_inlink)》获得最佳年度歌曲奖,凭借歌曲《[魔术先生](https://baike.baidu.com/item/%E9%AD%94%E6%9C%AF%E5%85%88%E7%94%9F/6756619?fromModule=lemma_inlink)》获得最佳音乐录影带奖,凭借专辑《魔杰座》获得最佳国语男歌手奖 [7];7月,周杰伦悉尼演唱会的票房在美国公告牌上排名第二,成为该年全球单场演唱会票房收入第二名,并且打破了华人歌手在澳大利亚开演唱会的票房纪录;8月起,在[佛山世纪莲体育中心](https://baike.baidu.com/item/%E4%BD%9B%E5%B1%B1%E4%B8%96%E7%BA%AA%E8%8E%B2%E4%BD%93%E8%82%B2%E4%B8%AD%E5%BF%83/2393458?fromModule=lemma_inlink)体育场、[沈阳奥体中心](https://baike.baidu.com/item/%E6%B2%88%E9%98%B3%E5%A5%A5%E4%BD%93%E4%B8%AD%E5%BF%83/665665?fromModule=lemma_inlink)体育场等场馆举办个人巡回演唱会;12月,入选美国[CNN](https://baike.baidu.com/item/CNN/86482?fromModule=lemma_inlink)评出的“亚洲最具影响力的25位人物” [49];同月9日,与[林志玲](https://baike.baidu.com/item/%E6%9E%97%E5%BF%97%E7%8E%B2/172898?fromModule=lemma_inlink)共同主演的探险片《[刺陵](https://baike.baidu.com/item/%E5%88%BA%E9%99%B5/7759069?fromModule=lemma_inlink)》上映 [336],他在片中饰演拥有神秘力量的古城守陵人乔飞 [95]。 2010年2月9日,出演的古装武侠片《[苏乞儿](https://baike.baidu.com/item/%E8%8B%8F%E4%B9%9E%E5%84%BF/7887736?fromModule=lemma_inlink)》上映 [337],他在片中饰演冷酷、不苟言笑的[武神](https://baike.baidu.com/item/%E6%AD%A6%E7%A5%9E/61764957?fromModule=lemma_inlink) [338];同年,执导科幻剧《[熊猫人](https://baike.baidu.com/item/%E7%86%8A%E7%8C%AB%E4%BA%BA/23175?fromModule=lemma_inlink)》,并特别客串出演该剧 [339],他还为该剧创作了《[熊猫人](https://baike.baidu.com/item/%E7%86%8A%E7%8C%AB%E4%BA%BA/19687027?fromModule=lemma_inlink)》《[爱情引力](https://baike.baidu.com/item/%E7%88%B1%E6%83%85%E5%BC%95%E5%8A%9B/8585685?fromModule=lemma_inlink)》等歌曲 [96];3月28日,在[第14届全球华语榜中榜](https://baike.baidu.com/item/%E7%AC%AC14%E5%B1%8A%E5%85%A8%E7%90%83%E5%8D%8E%E8%AF%AD%E6%A6%9C%E4%B8%AD%E6%A6%9C/2234155?fromModule=lemma_inlink)暨亚洲影响力大典上获得12530无线音乐年度大奖 [242];5月18日,发行个人第十张音乐专辑《[跨时代](https://baike.baidu.com/item/%E8%B7%A8%E6%97%B6%E4%BB%A3/516122?fromModule=lemma_inlink)》 [293],并包办专辑中全部歌曲的作曲和制作,该专辑于次年获得[第22届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC22%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/7220967?fromModule=lemma_inlink)最佳国语专辑奖、[中国原创音乐流行榜](https://baike.baidu.com/item/%E4%B8%AD%E5%9B%BD%E5%8E%9F%E5%88%9B%E9%9F%B3%E4%B9%90%E6%B5%81%E8%A1%8C%E6%A6%9C/10663228?fromModule=lemma_inlink)最优秀专辑奖等奖项,而周杰伦也凭借该专辑获得第22届台湾金曲奖最佳国语男歌手奖 [50] [294];6月,入选美国杂志《[Fast Company](https://baike.baidu.com/item/Fast%20Company/6508066?fromModule=lemma_inlink)》评出的“全球百大创意人物”,并且成为首位入榜的华人男歌手;6月11日,在[台北小巨蛋](https://baike.baidu.com/item/%E5%8F%B0%E5%8C%97%E5%B0%8F%E5%B7%A8%E8%9B%8B/10648327?fromModule=lemma_inlink)举行“超时代”演唱会首场演出;8月,在一项名为“全球歌曲下载量最高歌手”(2008年年初至2010年8月10日)的调查中,周杰伦的歌曲下载量排名全球第三 [51];12月,编号为257248的小行星被命名为“[周杰伦星](https://baike.baidu.com/item/%E5%91%A8%E6%9D%B0%E4%BC%A6%E6%98%9F/8257706?fromModule=lemma_inlink)”,而周杰伦也创作了以该小行星为题材的歌曲《[爱的飞行日记](https://baike.baidu.com/item/%E7%88%B1%E7%9A%84%E9%A3%9E%E8%A1%8C%E6%97%A5%E8%AE%B0/1842823?fromModule=lemma_inlink)》;12月30日,美国古柏蒂奴市宣布把每年的12月31日设立为“周杰伦日” [52]。 2011年1月,凭借动作片《[青蜂侠](https://baike.baidu.com/item/%E9%9D%92%E8%9C%82%E4%BE%A0/7618833?fromModule=lemma_inlink)》进军好莱坞 [340],并入选美国电影网站Screen Crave评出的“十大最值得期待的新秀演员”;2月11日,登上[2011年中央电视台春节联欢晚会](https://baike.baidu.com/item/2011%E5%B9%B4%E4%B8%AD%E5%A4%AE%E7%94%B5%E8%A7%86%E5%8F%B0%E6%98%A5%E8%8A%82%E8%81%94%E6%AC%A2%E6%99%9A%E4%BC%9A/3001908?fromModule=lemma_inlink),并与林志玲表演、演唱歌曲《[兰亭序](https://baike.baidu.com/item/%E5%85%B0%E4%BA%AD%E5%BA%8F/2879867?fromModule=lemma_inlink)》 [341];2月23日,与[科比·布莱恩特](https://baike.baidu.com/item/%E7%A7%91%E6%AF%94%C2%B7%E5%B8%83%E8%8E%B1%E6%81%A9%E7%89%B9/318773?fromModule=lemma_inlink)拍摄雪碧广告以及MV,并创作了广告主题曲《[天地一斗](https://baike.baidu.com/item/%E5%A4%A9%E5%9C%B0%E4%B8%80%E6%96%97/6151126?fromModule=lemma_inlink)》;4月21日,美国《[时代周刊](https://baike.baidu.com/item/%E6%97%B6%E4%BB%A3%E5%91%A8%E5%88%8A/6643818?fromModule=lemma_inlink)》评选了“全球年度最具影响力人物100强”,周杰伦位列第二名;5月13日,凭借专辑《[跨时代](https://baike.baidu.com/item/%E8%B7%A8%E6%97%B6%E4%BB%A3/516122?fromModule=lemma_inlink)》、歌曲《[超人不会飞](https://baike.baidu.com/item/%E8%B6%85%E4%BA%BA%E4%B8%8D%E4%BC%9A%E9%A3%9E/39269?fromModule=lemma_inlink)》《[烟花易冷](https://baike.baidu.com/item/%E7%83%9F%E8%8A%B1%E6%98%93%E5%86%B7/211?fromModule=lemma_inlink)》分别入围第22届台湾金曲奖最佳专辑制作人奖、最佳年度歌曲奖、最佳作曲人奖等奖项 [53-54];5月,凭借动作片《青蜂侠》获得第20届美国[MTV电影电视奖](https://baike.baidu.com/item/MTV%E7%94%B5%E5%BD%B1%E7%94%B5%E8%A7%86%E5%A5%96/20817009?fromModule=lemma_inlink)最佳新人提名 [97];11月11日,发行个人第11张音乐专辑《[惊叹号!](https://baike.baidu.com/item/%E6%83%8A%E5%8F%B9%E5%8F%B7%EF%BC%81/10482087?fromModule=lemma_inlink)》 [247] [298],该专辑融合了[重金属摇滚](https://baike.baidu.com/item/%E9%87%8D%E9%87%91%E5%B1%9E%E6%91%87%E6%BB%9A/1514206?fromModule=lemma_inlink)、嘻哈、节奏蓝调、[爵士](https://baike.baidu.com/item/%E7%88%B5%E5%A3%AB/8315440?fromModule=lemma_inlink)等音乐风格,并首次引入[电子舞曲](https://baike.baidu.com/item/%E7%94%B5%E5%AD%90%E8%88%9E%E6%9B%B2/5673907?fromModule=lemma_inlink) [55];同年,在洛杉矶、吉隆坡、高雄等地举行“超时代世界巡回演唱会” [56]。 2012年,主演枪战动作电影《[逆战](https://baike.baidu.com/item/%E9%80%86%E6%88%98/9261017?fromModule=lemma_inlink)》,在片中饰演对错分明、具有强烈正义感的国际警务人员万飞 [98];4月,在[第16届全球华语榜中榜](https://baike.baidu.com/item/%E7%AC%AC16%E5%B1%8A%E5%85%A8%E7%90%83%E5%8D%8E%E8%AF%AD%E6%A6%9C%E4%B8%AD%E6%A6%9C/2211134?fromModule=lemma_inlink)亚洲影响力大典上获得了亚洲影响力最佳华语艺人奖、榜中榜最佳数字音乐奖,他的专辑《惊叹号!》也获得了港台最佳专辑奖 [342];5月,位列[福布斯中国名人榜](https://baike.baidu.com/item/%E7%A6%8F%E5%B8%83%E6%96%AF%E4%B8%AD%E5%9B%BD%E5%90%8D%E4%BA%BA%E6%A6%9C/2125?fromModule=lemma_inlink)第一名;5月15日,凭借专辑《惊叹号!》和歌曲《[水手怕水](https://baike.baidu.com/item/%E6%B0%B4%E6%89%8B%E6%80%95%E6%B0%B4/9504982?fromModule=lemma_inlink)》分别入围[第23届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC23%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/2044143?fromModule=lemma_inlink)最佳国语男歌手奖、最佳编曲人奖;9月22日,在新加坡F1赛道举办演唱会,成为首位在F1演出的华人歌手 [57];12月28日,发行个人第12张音乐专辑《[12新作](https://baike.baidu.com/item/12%E6%96%B0%E4%BD%9C/8186612?fromModule=lemma_inlink)》 [299],该专辑包括了中国风、说唱、蓝调、R&B、爵士等音乐风格,主打歌曲《[红尘客栈](https://baike.baidu.com/item/%E7%BA%A2%E5%B0%98%E5%AE%A2%E6%A0%88/8396283?fromModule=lemma_inlink)》获得第13届全球华语歌曲排行榜二十大金曲奖、[第36届十大中文金曲](https://baike.baidu.com/item/%E7%AC%AC36%E5%B1%8A%E5%8D%81%E5%A4%A7%E4%B8%AD%E6%96%87%E9%87%91%E6%9B%B2/12632953?fromModule=lemma_inlink)优秀流行国语歌曲银奖等奖项。 2013年5月17日,在上海[梅赛德斯-奔驰文化中心](https://baike.baidu.com/item/%E6%A2%85%E8%B5%9B%E5%BE%B7%E6%96%AF%EF%BC%8D%E5%A5%94%E9%A9%B0%E6%96%87%E5%8C%96%E4%B8%AD%E5%BF%83/12524895?fromModule=lemma_inlink)举行“魔天伦”世界巡回演唱会;5月22日,凭借专辑《12新作》入围[第24届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC24%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/4788862?fromModule=lemma_inlink)最佳国语专辑奖、最佳国语男歌手奖、最佳专辑制作人奖;6月1日,为动画电影《[十万个冷笑话](https://baike.baidu.com/item/%E5%8D%81%E4%B8%87%E4%B8%AA%E5%86%B7%E7%AC%91%E8%AF%9D/2883102?fromModule=lemma_inlink)》中的角色[太乙真人](https://baike.baidu.com/item/%E5%A4%AA%E4%B9%99%E7%9C%9F%E4%BA%BA/23686155?fromModule=lemma_inlink)配音;6月22日,在[成都市体育中心](https://baike.baidu.com/item/%E6%88%90%E9%83%BD%E5%B8%82%E4%BD%93%E8%82%B2%E4%B8%AD%E5%BF%83/4821286?fromModule=lemma_inlink)体育场举行演唱会;7月11日,自导自演的爱情片《[天台爱情](https://baike.baidu.com/item/%E5%A4%A9%E5%8F%B0%E7%88%B1%E6%83%85/3568321?fromModule=lemma_inlink)》上映 [344],该片还被选为[纽约亚洲电影节](https://baike.baidu.com/item/%E7%BA%BD%E7%BA%A6%E4%BA%9A%E6%B4%B2%E7%94%B5%E5%BD%B1%E8%8A%82/12609945?fromModule=lemma_inlink)闭幕影片 [99];9月6日至8日,在台北小巨蛋举行3场“魔天伦”演唱会 [58];10月4日,担任音乐爱情电影《[听见下雨的声音](https://baike.baidu.com/item/%E5%90%AC%E8%A7%81%E4%B8%8B%E9%9B%A8%E7%9A%84%E5%A3%B0%E9%9F%B3/7239472?fromModule=lemma_inlink)》的音乐总监 [100]。 2014年4月起,在悉尼、贵阳、上海、吉隆坡等地举行“魔天伦”世界巡回演唱会 [59];5月,位列福布斯中国名人榜第3名 [60];11月,在动作片《[惊天魔盗团2](https://baike.baidu.com/item/%E6%83%8A%E5%A4%A9%E9%AD%94%E7%9B%97%E5%9B%A22/9807509?fromModule=lemma_inlink)》中饰演魔术道具店的老板Li [101];12月10日,发行首张个人数字音乐专辑《[哎呦,不错哦](https://baike.baidu.com/item/%E5%93%8E%E5%91%A6%EF%BC%8C%E4%B8%8D%E9%94%99%E5%93%A6/9851748?fromModule=lemma_inlink)》 [295],成为首位发行数字音乐专辑的华人歌手 [61];该专辑发行后获得第二届[QQ音乐年度盛典](https://baike.baidu.com/item/QQ%E9%9F%B3%E4%B9%90%E5%B9%B4%E5%BA%A6%E7%9B%9B%E5%85%B8/13131216?fromModule=lemma_inlink)年度畅销数字专辑奖,专辑中的歌曲《[鞋子特大号](https://baike.baidu.com/item/%E9%9E%8B%E5%AD%90%E7%89%B9%E5%A4%A7%E5%8F%B7/16261949?fromModule=lemma_inlink)》获得第5届[全球流行音乐金榜](https://baike.baidu.com/item/%E5%85%A8%E7%90%83%E6%B5%81%E8%A1%8C%E9%9F%B3%E4%B9%90%E9%87%91%E6%A6%9C/3621354?fromModule=lemma_inlink)年度二十大金曲奖。 2015年4月,在[第19届全球华语榜中榜](https://baike.baidu.com/item/%E7%AC%AC19%E5%B1%8A%E5%85%A8%E7%90%83%E5%8D%8E%E8%AF%AD%E6%A6%9C%E4%B8%AD%E6%A6%9C/16913437?fromModule=lemma_inlink)暨亚洲影响力大典上获得亚洲影响力最受欢迎全能华语艺人奖、华语乐坛跨时代实力唱作人奖 [343];5月,在福布斯中国名人榜中排名第2位 [63];6月27日,凭借专辑《[哎呦,不错哦](https://baike.baidu.com/item/%E5%93%8E%E5%91%A6%EF%BC%8C%E4%B8%8D%E9%94%99%E5%93%A6/9851748?fromModule=lemma_inlink)》获得[第26届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC26%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/16997436?fromModule=lemma_inlink)最佳国语专辑奖、最佳专辑制作人奖两项提名;7月起,担任[浙江卫视](https://baike.baidu.com/item/%E6%B5%99%E6%B1%9F%E5%8D%AB%E8%A7%86/868580?fromModule=lemma_inlink)励志音乐评论节目《[中国好声音第四季](https://baike.baidu.com/item/%E4%B8%AD%E5%9B%BD%E5%A5%BD%E5%A3%B0%E9%9F%B3%E7%AC%AC%E5%9B%9B%E5%AD%A3/16040352?fromModule=lemma_inlink)》的导师 [62];9月26日,在[佛山世纪莲体育中心](https://baike.baidu.com/item/%E4%BD%9B%E5%B1%B1%E4%B8%96%E7%BA%AA%E8%8E%B2%E4%BD%93%E8%82%B2%E4%B8%AD%E5%BF%83/2393458?fromModule=lemma_inlink)体育场举行“魔天伦”演唱会;12月20日,在昆明拓东体育场举行“魔天伦”演唱会。 2016年3月,在[QQ音乐巅峰盛典](https://baike.baidu.com/item/QQ%E9%9F%B3%E4%B9%90%E5%B7%85%E5%B3%B0%E7%9B%9B%E5%85%B8/19430591?fromModule=lemma_inlink)上获得年度巅峰人气歌手奖、年度音乐全能艺人奖、年度最具影响力演唱会奖;3月24日,发行个人作词、作曲的单曲《[英雄](https://baike.baidu.com/item/%E8%8B%B1%E9%9B%84/19459565?fromModule=lemma_inlink)》,上线两周播放量突破8000万;6月1日,为电影《[惊天魔盗团2](https://baike.baidu.com/item/%E6%83%8A%E5%A4%A9%E9%AD%94%E7%9B%97%E5%9B%A22/9807509?fromModule=lemma_inlink)》创作的主题曲《[Now You See Me](https://baike.baidu.com/item/Now%20You%20See%20Me/19708831?fromModule=lemma_inlink)》发布 [64];6月24日,发行融合古典、摇滚、嘻哈等曲风的数字音乐专辑《[周杰伦的床边故事](https://baike.baidu.com/item/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E5%BA%8A%E8%BE%B9%E6%95%85%E4%BA%8B/19711456?fromModule=lemma_inlink)》 [65] [300],该专辑发行两日销量突破100万张,打破数字专辑在中国内地的销售纪录 [66],专辑在大中华地区的累计销量突破200万张,销售额超过4000万元 [67];6月,参演的好莱坞电影《[惊天魔盗团2](https://baike.baidu.com/item/%E6%83%8A%E5%A4%A9%E9%AD%94%E7%9B%97%E5%9B%A22/9807509?fromModule=lemma_inlink)》在中国内地上映;7月15日起,担任浙江卫视音乐评论节目《[中国新歌声第一季](https://baike.baidu.com/item/%E4%B8%AD%E5%9B%BD%E6%96%B0%E6%AD%8C%E5%A3%B0%E7%AC%AC%E4%B8%80%E5%AD%A3/19837166?fromModule=lemma_inlink)》的导师 [68];12月23日起,由周杰伦自编自导的文艺片《不能说的秘密》而改编的同名音乐剧《[不能说的秘密](https://baike.baidu.com/item/%E4%B8%8D%E8%83%BD%E8%AF%B4%E7%9A%84%E7%A7%98%E5%AF%86/19661975?fromModule=lemma_inlink)》在[北京天桥艺术中心](https://baike.baidu.com/item/%E5%8C%97%E4%BA%AC%E5%A4%A9%E6%A1%A5%E8%89%BA%E6%9C%AF%E4%B8%AD%E5%BF%83/17657501?fromModule=lemma_inlink)举行全球首演,该音乐剧的作曲、作词、原著故事均由周杰伦完成 [102-103];同年,在上海、北京、青岛、郑州、常州等地举行[周杰伦“地表最强”世界巡回演唱会](https://baike.baidu.com/item/%E5%91%A8%E6%9D%B0%E4%BC%A6%E2%80%9C%E5%9C%B0%E8%A1%A8%E6%9C%80%E5%BC%BA%E2%80%9D%E4%B8%96%E7%95%8C%E5%B7%A1%E5%9B%9E%E6%BC%94%E5%94%B1%E4%BC%9A/53069809?fromModule=lemma_inlink)。 ![](https://intranetproxy.alipay.com/skylark/lark/0/2024/jpeg/358/1716184907937-4e820a4b-34a1-44bb-9e3d-b292f3558415.jpeg) 2017年1月6日,周杰伦监制的爱情电影《[一万公里的约定](https://baike.baidu.com/item/%E4%B8%80%E4%B8%87%E5%85%AC%E9%87%8C%E7%9A%84%E7%BA%A6%E5%AE%9A/17561190?fromModule=lemma_inlink)》在中国内地上映 [104];1月13日,在江苏卫视推出的科学类真人秀节目《[最强大脑第四季](https://baike.baidu.com/item/%E6%9C%80%E5%BC%BA%E5%A4%A7%E8%84%91%E7%AC%AC%E5%9B%9B%E5%AD%A3/19450808?fromModule=lemma_inlink)》中担任嘉宾 [69];4月15日至16日,在昆明拓东体育场举办两场个人演唱会,其后在重庆、南京、沈阳、厦门等地举行“地表最强”世界巡回演唱会 [70];5月16日,凭借歌曲《[告白气球](https://baike.baidu.com/item/%E5%91%8A%E7%99%BD%E6%B0%94%E7%90%83/19713859?fromModule=lemma_inlink)》《[床边故事](https://baike.baidu.com/item/%E5%BA%8A%E8%BE%B9%E6%95%85%E4%BA%8B/19710370?fromModule=lemma_inlink)》、专辑《周杰伦的床边故事》分别入围[第28届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC28%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/20804578?fromModule=lemma_inlink)最佳年度歌曲奖、最佳音乐录影带奖、最佳国语男歌手奖 [235];6月4日,获得Hito年度最佳男歌手奖;随后,参加原创专业音乐节目《[中国新歌声第二季](https://baike.baidu.com/item/%E4%B8%AD%E5%9B%BD%E6%96%B0%E6%AD%8C%E5%A3%B0%E7%AC%AC%E4%BA%8C%E5%AD%A3/20128840?fromModule=lemma_inlink)》并担任导师 [71];8月9日,其发行的音乐专辑《周杰伦的床边故事》获得[华语金曲奖](https://baike.baidu.com/item/%E5%8D%8E%E8%AF%AD%E9%87%91%E6%9B%B2%E5%A5%96/2477095?fromModule=lemma_inlink)年度最佳国语专辑奖 [72]。 2018年1月6日,在新加坡举行“地表最强2”世界巡回演唱会的首场演出 [73];1月18日,发行由其个人作词、作曲的音乐单曲《[等你下课](https://baike.baidu.com/item/%E7%AD%89%E4%BD%A0%E4%B8%8B%E8%AF%BE/22344815?fromModule=lemma_inlink)》 [250],该曲由周杰伦与[杨瑞代](https://baike.baidu.com/item/%E6%9D%A8%E7%91%9E%E4%BB%A3/1538482?fromModule=lemma_inlink)共同演唱 [74];2月15日,在[2018年中央电视台春节联欢晚会](https://baike.baidu.com/item/2018%E5%B9%B4%E4%B8%AD%E5%A4%AE%E7%94%B5%E8%A7%86%E5%8F%B0%E6%98%A5%E8%8A%82%E8%81%94%E6%AC%A2%E6%99%9A%E4%BC%9A/20848218?fromModule=lemma_inlink)上与[蔡威泽](https://baike.baidu.com/item/%E8%94%A1%E5%A8%81%E6%B3%BD/20863889?fromModule=lemma_inlink)合作表演魔术与歌曲《[告白气球](https://baike.baidu.com/item/%E5%91%8A%E7%99%BD%E6%B0%94%E7%90%83/22388056?fromModule=lemma_inlink)》,该节目在2018年央视春晚节目收视率TOP10榜单中位列第一位 [75-76];5月15日,发行个人创作的音乐单曲《[不爱我就拉倒](https://baike.baidu.com/item/%E4%B8%8D%E7%88%B1%E6%88%91%E5%B0%B1%E6%8B%89%E5%80%92/22490709?fromModule=lemma_inlink)》 [77] [346];11月21日,加盟由[D·J·卡卢索](https://baike.baidu.com/item/D%C2%B7J%C2%B7%E5%8D%A1%E5%8D%A2%E7%B4%A2/16013808?fromModule=lemma_inlink)执导的电影《[极限特工4](https://baike.baidu.com/item/%E6%9E%81%E9%99%90%E7%89%B9%E5%B7%A54/20901306?fromModule=lemma_inlink)》 [105]。 2019年2月9日,在美国拉斯维加斯举行个人演唱会 [78];7月24日,宣布“嘉年华”世界巡回演唱会于10月启动 [79],该演唱会是周杰伦庆祝出道20周年的演唱会 [80];9月16日,发行与[陈信宏](https://baike.baidu.com/item/%E9%99%88%E4%BF%A1%E5%AE%8F/334?fromModule=lemma_inlink)共同演唱的音乐单曲《[说好不哭](https://baike.baidu.com/item/%E8%AF%B4%E5%A5%BD%E4%B8%8D%E5%93%AD/23748447?fromModule=lemma_inlink)》 [355],该曲由[方文山](https://baike.baidu.com/item/%E6%96%B9%E6%96%87%E5%B1%B1/135622?fromModule=lemma_inlink)作词 [81];10月17日,在上海举行[周杰伦“嘉年华”世界巡回演唱会](https://baike.baidu.com/item/%E5%91%A8%E6%9D%B0%E4%BC%A6%E2%80%9C%E5%98%89%E5%B9%B4%E5%8D%8E%E2%80%9D%E4%B8%96%E7%95%8C%E5%B7%A1%E5%9B%9E%E6%BC%94%E5%94%B1%E4%BC%9A/62969657?fromModule=lemma_inlink)的首场演出 [80];11月1日,发行“地表最强”世界巡回演唱会Live专辑 [82];12月15日,周杰伦为电影《[天·火](https://baike.baidu.com/item/%E5%A4%A9%C2%B7%E7%81%AB/23375274?fromModule=lemma_inlink)》献唱的主题曲《[我是如此相信](https://baike.baidu.com/item/%E6%88%91%E6%98%AF%E5%A6%82%E6%AD%A4%E7%9B%B8%E4%BF%A1/24194094?fromModule=lemma_inlink)》发行 [84]。 2020年1月10日至11日,在[新加坡国家体育场](https://baike.baidu.com/item/%E6%96%B0%E5%8A%A0%E5%9D%A1%E5%9B%BD%E5%AE%B6%E4%BD%93%E8%82%B2%E5%9C%BA/8820507?fromModule=lemma_inlink)举行两场“嘉年华”世界巡回演唱会 [85];3月21日,在浙江卫视全球户外生活文化实境秀节目《[周游记](https://baike.baidu.com/item/%E5%91%A8%E6%B8%B8%E8%AE%B0/22427755?fromModule=lemma_inlink)》中担任发起人 [86];6月12日,发行个人音乐单曲《[Mojito](https://baike.baidu.com/item/Mojito/50474451?fromModule=lemma_inlink)》 [88] [249];5月29日,周杰伦首个中文社交媒体在快手开通 [267];7月26日,周杰伦在快手进行了直播首秀,半小时内直播观看人次破6800万 [268];10月,监制并特别出演赛车题材电影《[叱咤风云](https://baike.baidu.com/item/%E5%8F%B1%E5%92%A4%E9%A3%8E%E4%BA%91/22756550?fromModule=lemma_inlink)》 [106-107]。 2021年1月29日,获得[中国歌曲TOP排行榜](https://baike.baidu.com/item/%E4%B8%AD%E5%9B%BD%E6%AD%8C%E6%9B%B2TOP%E6%8E%92%E8%A1%8C%E6%A6%9C/53567645?fromModule=lemma_inlink)最佳男歌手奖;2月12日,以“云录制”形式在[2021年中央广播电视总台春节联欢晚会](https://baike.baidu.com/item/2021%E5%B9%B4%E4%B8%AD%E5%A4%AE%E5%B9%BF%E6%92%AD%E7%94%B5%E8%A7%86%E6%80%BB%E5%8F%B0%E6%98%A5%E8%8A%82%E8%81%94%E6%AC%A2%E6%99%9A%E4%BC%9A/23312983?fromModule=lemma_inlink)演唱歌曲《Mojito》 [89];2月12日,周杰伦“既来之,则乐之”唱聊会在快手上线 [269];5月12日,凭借单曲《Mojito》入围[第32届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC32%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/56977769?fromModule=lemma_inlink)最佳单曲制作人奖 [240]。 2022年5月20日至21日,周杰伦“奇迹现场重映计划”线上视频演唱会开始播出 [259];7月6日,音乐专辑《[最伟大的作品](https://baike.baidu.com/item/%E6%9C%80%E4%BC%9F%E5%A4%A7%E7%9A%84%E4%BD%9C%E5%93%81/61539892?fromModule=lemma_inlink)》在QQ音乐的预约量超过568万人 [263];7月6日,音乐专辑《最伟大的作品》同名先行曲的MV在网络平台播出 [262] [264];7月8日,专辑《最伟大的作品》开始预售 [265],8小时内在QQ音乐、[咪咕音乐](https://baike.baidu.com/item/%E5%92%AA%E5%92%95%E9%9F%B3%E4%B9%90/4539596?fromModule=lemma_inlink)等平台的预售额超过三千万元 [266];7月15日,周杰伦正式发行个人第15张音乐专辑《[最伟大的作品](https://baike.baidu.com/item/%E6%9C%80%E4%BC%9F%E5%A4%A7%E7%9A%84%E4%BD%9C%E5%93%81/61539892?fromModule=lemma_inlink)》 [261],专辑上线后一小时的总销售额超过1亿 [270];截至17时,该专辑在四大音乐平台总销量突破500万张,销售额超过1.5亿元 [272];7月18日,周杰伦在快手开启独家直播,直播间累计观看人数1.1亿,最高实时在线观看人数超654万 [273];9月,参加2022联盟嘉年华 [274];11月19日,周杰伦通过快手平台直播线上“哥友会” [277-278] [280],这也是他首次以线上的方式举办歌友会 [276];他在直播中演唱了《[还在流浪](https://baike.baidu.com/item/%E8%BF%98%E5%9C%A8%E6%B5%81%E6%B5%AA/61707897?fromModule=lemma_inlink)》《[半岛铁盒](https://baike.baidu.com/item/%E5%8D%8A%E5%B2%9B%E9%93%81%E7%9B%92/2268287?fromModule=lemma_inlink)》等5首歌曲 [279];12月16日,周杰伦参加动感地带世界杯音乐盛典,并在现场演唱了歌曲《我是如此相信》以及《[安静](https://baike.baidu.com/item/%E5%AE%89%E9%9D%99/2940419?fromModule=lemma_inlink)》 [282] [284]。 2023年3月,周杰伦发行的音乐专辑《[最伟大的作品](https://baike.baidu.com/item/%E6%9C%80%E4%BC%9F%E5%A4%A7%E7%9A%84%E4%BD%9C%E5%93%81/61539892?fromModule=lemma_inlink)》获得[国际唱片业协会](https://baike.baidu.com/item/%E5%9B%BD%E9%99%85%E5%94%B1%E7%89%87%E4%B8%9A%E5%8D%8F%E4%BC%9A/1486316?fromModule=lemma_inlink)(IFPI)发布的“2022年全球畅销专辑榜”冠军,成为首位获得该榜冠军的华语歌手 [287];5月16日,其演唱的歌曲《[最伟大的作品](https://baike.baidu.com/item/%E6%9C%80%E4%BC%9F%E5%A4%A7%E7%9A%84%E4%BD%9C%E5%93%81/61702109?fromModule=lemma_inlink)》获得[第34届台湾金曲奖](https://baike.baidu.com/item/%E7%AC%AC34%E5%B1%8A%E5%8F%B0%E6%B9%BE%E9%87%91%E6%9B%B2%E5%A5%96/62736300?fromModule=lemma_inlink)年度歌曲奖提名 [288];8月17日-20日,在呼和浩特市举行嘉年华世界巡回演唱会 [349];11月25日,参加的户外实境互动综艺节目《[周游记2](https://baike.baidu.com/item/%E5%91%A8%E6%B8%B8%E8%AE%B02/53845056?fromModule=lemma_inlink)》在浙江卫视播出 [312];12月6日,[环球音乐集团](https://baike.baidu.com/item/%E7%8E%AF%E7%90%83%E9%9F%B3%E4%B9%90%E9%9B%86%E5%9B%A2/1964357?fromModule=lemma_inlink)与周杰伦及其经纪公司“杰威尔音乐”达成战略合作伙伴关系 [318];12月9日,在泰国曼谷[拉加曼加拉国家体育场](https://baike.baidu.com/item/%E6%8B%89%E5%8A%A0%E6%9B%BC%E5%8A%A0%E6%8B%89%E5%9B%BD%E5%AE%B6%E4%BD%93%E8%82%B2%E5%9C%BA/6136556?fromModule=lemma_inlink)举行“嘉年华”世界巡回演唱会 [324];12月21日,发行音乐单曲《[圣诞星](https://baike.baidu.com/item/%E5%9C%A3%E8%AF%9E%E6%98%9F/63869869?fromModule=lemma_inlink)》 [345]。2024年4月,由坚果工作室制片的说唱真人秀综艺《说唱梦工厂》在北京举行媒体探班活动,其中主要嘉宾有周杰伦。 [356]5月23日,参演的综艺《说唱梦工厂》播出。 [358] ## 1.3、个人经历 ### 1.3.1、家庭情况 周杰伦的父亲[周耀中](https://baike.baidu.com/item/%E5%91%A8%E8%80%80%E4%B8%AD/4326853?fromModule=lemma_inlink)是淡江中学的生物老师 [123],母亲[叶惠美](https://baike.baidu.com/item/%E5%8F%B6%E6%83%A0%E7%BE%8E/2325933?fromModule=lemma_inlink)是淡江中学的美术老师。周杰伦跟母亲之间的关系就像弟弟跟姐姐。他也多次写歌给母亲,比如《[听妈妈的话](https://baike.baidu.com/item/%E5%90%AC%E5%A6%88%E5%A6%88%E7%9A%84%E8%AF%9D/79604?fromModule=lemma_inlink)》,甚至还把母亲的名字“叶惠美”作为专辑的名称。由于父母离异,因此周杰伦很少提及父亲周耀中,后来在母亲和外婆[叶詹阿妹](https://baike.baidu.com/item/%E5%8F%B6%E8%A9%B9%E9%98%BF%E5%A6%B9/926323?fromModule=lemma_inlink)的劝导下,他重新接纳了父亲。 ### 1.3.2、感情生活 2004年底,周杰伦与[侯佩岑](https://baike.baidu.com/item/%E4%BE%AF%E4%BD%A9%E5%B2%91/257126?fromModule=lemma_inlink)相恋。2005年,两人公开承认恋情。2006年5月,两人分手 [237-238]。 2014年11月17日,周杰伦公开与[昆凌](https://baike.baidu.com/item/%E6%98%86%E5%87%8C/1545451?fromModule=lemma_inlink)的恋情 [124]。2015年1月17日,周杰伦与昆凌在英国举行婚礼 [125];2月9日,周杰伦与昆凌在台北举行泳池户外婚宴;3月9日,周杰伦与昆凌在澳大利亚举办家庭婚礼 [126];7月10日,周杰伦与昆凌的女儿[Hathaway](https://baike.baidu.com/item/Hathaway/18718544?fromModule=lemma_inlink)出生 [127-128]。2017年2月13日,周杰伦宣布妻子怀二胎 [129];6月8日,周杰伦与昆凌的儿子[Romeo](https://baike.baidu.com/item/Romeo/22180208?fromModule=lemma_inlink)出生 [130]。2022年1月19日,周杰伦宣布妻子昆凌怀三胎 [256];4月22日,昆凌表示第三胎是女儿 [258];5月6日,周杰伦的女儿[Jacinda](https://baike.baidu.com/item/Jacinda/61280507?fromModule=lemma_inlink)出生 [281]。 ## 1.4、主要作品 ### 1.4.1、音乐单曲 | **<font style="color:rgb(51, 51, 51);">歌曲名称</font>** | **<font style="color:rgb(51, 51, 51);">发行时间</font>** | **<font style="color:rgb(51, 51, 51);">歌曲简介</font>** | |--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [<sup>圣诞星</sup>](https://baike.baidu.com/item/%E5%9C%A3%E8%AF%9E%E6%98%9F/63869869?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2023-12-21</font> | <font style="color:rgb(51, 51, 51);">-</font> | | [Mojito](https://baike.baidu.com/item/Mojito/50474451?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2020-6-12</font> | <font style="color:rgb(51, 51, 51);">单曲</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[131]</font></sup> | | [我是如此相信](https://baike.baidu.com/item/%E6%88%91%E6%98%AF%E5%A6%82%E6%AD%A4%E7%9B%B8%E4%BF%A1/24194094?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2019-12-15</font> | <font style="color:rgb(51, 51, 51);">电影《天火》主题曲</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[83]</font></sup> | | [说好不哭](https://baike.baidu.com/item/%E8%AF%B4%E5%A5%BD%E4%B8%8D%E5%93%AD/23748447?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2019-09-16</font> | <font style="color:rgb(51, 51, 51);">with 五月天阿信</font> | | [不爱我就拉倒](https://baike.baidu.com/item/%E4%B8%8D%E7%88%B1%E6%88%91%E5%B0%B1%E6%8B%89%E5%80%92/22490709?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2018-05-15</font> | <font style="color:rgb(51, 51, 51);">-</font> | | [等你下课](https://baike.baidu.com/item/%E7%AD%89%E4%BD%A0%E4%B8%8B%E8%AF%BE/22344815?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2018-01-18</font> | <font style="color:rgb(51, 51, 51);">杨瑞代参与演唱</font> | | [英雄](https://baike.baidu.com/item/%E8%8B%B1%E9%9B%84/19459565?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2016-03-24</font> | <font style="color:rgb(51, 51, 51);">《英雄联盟》游戏主题曲</font> | | [Try](https://baike.baidu.com/item/Try/19208892?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2016-01-06</font> | <font style="color:rgb(51, 51, 51);">与派伟俊合唱,电影《功夫熊猫3》主题曲</font> | | [婚礼曲](https://baike.baidu.com/item/%E5%A9%9A%E7%A4%BC%E6%9B%B2/22913856?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2015</font> | <font style="color:rgb(51, 51, 51);">纯音乐</font> | | [夜店咖](https://baike.baidu.com/item/%E5%A4%9C%E5%BA%97%E5%92%96/16182672?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2014-11-25</font> | <font style="color:rgb(51, 51, 51);">与嘻游记合唱</font> | ### 1.4.2、为他人创作 | <font style="color:rgb(51, 51, 51);">歌曲名称</font> | <font style="color:rgb(51, 51, 51);">职能</font> | <font style="color:rgb(51, 51, 51);">演唱者</font> | <font style="color:rgb(51, 51, 51);">所属专辑</font> | <font style="color:rgb(51, 51, 51);">发行时间</font> | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|--------------------------------------------------------| | [<sup>AMIGO</sup>](https://baike.baidu.com/item/AMIGO/62130287?fromModule=lemma_inlink)<br/><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[275]</font></sup> | <font style="color:rgb(51, 51, 51);">作曲</font> | <font style="color:rgb(51, 51, 51);">玖壹壹</font> | <font style="color:rgb(51, 51, 51);">-</font> | <font style="color:rgb(51, 51, 51);">2022-10-25</font> | | [叱咤风云](https://baike.baidu.com/item/%E5%8F%B1%E5%92%A4%E9%A3%8E%E4%BA%91/55751566?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲、电吉他演奏</font> | <font style="color:rgb(51, 51, 51);">范逸臣、柯有伦</font> | <font style="color:rgb(51, 51, 51);">-</font> | <font style="color:rgb(51, 51, 51);">2021-1-10</font> | | [等风雨经过](https://baike.baidu.com/item/%E7%AD%89%E9%A3%8E%E9%9B%A8%E7%BB%8F%E8%BF%87/24436567?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲</font> | <font style="color:rgb(51, 51, 51);">张学友</font> | <font style="color:rgb(51, 51, 51);">-</font> | <font style="color:rgb(51, 51, 51);">2020-2-23</font> | | [一路上小心](https://baike.baidu.com/item/%E4%B8%80%E8%B7%AF%E4%B8%8A%E5%B0%8F%E5%BF%83/9221406?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲</font> | <font style="color:rgb(51, 51, 51);">吴宗宪</font> | <font style="color:rgb(51, 51, 51);">-</font> | <font style="color:rgb(51, 51, 51);">2019-05-17</font> | | [谢谢一辈子](https://baike.baidu.com/item/%E8%B0%A2%E8%B0%A2%E4%B8%80%E8%BE%88%E5%AD%90/22823424?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲</font> | <font style="color:rgb(51, 51, 51);">成龙</font> | [我还是成龙](https://baike.baidu.com/item/%E6%88%91%E8%BF%98%E6%98%AF%E6%88%90%E9%BE%99/0?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2018-12-20</font> | | [连名带姓](https://baike.baidu.com/item/%E8%BF%9E%E5%90%8D%E5%B8%A6%E5%A7%93/22238578?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲</font> | [张惠妹](https://baike.baidu.com/item/%E5%BC%A0%E6%83%A0%E5%A6%B9/234310?fromModule=lemma_inlink) | [偷故事的人](https://baike.baidu.com/item/%E5%81%B7%E6%95%85%E4%BA%8B%E7%9A%84%E4%BA%BA/0?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2017-12-12</font> | | [时光之墟](https://baike.baidu.com/item/%E6%97%B6%E5%85%89%E4%B9%8B%E5%A2%9F/22093813?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲</font> | [许魏洲](https://baike.baidu.com/item/%E8%AE%B8%E9%AD%8F%E6%B4%B2/18762132?fromModule=lemma_inlink) | [时光之墟](https://baike.baidu.com/item/%E6%97%B6%E5%85%89%E4%B9%8B%E5%A2%9F/0?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2017-08-25</font> | | [超猛](https://baike.baidu.com/item/%E8%B6%85%E7%8C%9B/19543891?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲</font> | <font style="color:rgb(51, 51, 51);">草蜢、MATZKA</font> | [Music Walker](https://baike.baidu.com/item/Music%20Walker/0?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2016-04-22</font> | | [东山再起](https://baike.baidu.com/item/%E4%B8%9C%E5%B1%B1%E5%86%8D%E8%B5%B7/19208906?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲</font> | [南拳妈妈](https://baike.baidu.com/item/%E5%8D%97%E6%8B%B3%E5%A6%88%E5%A6%88/167625?fromModule=lemma_inlink) | [拳新出击](https://baike.baidu.com/item/%E6%8B%B3%E6%96%B0%E5%87%BA%E5%87%BB/19662007?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2016-04-20</font> | | [剩下的盛夏](https://baike.baidu.com/item/%E5%89%A9%E4%B8%8B%E7%9A%84%E7%9B%9B%E5%A4%8F/18534130?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">作曲</font> | <font style="color:rgb(51, 51, 51);">TFBOYS、嘻游记</font> | [大梦想家](https://baike.baidu.com/item/%E5%A4%A7%E6%A2%A6%E6%83%B3%E5%AE%B6/0?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">2015-08-28</font> | ### 1.4.3、演唱会记录 | **<font style="color:rgb(51, 51, 51);">举办时间</font>** | **<font style="color:rgb(51, 51, 51);">演唱会名称</font>** | **<font style="color:rgb(51, 51, 51);">总场次</font>** | |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------| | <font style="color:rgb(51, 51, 51);">2019-10-17</font> | <font style="color:rgb(51, 51, 51);">嘉年华世界巡回演唱会</font> | | | <font style="color:rgb(51, 51, 51);">2016-6-30 至 2019-5</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[142]</font></sup> | [周杰伦“地表最强”世界巡回演唱会](https://baike.baidu.com/item/%E5%91%A8%E6%9D%B0%E4%BC%A6%E2%80%9C%E5%9C%B0%E8%A1%A8%E6%9C%80%E5%BC%BA%E2%80%9D%E4%B8%96%E7%95%8C%E5%B7%A1%E5%9B%9E%E6%BC%94%E5%94%B1%E4%BC%9A/53069809?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">120 场</font> | | <font style="color:rgb(51, 51, 51);">2013-5-17 至 2015-12-20</font> | [魔天伦世界巡回演唱会](https://baike.baidu.com/item/%E9%AD%94%E5%A4%A9%E4%BC%A6%E4%B8%96%E7%95%8C%E5%B7%A1%E5%9B%9E%E6%BC%94%E5%94%B1%E4%BC%9A/24146025?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">76 场</font> | | <font style="color:rgb(51, 51, 51);">2010-6-11 至 2011-12-18</font> | [周杰伦2010超时代世界巡回演唱会](https://baike.baidu.com/item/%E5%91%A8%E6%9D%B0%E4%BC%A62010%E8%B6%85%E6%97%B6%E4%BB%A3%E4%B8%96%E7%95%8C%E5%B7%A1%E5%9B%9E%E6%BC%94%E5%94%B1%E4%BC%9A/3238718?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">46 场</font> | | <font style="color:rgb(51, 51, 51);">2007-11-10 至 2009-8-28</font> | [2007世界巡回演唱会](https://baike.baidu.com/item/2007%E4%B8%96%E7%95%8C%E5%B7%A1%E5%9B%9E%E6%BC%94%E5%94%B1%E4%BC%9A/12678549?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">42 场</font> | | <font style="color:rgb(51, 51, 51);">2004-10-2 至 2006-2-6</font> | [无与伦比演唱会](https://baike.baidu.com/item/%E6%97%A0%E4%B8%8E%E4%BC%A6%E6%AF%94%E6%BC%94%E5%94%B1%E4%BC%9A/1655166?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">24 场</font> | | <font style="color:rgb(51, 51, 51);">2002-9-28 至 2004-1-3</font> | [THEONE演唱会](https://baike.baidu.com/item/THEONE%E6%BC%94%E5%94%B1%E4%BC%9A/1543469?fromModule=lemma_inlink) | <font style="color:rgb(51, 51, 51);">16 场</font> | | <font style="color:rgb(51, 51, 51);">2001-11-3 至 2002-2-10</font> | <font style="color:rgb(51, 51, 51);">范特西演唱会</font> | <font style="color:rgb(51, 51, 51);">5 场</font> | ## 1.5、社会活动 ### 1.5.1、担任大使 | **<font style="color:rgb(51, 51, 51);">时间</font>** | **<font style="color:rgb(51, 51, 51);">名称</font>** | |:---------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <font style="color:rgb(51, 51, 51);">2005年</font> | <font style="color:rgb(51, 51, 51);">环保大使</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[165]</font></sup> | | <font style="color:rgb(51, 51, 51);">2010年</font> | <font style="color:rgb(51, 51, 51);">校园拒烟大使</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[190]</font></sup> | | <font style="color:rgb(51, 51, 51);">2011年</font> | <font style="color:rgb(51, 51, 51);">河南青年创业形象大使</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[191]</font></sup> | | <font style="color:rgb(51, 51, 51);">2013年</font> | <font style="color:rgb(51, 51, 51);">蒲公英梦想大使</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[192]</font></sup> | | <font style="color:rgb(51, 51, 51);">2014年</font> | <font style="color:rgb(51, 51, 51);">中国禁毒宣传形象大使</font> | | | <font style="color:rgb(51, 51, 51);">观澜湖世界明星赛的推广大使</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[193]</font></sup> | | <font style="color:rgb(51, 51, 51);">2016年</font> | <font style="color:rgb(51, 51, 51);">国际野生救援野生救援全球大使</font><sup><font style="color:rgb(51, 102, 204);"> </font></sup><sup><font style="color:rgb(51, 102, 204);">[194]</font></sup> |
{ "source": "OpenSPG/KAG", "title": "tests/unit/builder/data/test_markdown.md", "url": "https://github.com/OpenSPG/KAG/blob/master/tests/unit/builder/data/test_markdown.md", "date": "2024-09-21T13:56:44", "stars": 5456, "description": "KAG is a logical form-guided reasoning and retrieval framework based on OpenSPG engine and LLMs. It is used to build logical reasoning and factual Q&A solutions for professional domain knowledge bases. It can effectively overcome the shortcomings of the traditional RAG vector similarity calculation model.", "file_size": 59840 }
角色信息表:[aml.adm_cust_role_dd](https://www.baidu.com/assets/catalog/detail/table/adm_cust_role_dd/info) <a name="nSOL0"></a> ### 背景 此表为解释一个客户的ip_id (即cust_id,3333开头)会对应多个ip_role_id (即role_id,也是3333开头)。其实业务上理解,就是一个客户开户后,对应不同业务场景会生成不同的角色ID,比如又有结算户又有云资金商户,就会有个人role 以及商户role,两个role类型不一样,角色id也都不一样。 <a name="kpInt"></a> ### 关键字段说明 <a name="BLpPo"></a> #### role_id 角色ID 同样是3333开头,但是它对应cust_id的关系是多对一,即一个客户会有多个role_id <a name="AMs5V"></a> #### role_type 角色类型 角色类型主要分为会员、商户、被关联角色等,主要使用的还是会员和商户;<br />对应描述在字段 role_type_desc中储存。 <a name="JHlTP"></a> #### cust_id 客户ID 与role_id 是一对多的关系。 <a name="h5769"></a> #### enable_status 可用状态 此字段对应的可用/禁用状态,是对应描述的role_id 的可用/禁用状态;<br />对应描述在字段 enable_status_desc中储存。<br />*同时在客户维度上,也有此客户cust_id是可用/禁用状态,不在此表中,且两者并不相关,选择需要查看的维度对应选择字段。 <a name="BhYXU"></a> #### reg_from 角色注册来源 标注了客户的注册来源,使用较少,reg_from_desc为空。 <a name="q14I4"></a> #### lifecycle_status 角色生命周期 标注了客户角色的生命周期,使用较少,lifecycle_status_desc为空。
{ "source": "OpenSPG/KAG", "title": "tests/unit/builder/data/角色信息表说明.md", "url": "https://github.com/OpenSPG/KAG/blob/master/tests/unit/builder/data/角色信息表说明.md", "date": "2024-09-21T13:56:44", "stars": 5456, "description": "KAG is a logical form-guided reasoning and retrieval framework based on OpenSPG engine and LLMs. It is used to build logical reasoning and factual Q&A solutions for professional domain knowledge bases. It can effectively overcome the shortcomings of the traditional RAG vector similarity calculation model.", "file_size": 947 }
# Introduction to Data of Enterprise Supply Chain [English](./README.md) | [简体中文](./README_cn.md) ## 1. Directory Structure ```text supplychain ├── builder │ ├── data │ │ ├── Company.csv │ │ ├── CompanyUpdate.csv │ │ ├── Company_fundTrans_Company.csv │ │ ├── Index.csv │ │ ├── Industry.csv │ │ ├── Person.csv │ │ ├── Product.csv │ │ ├── ProductChainEvent.csv │ │ ├── TaxOfCompanyEvent.csv │ │ ├── TaxOfProdEvent.csv │ │ └── Trend.csv ``` We will introduce the tables by sampling some rows from each one. ## 2. The company instances (Company.csv) ```text id,name,products CSF0000002238,三角*胎股*限公司,"轮胎,全钢子午线轮胎" ``` * ``id``: The unique id of the company * ``name``: Name of the company * ``products``: Products produced by the company, separated by commas ## 3. Fund transferring between companies (Company_fundTrans_Company.csv) ```text src,dst,transDate,transAmt CSF0000002227,CSF0000001579,20230506,73 ``` * ``src``: The source of the fund transfer * ``dst``: The destination of the fund transfer * ``transDate``: The date of the fund transfer * ``transAmt``: The total amount of the fund transfer ## 4. The Person instances (Person.csv) ```text id,name,age,legalRep 0,路**,63,"新疆*花*股*限公司,三角*胎股*限公司,传化*联*份限公司" ``` * ``id``: The unique id of the person * ``name``: Name of the person * ``age``: Age of the person * ``legalRep``: Company list with the person as the legal representative, separated by commas ## 5. The industry concepts (Industry.csv) ```text fullname 能源 能源-能源 能源-能源-能源设备与服务 能源-能源-能源设备与服务-能源设备与服务 能源-能源-石油、天然气与消费用燃料 ``` The industry chain concepts is represented by its name, with dashes indicating its higher-level concepts. For example, the higher-level concept of "能源-能源-能源设备与服务" is "能源-能源", and the higher-level concept of "能源-能源-能源设备与服务-能源设备与服务" is "能源-能源-能源设备与服务". ## 6. The product concepts (Product.csv) ```text fullname,belongToIndustry,hasSupplyChain 商品化工-橡胶-合成橡胶-顺丁橡胶,原材料-原材料-化学制品-商品化工,"化工商品贸易-化工产品贸易-橡塑制品贸易,轮胎与橡胶-轮胎,轮胎与橡胶-轮胎-特种轮胎,轮胎与橡胶-轮胎-工程轮胎,轮胎与橡胶-轮胎-斜交轮胎,轮胎与橡胶-轮胎-全钢子午线轮胎,轮胎与橡胶-轮胎-半钢子午线轮胎" ``` * ``fullname``: The name of the product, with dashes indicating its higher-level concepts. * ``belongToIndustry``: The industry which the product belongs to. For example, in this case, "顺丁橡胶" belongs to "商品化工". * ``hasSupplyChain``: The downstream industries related to the product, separated by commas. For example, the downstream industries of "顺丁橡胶" may include "橡塑制品贸易", "轮胎", and so on. ## 7. The industry chain events (ProductChainEvent.csv) ```text id,name,subject,index,trend 1,顺丁橡胶成本上涨,商品化工-橡胶-合成橡胶-顺丁橡胶,价格,上涨 ``` * ``id``: The ID of the event * ``name``: The name of the event * ``subject``: The subject of the event. In this example, it is "顺丁橡胶". * ``index``: The index related to the event. In this example, it is "价格" (price). * ``trend``: The trend of the event. In this example, it is "上涨" (rising). ## 8. The index concepts (Index.csv) and the trend concepts (Trend.csv) Index and trend are atomic conceptual categories that can be combined to form industrial chain events and company events. * index: The index related to the event, with possible values of "价格" (price), "成本" (cost) or "利润" (profit). * trend: The trend of the event, with possible values of "上涨" (rising) or "下跌" (falling). ## 9 The event categorization (TaxOfProdEvent.csv, TaxOfCompanyEvent.csv) Event classification includes industrial chain event classification and company event classification with the following data: * Industrial chain event classification: "价格上涨" (price rising). * Company event classification: "成本上涨" (cost rising), "利润下跌" (profit falling).
{ "source": "OpenSPG/KAG", "title": "kag/examples/supplychain/builder/data/README.md", "url": "https://github.com/OpenSPG/KAG/blob/master/kag/examples/supplychain/builder/data/README.md", "date": "2024-09-21T13:56:44", "stars": 5456, "description": "KAG is a logical form-guided reasoning and retrieval framework based on OpenSPG engine and LLMs. It is used to build logical reasoning and factual Q&A solutions for professional domain knowledge bases. It can effectively overcome the shortcomings of the traditional RAG vector similarity calculation model.", "file_size": 3647 }
# 产业链案例数据介绍 [English](./README.md) | [简体中文](./README_cn.md) ## 1. 数据目录 ```text supplychain ├── builder │ ├── data │ │ ├── Company.csv │ │ ├── CompanyUpdate.csv │ │ ├── Company_fundTrans_Company.csv │ │ ├── Index.csv │ │ ├── Industry.csv │ │ ├── Person.csv │ │ ├── Product.csv │ │ ├── ProductChainEvent.csv │ │ ├── TaxOfCompanyEvent.csv │ │ ├── TaxOfProdEvent.csv │ │ └── Trend.csv ``` 分别抽样部分数据进行介绍。 ## 2. 公司数据(Company.csv) ```text id,name,products CSF0000002238,三角*胎股*限公司,"轮胎,全钢子午线轮胎" ``` * ``id``:公司在系统中的唯一 id * ``name``:公司名 * ``products``:公司生产的产品,使用逗号分隔 ## 3. 公司资金转账(Company_fundTrans_Company.csv) ```text src,dst,transDate,transAmt CSF0000002227,CSF0000001579,20230506,73 ``` * ``src``:转出方 * ``dst``:转入方 * ``transDate``:转账日期 * ``transAmt``:转账总金额 ## 4. 法人代表(Person.csv) ```text id,name,age,legalRep 0,路**,63,"新疆*花*股*限公司,三角*胎股*限公司,传化*联*份限公司" ``` * ``id``:自然人在系统中唯一标识 * ``name``:自然人姓名 * ``age``:自然人年龄 * ``legalRep``:法人代表公司名字列表,逗号分隔 ## 5. 产业类目概念(Industry.csv) ```text fullname 能源 能源-能源 能源-能源-能源设备与服务 能源-能源-能源设备与服务-能源设备与服务 能源-能源-石油、天然气与消费用燃料 ``` 产业只有名字,其中段横线代表其上位概念,例如“能源-能源-能源设备与服务”的上位概念是“能源-能源”,“能源-能源-能源设备与服务-能源设备与服务”的上位概念为“能源-能源-能源设备与服务”。 ## 6. 产品类目概念(Product.csv) ```text fullname,belongToIndustry,hasSupplyChain 商品化工-橡胶-合成橡胶-顺丁橡胶,原材料-原材料-化学制品-商品化工,"化工商品贸易-化工产品贸易-橡塑制品贸易,轮胎与橡胶-轮胎,轮胎与橡胶-轮胎-特种轮胎,轮胎与橡胶-轮胎-工程轮胎,轮胎与橡胶-轮胎-斜交轮胎,轮胎与橡胶-轮胎-全钢子午线轮胎,轮胎与橡胶-轮胎-半钢子午线轮胎" ``` * ``fullname``:产品名,同样通过短横线分隔上下位 * ``belongToIndustry``:所归属的行业,例如本例中,顺丁橡胶属于商品化工 * ``hasSupplyChain``:是其下游产业,例如顺丁橡胶下游产业有橡塑制品贸易、轮胎等 ## 7. 产业链事件(ProductChainEvent.csv) ```text id,name,subject,index,trend 1,顺丁橡胶成本上涨,商品化工-橡胶-合成橡胶-顺丁橡胶,价格,上涨 ``` * ``id``:事件的 id * ``name``:事件的名字 * ``subject``:事件的主体,本例为顺丁橡胶 * ``index``:指标,本例为价格 * ``trend``:趋势,本例为上涨 ## 8. 指标(Index.csv)和趋势(Trend.csv) 指标、趋势作为原子概念类目,可组合成产业链事件和公司事件。 * 指标,值域为:价格、成本、利润 * 趋势,值域为:上涨、下跌 ## 9. 事件分类(TaxOfProdEvent.csv、TaxOfCompanyEvent.csv) 事件分类包括产业链事件分类和公司事件分类,数据为: * 产业链事件分类,值域:价格上涨 * 公司事件分类,值域:成本上涨、利润下跌
{ "source": "OpenSPG/KAG", "title": "kag/examples/supplychain/builder/data/README_cn.md", "url": "https://github.com/OpenSPG/KAG/blob/master/kag/examples/supplychain/builder/data/README_cn.md", "date": "2024-09-21T13:56:44", "stars": 5456, "description": "KAG is a logical form-guided reasoning and retrieval framework based on OpenSPG engine and LLMs. It is used to build logical reasoning and factual Q&A solutions for professional domain knowledge bases. It can effectively overcome the shortcomings of the traditional RAG vector similarity calculation model.", "file_size": 1996 }
# Welcome! Hi there! Welcome to the project. We're glad you're here. # amateur's guide to react 1. Wrap rpc calls in useCallback. This one should not have empty dependency array (but don't omit it entirely, or it will run on every render!) 2. The useCallback result is a function. Assign it to a constant 3. Call the function from inside useEffect. Dependency array will include the function -- that's okay, the function never changes, so it won't trigger the effect. Do not put rpcClient into any dependency arrays (just in case). Actually, pure event handlers don't need to be wrapped (I think). But anything called from inside a useCallback does need to be wrapped. # Webview contract 1. Call humanXYZ() when user does XYZ. This sends updateTask and then returns to indicate complete. 2. Immediately after, call startBotTurn() (returns immediately), which takes care of figuring out what to do to get back to human control. 3. Call stopBotTurn() if needed. All task updates are sent via updateTask. eventually there will be an endBotTurn notification, but we don't need it yet. # Issues encountered ## Unable to launch browser Problem: Unable to launch browser: Could not connect to debug target at http://localhost:9222: Could not find any debuggable target Solution: restart vscode ## A javascript error occurred in the main process Solution: run yarn watch
{ "source": "meltylabs/melty", "title": "CHARLIE_README.md", "url": "https://github.com/meltylabs/melty/blob/main/CHARLIE_README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1376 }
# Contributing to Melty Thanks for helping make Melty better! ## Feedback We'd love to hear your feedback at [[email protected]](mailto:[email protected]). ## Issues and feature requests Feel free to create a new GitHub issue for bugs or feature requests. If you're reporting a bug, please include - Version of Melty (About -> Melty) - Your operating system - Errors from the Dev Tools Console (open from the menu: Help > Toggle Developer Tools) ## Pull requests We're working hard to get the Melty code into a stable state where it's easy to accept contributions. If you're interested in adding something to Melty, please reach out first and we can discuss how it fits into our roadmap. ## Local development To get started with local development, clone the repository and open it in Melty or vscode. Then run ```bash # install dependencies yarn run melty:install # auto-rebuild extensions/spectacular source yarn run melty:extension-dev ``` Then run the default debug configuration. In the development mode, any changes you make to the `./extensions/spectacular/` directory will be watched and the extension will be built. To see your changes, you must reload the code editor (`cmd+R` or `ctrl+R`). #### Set up Claude API key Melty uses Claude, and you may need to set the `melty.anthropicApiKey` in Melty's settings. You can do that by: - Waiting for the editor to launch. - Opening preferences by pressing `cmd+,` or `ctrl+,`. - Searching for `melty.anthropicApiKey` and setting the API key.
{ "source": "meltylabs/melty", "title": "CONTRIBUTING.md", "url": "https://github.com/meltylabs/melty/blob/main/CONTRIBUTING.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1508 }
# Melty is an AI code editor where every chat message is a git commit Revert, branch, reset, and squash your chats. Melty stays in sync with you like a pair programmer so you never have to explain what you’re doing. [Melty](https://melty.sh) 0.2 is almost ready. We'll start sending it out to people on the waitlist within the next few days and weeks. If we don't we'll eat a hat or something. ### [Get Early Access](https://docs.google.com/forms/d/e/1FAIpQLSc6uBe0ea26q7Iq0Co_q5fjW2nypUl8G_Is5M_6t8n7wZHuPA/viewform) --- ## Meet Melty We're Charlie and Jackson. We're longtime friends who met playing ultimate frisbee at Brown. ![founders](https://github.com/user-attachments/assets/7ac1f7ec-87ad-4498-be1f-a70c8128c2b5) [Charlie](http://charlieholtz.com) comes from [Replicate](https://replicate.com/), where he started the Hacker in Residence team and [accidentally struck fear into the heart of Hollywood](https://www.businessinsider.com/david-attenborough-ai-video-hollywood-actors-afraid-sag-aftra-2023-11). [Jackson](http://jdecampos.com) comes from Netflix, where he [built machine learning infrastructure](https://netflixtechblog.com/scaling-media-machine-learning-at-netflix-f19b400243) that picks the artwork you see for your favorite shows. We've used most of the AI coding tools out there, and often ended up copy–pasting code, juggling ten chats for the same task, or committing buggy code that came back to bite us later. AI has already transformed how we code, but we know it can do a lot more. **So we're building Melty, the first AI code editor that can make big changes across multiple files and integrate with your entire workflow.** We've been building Melty for 28 days, and it's already writing about half of its own code. Melty can… _(all demos real-time)_ ## Refactor https://github.com/user-attachments/assets/603ae418-038d-477c-aa36-83c139172ab8 ## Create web apps from scratch https://github.com/user-attachments/assets/26518a2e-cd75-4dc7-8ee6-32657727db80 ## Navigate large codebases https://github.com/user-attachments/assets/916c0d00-e451-40f8-9146-32ab044e76ad ## Write its own commits ![commits](https://github.com/user-attachments/assets/277a20be-f0bc-4cc8-979b-63b5e3e267fe) We're designing Melty to: - Help you understand your code better, not worse - Watch every change you make, like a pair programmer - Learn and adapt to your codebase - Integrate with your compiler, terminal, and debugger, as well as tools like Linear and GitHub Want to try Melty? Sign up here, and we'll get you early access: ### [Get Early Access](https://docs.google.com/forms/d/e/1FAIpQLSc6uBe0ea26q7Iq0Co_q5fjW2nypUl8G_Is5M_6t8n7wZHuPA/viewform) https://twitter.com/charliebholtz/status/1825647665776046472 ### Contributing Please see our [contributing guidelines](CONTRIBUTING.md) for details on how to set up/contribute to the project.
{ "source": "meltylabs/melty", "title": "README.md", "url": "https://github.com/meltylabs/melty/blob/main/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 2879 }
# Code - OSS Development Container [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode) This repository includes configuration for a development container for working with Code - OSS in a local container or using [GitHub Codespaces](https://github.com/features/codespaces). > **Tip:** The default VNC password is `vscode`. The VNC server runs on port `5901` and a web client is available on port `6080`. ## Quick start - local If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode) to get started. Clicking these links will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use. 1. Install Docker Desktop or Docker for Linux on your local machine. (See [docs](https://aka.ms/vscode-remote/containers/getting-started) for additional details.) 2. **Important**: Docker needs at least **4 Cores and 8 GB of RAM** to run a full build with **9 GB of RAM** being recommended. If you are on macOS, or are using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item and going to **Preferences/Settings > Resources > Advanced**. > **Note:** The [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extension is included in the container so you can keep an eye on CPU/Memory in the status bar. 3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Dev Containers](https://aka.ms/vscode-remote/download/containers) extension. ![Image of Dev Containers extension](https://microsoft.github.io/vscode-remote-release/images/dev-containers-extn.png) > **Note:** The Dev Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details. 4. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> and select **Dev Containers: Clone Repository in Container Volume...**. > **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend using the WSL filesystem on Windows or the "clone repository in container" approach on Windows and macOS instead since it uses "named volume" rather than the local filesystem. 5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press <kbd>Enter</kbd>. 6. After the container is running: 1. If you have the `DISPLAY` or `WAYLAND_DISPLAY` environment variables set locally (or in WSL on Windows), desktop apps in the container will be shown in local windows. 2. If these are not set, open a web browser and go to [http://localhost:6080](http://localhost:6080), or use a [VNC Viewer][def] to connect to `localhost:5901` and enter `vscode` as the password. Anything you start in VS Code, or the integrated terminal, will appear here. Next: **[Try it out!](#try-it)** ## Quick start - GitHub Codespaces 1. From the [microsoft/vscode GitHub repository](https://github.com/microsoft/vscode), click on the **Code** dropdown, select **Open with Codespaces**, and then click on **New codespace**. If prompted, select the **Standard** machine size (which is also the default). > **Note:** You will not see these options within GitHub if you are not in the Codespaces beta. 2. After the codespace is up and running in your browser, press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> and select **Ports: Focus on Ports View**. 3. You should see **VNC web client (6080)** under in the list of ports. Select the line and click on the globe icon to open it in a browser tab. > **Tip:** If you do not see the port, <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd>, select **Forward a Port** and enter port `6080`. 4. In the new tab, you should see noVNC. Click **Connect** and enter `vscode` as the password. Anything you start in VS Code, or the integrated terminal, will appear here. Next: **[Try it out!](#try-it)** ### Using VS Code with GitHub Codespaces You may see improved VNC responsiveness when accessing a codespace from VS Code client since you can use a [VNC Viewer][def]. Here's how to do it. 1. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the the [GitHub Codespaces extension](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces). > **Note:** The GitHub Codespaces extension requires the Visual Studio Code distribution of Code - OSS. 2. After the VS Code is up and running, press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd>, choose **Codespaces: Create New Codespace**, and use the following settings: - `microsoft/vscode` for the repository. - Select any branch (e.g. **main**) - you can select a different one later. - Choose **Standard** (4-core, 8GB) as the size. 3. After you have connected to the codespace, you can use a [VNC Viewer][def] to connect to `localhost:5901` and enter `vscode` as the password. > **Tip:** You may also need change your VNC client's **Picture Quality** setting to **High** to get a full color desktop. 4. Anything you start in VS Code, or the integrated terminal, will appear here. Next: **[Try it out!](#try-it)** ## Try it This container uses the [Fluxbox](http://fluxbox.org/) window manager to keep things lean. **Right-click on the desktop** to see menu options. It works with GNOME and GTK applications, so other tools can be installed if needed. > **Note:** You can also set the resolution from the command line by typing `set-resolution`. To start working with Code - OSS, follow these steps: 1. In your local VS Code client, open a terminal (<kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>\`</kbd>) and type the following commands: ```bash yarn install bash scripts/code.sh ``` 2. After the build is complete, open a web browser or a [VNC Viewer][def] to connect to the desktop environment as described in the quick start and enter `vscode` as the password. 3. You should now see Code - OSS! Next, let's try debugging. 1. Shut down Code - OSS by clicking the box in the upper right corner of the Code - OSS window through your browser or VNC viewer. 2. Go to your local VS Code client, and use the **Run / Debug** view to launch the **VS Code** configuration. (Typically the default, so you can likely just press <kbd>F5</kbd>). > **Note:** If launching times out, you can increase the value of `timeout` in the "VS Code", "Attach Main Process", "Attach Extension Host", and "Attach to Shared Process" configurations in [launch.json](../../.vscode/launch.json). However, running `./scripts/code.sh` first will set up Electron which will usually solve timeout issues. 3. After a bit, Code - OSS will appear with the debugger attached! Enjoy! ### Notes The container comes with VS Code Insiders installed. To run it from an Integrated Terminal use `VSCODE_IPC_HOOK_CLI= /usr/bin/code-insiders .`. [def]: https://www.realvnc.com/en/connect/download/viewer/
{ "source": "meltylabs/melty", "title": ".devcontainer/README.md", "url": "https://github.com/meltylabs/melty/blob/main/.devcontainer/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 7620 }
# Setup 0. Clone, and then run `git submodule update --init --recursive` 1. Get the extensions: [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) and [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) 2. Ensure your workspace is set to the `launcher` folder being the root. ## Building the CLI on Windows For the moment, we require OpenSSL on Windows, where it is not usually installed by default. To install it: 1. Install (clone) vcpkg [using their instructions](https://github.com/Microsoft/vcpkg#quick-start-windows) 1. Add the location of the `vcpkg` directory to your system or user PATH. 1. Run`vcpkg install openssl:x64-windows-static-md` (after restarting your terminal for PATH changes to apply) 1. You should be able to then `cargo build` successfully OpenSSL is needed for the key exchange we do when forwarding Basis tunnels. When all interested Basis clients support ED25519, we would be able to solely use libsodium. At the time of writing however, there is [no active development](https://chromestatus.com/feature/4913922408710144) on this in Chromium. # Debug 1. You can use the Debug tasks already configured to run the launcher.
{ "source": "meltylabs/melty", "title": "cli/CONTRIBUTING.md", "url": "https://github.com/meltylabs/melty/blob/main/cli/CONTRIBUTING.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1230 }
# VSCode Tests ## Contents This folder contains the various test runners for VSCode. Please refer to the documentation within for how to run them: * `unit`: our suite of unit tests ([README](unit/README.md)) * `integration`: our suite of API tests ([README](integration/browser/README.md)) * `smoke`: our suite of automated UI tests ([README](smoke/README.md))
{ "source": "meltylabs/melty", "title": "test/README.md", "url": "https://github.com/meltylabs/melty/blob/main/test/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 363 }
# monaco-editor-core > This npm module is a building block for the [monaco-editor](https://www.npmjs.com/package/monaco-editor) npm module and unless you are doing something special (e.g. authoring a monaco editor language that can be shipped and consumed independently), it is best to consume the [monaco-editor](https://www.npmjs.com/package/monaco-editor) module that contains this module and adds languages supports. The Monaco Editor is the code editor that powers [VS Code](https://github.com/microsoft/vscode). Here is a good page describing some [editor features](https://code.visualstudio.com/docs/editor/editingevolved). This npm module contains the core editor functionality, as it comes from the [vscode repository](https://github.com/microsoft/vscode). ## License [MIT](https://github.com/microsoft/vscode/blob/main/LICENSE.txt)
{ "source": "meltylabs/melty", "title": "build/monaco/README-npm.md", "url": "https://github.com/meltylabs/melty/blob/main/build/monaco/README-npm.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 846 }
# Steps to publish a new version of monaco-editor-core ## Generate monaco.d.ts * The `monaco.d.ts` is now automatically generated when running `gulp watch` ## Bump version * increase version in `build/monaco/package.json` ## Generate npm contents for monaco-editor-core * Be sure to have all changes committed **and pushed to the remote** * (the generated files contain the HEAD sha and that should be available on the remote) * run gulp editor-distro ## Publish * `cd out-monaco-editor-core` * `npm publish`
{ "source": "meltylabs/melty", "title": "build/monaco/README.md", "url": "https://github.com/meltylabs/melty/blob/main/build/monaco/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 516 }
## Setup - Clone [microsoft/vscode](https://github.com/microsoft/vscode) - Run `yarn` at `/`, this will install - Dependencies for `/extension/css-language-features/` - Dependencies for `/extension/css-language-features/server/` - devDependencies such as `gulp` - Open `/extensions/css-language-features/` as the workspace in VS Code - In `/extensions/css-language-features/` run `yarn compile`(or `yarn watch`) to build the client and server - Run the [`Launch Extension`](https://github.com/microsoft/vscode/blob/master/extensions/css-language-features/.vscode/launch.json) debug target in the Debug View. This will: - Launch a new VS Code instance with the `css-language-features` extension loaded - Open a `.css` file to activate the extension. The extension will start the CSS language server process. - Add `"css.trace.server": "verbose"` to the settings to observe the communication between client and server in the `CSS Language Server` output. - Debug the extension and the language server client by setting breakpoints in`css-language-features/client/` - Debug the language server process by using `Attach to Node Process` command in the VS Code window opened on `css-language-features`. - Pick the process that contains `cssServerMain` in the command line. Hover over `code-insiders` resp `code` processes to see the full process command line. - Set breakpoints in `css-language-features/server/` - Run `Reload Window` command in the launched instance to reload the extension ## Contribute to vscode-css-languageservice [microsoft/vscode-css-languageservice](https://github.com/microsoft/vscode-css-languageservice) contains the language smarts for CSS/SCSS/Less. This extension wraps the css language service into a Language Server for VS Code. If you want to fix CSS/SCSS/Less issues or make improvements, you should make changes at [microsoft/vscode-css-languageservice](https://github.com/microsoft/vscode-css-languageservice). However, within this extension, you can run a development version of `vscode-css-languageservice` to debug code or test language features interactively: #### Linking `vscode-css-languageservice` in `css-language-features/server/` - Clone [microsoft/vscode-css-languageservice](https://github.com/microsoft/vscode-css-languageservice) - Run `yarn` in `vscode-css-languageservice` - Run `yarn link` in `vscode-css-languageservice`. This will compile and link `vscode-css-languageservice` - In `css-language-features/server/`, run `yarn link vscode-css-languageservice` #### Testing the development version of `vscode-css-languageservice` - Open both `vscode-css-languageservice` and this extension in a single workspace with [multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) feature - Run `yarn watch` in `vscode-css-languageservice` to recompile the extension whenever it changes - Run `yarn watch` at `css-language-features/server/` to recompile this extension with the linked version of `vscode-css-languageservice` - Make some changes in `vscode-css-languageservice` - Now when you run `Launch Extension` debug target, the launched instance will use your development version of `vscode-css-languageservice`. You can interactively test the language features.
{ "source": "meltylabs/melty", "title": "extensions/css-language-features/CONTRIBUTING.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/css-language-features/CONTRIBUTING.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 3258 }
# Language Features for CSS, SCSS, and LESS files **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [CSS, SCSS and Less in VS Code](https://code.visualstudio.com/docs/languages/css) to learn about the features of this extension. Please read the [CONTRIBUTING.md](https://github.com/microsoft/vscode/blob/master/extensions/css-language-features/CONTRIBUTING.md) file to learn how to contribute to this extension.
{ "source": "meltylabs/melty", "title": "extensions/css-language-features/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/css-language-features/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 484 }
## How to build and run from source? Read the basics about extension authoring from [Extending Visual Studio Code](https://code.visualstudio.com/docs/extensions/overview) - Read [Build and Run VS Code from Source](https://github.com/microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source) to get a local dev set up running for VS Code - Open the `extensions/emmet` folder in the vscode repo in VS Code - Press F5 to start debugging ## Running tests Tests for Emmet extension are run as integration tests as part of VS Code. - Read [Build and Run VS Code from Source](https://github.com/microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source) to get a local dev set up running for VS Code - Run `./scripts/test-integration.sh` to run all the integrations tests that include the Emmet tests.
{ "source": "meltylabs/melty", "title": "extensions/emmet/CONTRIBUTING.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/emmet/CONTRIBUTING.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 816 }
# Emmet integration in Visual Studio Code **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [Emmet in Visual Studio Code](https://code.visualstudio.com/docs/editor/emmet) to learn about the features of this extension. Please read the [CONTRIBUTING.md](https://github.com/microsoft/vscode/blob/master/extensions/emmet/CONTRIBUTING.md) file to learn how to contribute to this extension.
{ "source": "meltylabs/melty", "title": "extensions/emmet/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/emmet/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 457 }
# Git static contributions and remote repository picker **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features Git static contributions and remote repository picker. ## API The Git extension exposes an API, reachable by any other extension. 1. Copy `src/api/git-base.d.ts` to your extension's sources; 2. Include `git-base.d.ts` in your extension's compilation. 3. Get a hold of the API with the following snippet: ```ts const gitBaseExtension = vscode.extensions.getExtension<GitBaseExtension>('vscode.git-base').exports; const git = gitBaseExtension.getAPI(1); ```
{ "source": "meltylabs/melty", "title": "extensions/git-base/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/git-base/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 638 }
# Git integration for Visual Studio Code **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [Git support in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support) to learn about the features of this extension. ## API The Git extension exposes an API, reachable by any other extension. 1. Copy `src/api/git.d.ts` to your extension's sources; 2. Include `git.d.ts` in your extension's compilation. 3. Get a hold of the API with the following snippet: ```ts const gitExtension = vscode.extensions.getExtension<GitExtension>('vscode.git').exports; const git = gitExtension.getAPI(1); ``` **Note:** To ensure that the `vscode.git` extension is activated before your extension, add `extensionDependencies` ([docs](https://code.visualstudio.com/api/references/extension-manifest)) into the `package.json` of your extension: ```json "extensionDependencies": [ "vscode.git" ] ```
{ "source": "meltylabs/melty", "title": "extensions/git/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/git/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 981 }
# GitHub Authentication for Visual Studio Code **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension provides support for authenticating to GitHub. It registers the `github` Authentication Provider that can be leveraged by other extensions. This also provides the GitHub authentication used by Settings Sync.
{ "source": "meltylabs/melty", "title": "extensions/github-authentication/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/github-authentication/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 387 }
# GitHub for Visual Studio Code **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension provides the following GitHub-related features for VS Code: - `Publish to GitHub` command - `Clone from GitHub` participant to the `Git: Clone` command - GitHub authentication for built-in git commands, controlled via the `github.gitAuthentication` command - Automatic fork creation when attempting to push to a repository without permissions
{ "source": "meltylabs/melty", "title": "extensions/github/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/github/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 508 }
# Grunt - The JavaScript Task Runner **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension supports running [Grunt](https://gruntjs.com/) tasks defined in a `gruntfile.js` file as [VS Code tasks](https://code.visualstudio.com/docs/editor/tasks). Grunt tasks with the name 'build', 'compile', or 'watch' are treated as build tasks. To run Grunt tasks, use the **Tasks** menu. ## Settings - `grunt.autoDetect` - Enable detecting tasks from `gruntfile.js` files, the default is `on`.
{ "source": "meltylabs/melty", "title": "extensions/grunt/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/grunt/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 562 }
# Gulp - Automate and enhance your workflow **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension supports running [Gulp](https://gulpjs.com/) tasks defined in a `gulpfile.{js,ts}` file as [VS Code tasks](https://code.visualstudio.com/docs/editor/tasks). Gulp tasks with the name 'build', 'compile', or 'watch' are treated as build tasks. To run Gulp tasks, use the **Tasks** menu. ## Settings - `gulp.autoDetect` - Enable detecting tasks from `gulpfile.{js,ts}` files, the default is `on`.
{ "source": "meltylabs/melty", "title": "extensions/gulp/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/gulp/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 572 }
## Setup - Clone [microsoft/vscode](https://github.com/microsoft/vscode) - Run `yarn` at `/`, this will install - Dependencies for `/extension/html-language-features/` - Dependencies for `/extension/html-language-features/server/` - devDependencies such as `gulp` - Open `/extensions/html-language-features/` as the workspace in VS Code - In `/extensions/html-language-features/` run `yarn compile`(or `yarn watch`) to build the client and server - Run the [`Launch Extension`](https://github.com/microsoft/vscode/blob/master/extensions/html-language-features/.vscode/launch.json) debug target in the Debug View. This will: - Launch a new VS Code instance with the `html-language-features` extension loaded - Open a `.html` file to activate the extension. The extension will start the HTML language server process. - Add `"html.trace.server": "verbose"` to the settings to observe the communication between client and server in the `HTML Language Server` output. - Debug the extension and the language server client by setting breakpoints in`html-language-features/client/` - Debug the language server process by using `Attach to Node Process` command in the VS Code window opened on `html-language-features`. - Pick the process that contains `htmlServerMain` in the command line. Hover over `code-insiders` resp `code` processes to see the full process command line. - Set breakpoints in `html-language-features/server/` - Run `Reload Window` command in the launched instance to reload the extension ### Contribute to vscode-html-languageservice [microsoft/vscode-html-languageservice](https://github.com/microsoft/vscode-html-languageservice) contains the language smarts for html. This extension wraps the html language service into a Language Server for VS Code. If you want to fix html issues or make improvements, you should make changes at [microsoft/vscode-html-languageservice](https://github.com/microsoft/vscode-html-languageservice). However, within this extension, you can run a development version of `vscode-html-languageservice` to debug code or test language features interactively: #### Linking `vscode-html-languageservice` in `html-language-features/server/` - Clone [microsoft/vscode-html-languageservice](https://github.com/microsoft/vscode-html-languageservice) - Run `yarn` in `vscode-html-languageservice` - Run `yarn link` in `vscode-html-languageservice`. This will compile and link `vscode-html-languageservice` - In `html-language-features/server/`, run `yarn link vscode-html-languageservice` #### Testing the development version of `vscode-html-languageservice` - Open both `vscode-html-languageservice` and this extension in two windows or with a single window with the[multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) feature - Run `yarn watch` at `html-languagefeatures/server/` to recompile this extension with the linked version of `vscode-html-languageservice` - Make some changes in `vscode-html-languageservice` - Now when you run `Launch Extension` debug target, the launched instance will use your development version of `vscode-html-languageservice`. You can interactively test the language features.
{ "source": "meltylabs/melty", "title": "extensions/html-language-features/CONTRIBUTING.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/html-language-features/CONTRIBUTING.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 3197 }
# Language Features for HTML **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [HTML in Visual Studio Code](https://code.visualstudio.com/docs/languages/html) to learn about the features of this extension. Please read the [CONTRIBUTING.md](https://github.com/microsoft/vscode/blob/master/extensions/html-language-features/CONTRIBUTING.md) file to learn how to contribute to this extension.
{ "source": "meltylabs/melty", "title": "extensions/html-language-features/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/html-language-features/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 462 }
# Jupyter for Visual Studio Code **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension provides the following Jupyter-related features for VS Code: - Open, edit and save .ipynb files
{ "source": "meltylabs/melty", "title": "extensions/ipynb/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/ipynb/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 262 }
# Jake - JavaScript build tool **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension supports running [Jake](http://jakejs.com/) tasks defined in a `Jakefile.js` file as [VS Code tasks](https://code.visualstudio.com/docs/editor/tasks). Jake tasks with the name 'build', 'compile', or 'watch' are treated as build tasks. To run Jake tasks, use the **Tasks** menu. ## Settings - `jake.autoDetect` - Enable detecting tasks from `Jakefile.js` files, the default is `on`.
{ "source": "meltylabs/melty", "title": "extensions/jake/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/jake/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 548 }
## Setup - Clone [microsoft/vscode](https://github.com/microsoft/vscode) - Run `yarn` at `/`, this will install - Dependencies for `/extension/json-language-features/` - Dependencies for `/extension/json-language-features/server/` - devDependencies such as `gulp` - Open `/extensions/json-language-features/` as the workspace in VS Code - In `/extensions/json-language-features/` run `yarn compile`(or `yarn watch`) to build the client and server - Run the [`Launch Extension`](https://github.com/microsoft/vscode/blob/master/extensions/json-language-features/.vscode/launch.json) debug target in the Debug View. This will: - Launch a new VS Code instance with the `json-language-features` extension loaded - Open a `.json` file to activate the extension. The extension will start the JSON language server process. - Add `"json.trace.server": "verbose"` to the settings to observe the communication between client and server in the `JSON Language Server` output. - Debug the extension and the language server client by setting breakpoints in`json-language-features/client/` - Debug the language server process by using `Attach to Node Process` command in the VS Code window opened on `json-language-features`. - Pick the process that contains `jsonServerMain` in the command line. Hover over `code-insiders` resp `code` processes to see the full process command line. - Set breakpoints in `json-language-features/server/` - Run `Reload Window` command in the launched instance to reload the extension ### Contribute to vscode-json-languageservice [microsoft/vscode-json-languageservice](https://github.com/microsoft/vscode-json-languageservice) is the library that implements the language smarts for JSON. The JSON language server forwards most the of requests to the service library. If you want to fix JSON issues or make improvements, you should make changes at [microsoft/vscode-json-languageservice](https://github.com/microsoft/vscode-json-languageservice). However, within this extension, you can run a development version of `vscode-json-languageservice` to debug code or test language features interactively: #### Linking `vscode-json-languageservice` in `json-language-features/server/` - Clone [microsoft/vscode-json-languageservice](https://github.com/microsoft/vscode-json-languageservice) - Run `npm install` in `vscode-json-languageservice` - Run `npm link` in `vscode-json-languageservice`. This will compile and link `vscode-json-languageservice` - In `json-language-features/server/`, run `yarn link vscode-json-languageservice` #### Testing the development version of `vscode-json-languageservice` - Open both `vscode-json-languageservice` and this extension in two windows or with a single window with the[multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) feature. - Run `yarn watch` at `json-languagefeatures/server/` to recompile this extension with the linked version of `vscode-json-languageservice` - Make some changes in `vscode-json-languageservice` - Now when you run `Launch Extension` debug target, the launched instance will use your development version of `vscode-json-languageservice`. You can interactively test the language features.
{ "source": "meltylabs/melty", "title": "extensions/json-language-features/CONTRIBUTING.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/json-language-features/CONTRIBUTING.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 3223 }
# Language Features for JSON files **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [JSON in Visual Studio Code](https://code.visualstudio.com/docs/languages/json) to learn about the features of this extension.
{ "source": "meltylabs/melty", "title": "extensions/json-language-features/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/json-language-features/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 283 }
# Language Features for Markdown files **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [Markdown in Visual Studio Code](https://code.visualstudio.com/docs/languages/markdown) to learn about the features of this extension.
{ "source": "meltylabs/melty", "title": "extensions/markdown-language-features/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/markdown-language-features/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 295 }
# Markdown Math **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. Adds math rendering using [KaTeX](https://katex.org) to VS Code's built-in markdown preview and markdown cells in notebooks.
{ "source": "meltylabs/melty", "title": "extensions/markdown-math/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/markdown-math/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 245 }
# Media Preview **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension provides basic preview for images, audio and video files. ### Supported image file extensions - `.jpg`, `.jpe`, `.jpeg` - `.png` - `.bmp` - `.gif` - `.ico` - `.webp` - `.avif` ### Supported audio formats - `.mp3` - `.wav` - `.ogg`, `.oga` ### Supported video formats - `.mp4` (does not support `aac` audio tracks) - `.webm` (vp8 only)
{ "source": "meltylabs/melty", "title": "extensions/media-preview/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/media-preview/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 489 }
# Merge Conflict **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [Merge Conflicts in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_merge-conflicts) to learn about features of this extension.
{ "source": "meltylabs/melty", "title": "extensions/merge-conflict/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/merge-conflict/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 285 }
# Microsoft Authentication for Visual Studio Code **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension provides support for authenticating to Microsoft. It registers the `microsoft` Authentication Provider that can be leveraged by other extensions. This also provides the Microsoft authentication used by Settings Sync. Additionally, it provides the `microsoft-sovereign-cloud` Authentication Provider that can be used to sign in to other Azure clouds like Azure for US Government or Azure China. Use the setting `microsoft-sovereign-cloud.endpoint` to select the authentication endpoint the provider should use. Please note that different scopes may also be required in different environments.
{ "source": "meltylabs/melty", "title": "extensions/microsoft-authentication/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/microsoft-authentication/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 775 }
# Builtin Notebook Output Renderers for Visual Studio Code **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features This extension provides the following notebook renderers for VS Code: - Image renderer for png, jpeg and gif
{ "source": "meltylabs/melty", "title": "extensions/notebook-renderers/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/notebook-renderers/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 286 }
# Node npm **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features ### Task Running This extension supports running npm scripts defined in the `package.json` as [tasks](https://code.visualstudio.com/docs/editor/tasks). Scripts with the name 'build', 'compile', or 'watch' are treated as build tasks. To run scripts as tasks, use the **Tasks** menu. For more information about auto detection of Tasks, see the [documentation](https://code.visualstudio.com/Docs/editor/tasks#_task-autodetection). ### Script Explorer The Npm Script Explorer shows the npm scripts found in your workspace. The explorer view is enabled by the setting `npm.enableScriptExplorer`. A script can be opened, run, or debug from the explorer. ### Run Scripts from the Editor The extension supports to run the selected script as a task when editing the `package.json`file. You can either run a script from the hover shown on a script or using the command `Run Selected Npm Script`. ### Run Scripts from a Folder in the Explorer The extension supports running a script as a task from a folder in the Explorer. The command `Run NPM Script in Folder...` shown in the Explorer context menu finds all scripts in `package.json` files that are contained in this folder. You can then select the script to be executed as a task from the resulting list. You enable this support with the `npm.runScriptFromFolder` which is `false` by default. ### Others The extension fetches data from <https://registry.npmjs.org> and <https://registry.bower.io> to provide auto-completion and information on hover features on npm dependencies. ## Settings - `npm.autoDetect` - Enable detecting scripts as tasks, the default is `on`. - `npm.runSilent` - Run npm script with the `--silent` option, the default is `false`. - `npm.packageManager` - The package manager used to run the scripts: `auto`, `npm`, `yarn`, `pnpm` or `bun`. The default is `auto`, which detects your package manager based on files in your workspace. - `npm.exclude` - Glob patterns for folders that should be excluded from automatic script detection. The pattern is matched against the **absolute path** of the package.json. For example, to exclude all test folders use '&ast;&ast;/test/&ast;&ast;'. - `npm.enableScriptExplorer` - Enable an explorer view for npm scripts. - `npm.scriptExplorerAction` - The default click action: `open` or `run`, the default is `open`. - `npm.enableRunFromFolder` - Enable running npm scripts from the context menu of folders in Explorer, the default is `false`. - `npm.scriptCodeLens.enable` - Enable/disable the code lenses to run a script, the default is `false`.
{ "source": "meltylabs/melty", "title": "extensions/npm/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/npm/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 2692 }
# Language Features for PHP files **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [PHP in Visual Studio Code](https://code.visualstudio.com/docs/languages/php) to learn about the features of this extension.
{ "source": "meltylabs/melty", "title": "extensions/php-language-features/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/php-language-features/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 280 }
# References View This extension shows reference search results as separate view, just like search results. It complements the peek view presentation that is also built into VS Code. The following feature are available: * List All References via the Command Palette, the Context Menu, or via <kbd>Alt+Shift+F12</kbd> * View references in a dedicated tree view that sits in the sidebar * Navigate through search results via <kbd>F4</kbd> and <kbd>Shift+F4</kbd> * Remove references from the list via inline commands ![](https://raw.githubusercontent.com/microsoft/vscode-references-view/master/media/demo.png) **Note** that this extension is bundled with Visual Studio Code version 1.29 and later - it doesn't need to be installed anymore. ## Requirements This extension is just an alternative UI for reference search and extensions implementing reference search must still be installed. ## Issues This extension ships with Visual Studio Code and uses its issue tracker. Please file issue here: https://github.com/Microsoft/vscode/issues # Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
{ "source": "meltylabs/melty", "title": "extensions/references-view/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/references-view/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1961 }
# Language Features for Search Result files **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. This extension provides Syntax Highlighting, Symbol Information, Result Highlighting, and Go to Definition capabilities for the Search Results Editor.
{ "source": "meltylabs/melty", "title": "extensions/search-result/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/search-result/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 299 }
# Simple Browser **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. Provides a very basic browser preview using an iframe embedded in a [webviewW](). This extension is primarily meant to be used by other extensions for showing simple web content.
{ "source": "meltylabs/melty", "title": "extensions/simple-browser/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/simple-browser/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 300 }
# Change Log All notable changes to the "spectacle" extension will be documented in this file. Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. ## [Unreleased] - Initial release
{ "source": "meltylabs/melty", "title": "extensions/spectacular/CHANGELOG.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/spectacular/CHANGELOG.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 236 }
Melty is a VS Code extension that acts as an AI pair programmer, helping you write and improve your code. ## Features - AI-assisted code generation - Intelligent code suggestions - [Add more features here] ## Installation 1. Install the extension from the VS Code Marketplace. 2. Set up your Anthropic API key in the extension settings. 3. [Add any additional setup steps] ## Usage [Provide instructions on how to use the extension] ## Requirements - VS Code 1.91.0 or higher - [List any other requirements] ## Extension Settings This extension contributes the following settings: - `melty.anthropicApiKey`: API key for Anthropic Claude - `melty.githubToken`: GitHub token ## Known Issues [List any known issues or limitations] ## Release Notes ### 0.1.0 Initial release of Melty --- ## For Developers ### Setup 1. Clone the repository 2. Run `npm run install:all` to install dependencies for both the extension and the webview ### Build and Run - Use the VS Code launch configurations in `launch.json` to run and debug the extension - Run `npm run watch` to start the compiler in watch mode - Run `npm run watch:webview` to start the webview compiler in watch mode Webview / Frontend: - Run `npm run watch:all` to start the webview compiler in watch mode. It will automatically open a new browser window with the webview. Whenever changes are made to webview-ui, it will automatically create a build. ## Publish - `vsce publish minor` ### Testing - Run `npm test` to run the test suite ### Publishing To publish the extension to the VS Code Marketplace: 1. Ensure you have a Microsoft account and are logged in to the [Visual Studio Marketplace](https://marketplace.visualstudio.com/vscode). 2. Install the `vsce` package globally: `npm install -g vsce` 3. Update the `version` field in `package.json` for each new release. 4. Package your extension: `vsce package` 5. Publish your extension: `vsce publish` You'll be prompted to enter your personal access token. For more detailed instructions, refer to the [official documentation](https://code.visualstudio.com/api/working-with-extensions/publishing-extension). ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
{ "source": "meltylabs/melty", "title": "extensions/spectacular/INTERNAL_README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/spectacular/INTERNAL_README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 2257 }
# Melty Melty helps you code with AI. [See how to use Melty](https://www.loom.com/share/4f87f4f8e1f54c1da6ae88bdb986cb58)
{ "source": "meltylabs/melty", "title": "extensions/spectacular/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/spectacular/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 123 }
# Welcome to your VS Code Extension ## What's in the folder * This folder contains all of the files necessary for your extension. * `package.json` - this is the manifest file in which you declare your extension and command. * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. * `src/extension.ts` - this is the main file where you will provide the implementation of your command. * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. * We pass the function containing the implementation of the command as the second parameter to `registerCommand`. ## Get up and running straight away * Press `F5` to open a new window with your extension loaded. * Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`. * Set breakpoints in your code inside `src/extension.ts` to debug your extension. * Find output from your extension in the debug console. ## Make changes * You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`. * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. ## Explore the API * You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`. ## Run tests * Install the [Extension Test Runner](https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner) * Run the "watch" task via the **Tasks: Run Task** command. Make sure this is running, or tests might not be discovered. * Open the Testing view from the activity bar and click the Run Test" button, or use the hotkey `Ctrl/Cmd + ; A` * See the output of the test result in the Test Results view. * Make changes to `src/test/extension.test.ts` or create new test files inside the `test` folder. * The provided test runner will only consider files matching the name pattern `**.test.ts`. * You can create folders inside the `test` folder to structure your tests any way you want. ## Go further * [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create extensions that seamlessly integrate with VS Code's native interface and patterns. * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension). * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace. * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
{ "source": "meltylabs/melty", "title": "extensions/spectacular/vsc-extension-quickstart.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/spectacular/vsc-extension-quickstart.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 2928 }
# theme-seti This is an icon theme that uses the icons from [`seti-ui`](https://github.com/jesseweed/seti-ui). ## Previewing icons There is a [`./icons/preview.html`](./icons/preview.html) file that can be opened to see all of the icons included in the theme. To view this, it needs to be hosted by a web server. The easiest way is to open the file with the `Open with Live Server` command from the [Live Server extension](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer). ## Updating icons - Make a PR against https://github.com/jesseweed/seti-ui` with your icon changes. - Once accepted there, ping us or make a PR yourself that updates the theme and font here To adopt the latest changes from https://github.com/jesseweed/seti-ui: - have the main branches of `https://github.com/jesseweed/seti-ui` and `https://github.com/microsoft/vscode` cloned in the same parent folder - in the `seti-ui` folder, run `npm install` and `npm run prepublishOnly`. This will generate updated icons and fonts. - in the `vscode/extensions/theme-seti` folder run `npm run update`. This will launch the [icon theme update script](build/update-icon-theme.js) that updates the theme as well as the font based on content in `seti-ui`. - to test the icon theme, look at the icon preview as described above. - when done, create a PR with the changes in https://github.com/microsoft/vscode. Add a screenshot of the preview page to accompany it. ### Languages not shipped with `vscode` Languages that are not shipped with `vscode` must be added to the `nonBuiltInLanguages` object inside of `update-icon-theme.js`. These should match [the file mapping in `seti-ui`](https://github.com/jesseweed/seti-ui/blob/master/styles/components/icons/mapping.less). Please try and keep this list in alphabetical order! Thank you.
{ "source": "meltylabs/melty", "title": "extensions/theme-seti/CONTRIBUTING.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/theme-seti/CONTRIBUTING.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1832 }
# theme-seti This is an icon theme that uses the icons from [`seti-ui`](https://github.com/jesseweed/seti-ui). ## Updating icons There is script that can be used to update icons, [./build/update-icon-theme.js](build/update-icon-theme.js). To run this script, run `npm run update` from the `theme-seti` directory. This can be run in one of two ways: looking at a local copy of `seti-ui` for icons, or getting them straight from GitHub. If you want to run it from a local copy of `seti-ui`, first clone [`seti-ui`](https://github.com/jesseweed/seti-ui) to the folder next to your `vscode` repo (from the `theme-seti` directory, `../../`). Then, inside the `set-ui` directory, run `npm install` followed by `npm run prepublishOnly`. This will generate updated icons. If you want to download the icons straight from GitHub, change the `FROM_DISK` variable to `false` inside of `update-icon-theme.js`. ### Languages not shipped with `vscode` Languages that are not shipped with `vscode` must be added to the `nonBuiltInLanguages` object inside of `update-icon-theme.js`. These should match [the file mapping in `seti-ui`](https://github.com/jesseweed/seti-ui/blob/master/styles/components/icons/mapping.less). Please try and keep this list in alphabetical order! Thank you. ## Previewing icons There is a [`./icons/preview.html`](./icons/preview.html) file that can be opened to see all of the icons included in the theme. Note that to view this, it needs to be hosted by a web server. When updating icons, it is always a good idea to make sure that they work properly by looking at this page. When submitting a PR that updates these icons, a screenshot of the preview page should accompany it.
{ "source": "meltylabs/melty", "title": "extensions/theme-seti/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/theme-seti/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1703 }
# Language Features for TypeScript and JavaScript files **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled. ## Features See [TypeScript in Visual Studio Code](https://code.visualstudio.com/docs/languages/typescript) and [JavaScript in Visual Studio Code](https://code.visualstudio.com/docs/languages/javascript) to learn about the features of this extension.
{ "source": "meltylabs/melty", "title": "extensions/typescript-language-features/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/typescript-language-features/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 412 }
# vscode-dts This is the place for the stable API and for API proposals. ## Consume a proposal 1. find a proposal you are interested in 1. add its name to your extensions `package.json#enabledApiProposals` property 1. run `npx vscode-dts dev` to download the `d.ts` files into your project 1. don't forget that extension using proposed API cannot be published 1. learn more here: <https://code.visualstudio.com/api/advanced-topics/using-proposed-api> ## Add a new proposal 1. create a _new_ file in this directory, its name must follow this pattern `vscode.proposed.[a-zA-Z]+.d.ts` 1. creating the proposal-file will automatically update `src/vs/platform/extensions/common/extensionsApiProposals.ts` (make sure to run `yarn watch`) 1. declare and implement your proposal 1. make sure to use the `checkProposedApiEnabled` and/or `isProposedApiEnabled`-utils to enforce the API being proposed. Make sure to invoke them with your proposal's name which got generated into `extensionsApiProposals.ts` 1. Most likely will need to add your proposed api to vscode-api-tests as well
{ "source": "meltylabs/melty", "title": "src/vscode-dts/README.md", "url": "https://github.com/meltylabs/melty/blob/main/src/vscode-dts/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1078 }
# VS Code Automation Package This package contains functionality for automating various components of the VS Code UI, via an automation "driver" that connects from a separate process. It is used by the `smoke` tests.
{ "source": "meltylabs/melty", "title": "test/automation/README.md", "url": "https://github.com/meltylabs/melty/blob/main/test/automation/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 217 }
# Monaco Editor Test This directory contains scripts that are used to smoke test the Monaco Editor distribution. ## Setup & Bundle $test/monaco> yarn $test/monaco> yarn run bundle ## Compile and run tests $test/monaco> yarn run compile $test/monaco> yarn test
{ "source": "meltylabs/melty", "title": "test/monaco/README.md", "url": "https://github.com/meltylabs/melty/blob/main/test/monaco/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 268 }
# VS Code Smoke Tests Failures History This file contains a history of smoke test failures which could be avoided if particular techniques were used in the test (e.g. binding test elements with HTML5 `data-*` attribute). To better understand what can be employed in smoke test to ensure its stability, it is important to understand patterns that led to smoke test breakage. This markdown is a result of work on [this issue](https://github.com/microsoft/vscode/issues/27906). ## Log 1. This following change led to the smoke test failure because DOM element's attribute `a[title]` was changed: [eac49a3](https://github.com/microsoft/vscode/commit/eac49a321b84cb9828430e9dcd3f34243a3480f7) This attribute was used in the smoke test to grab the contents of SCM part in status bar: [0aec2d6](https://github.com/microsoft/vscode/commit/0aec2d6838b5e65cc74c33b853ffbd9fa191d636) 2. To be continued...
{ "source": "meltylabs/melty", "title": "test/smoke/Audit.md", "url": "https://github.com/meltylabs/melty/blob/main/test/smoke/Audit.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 903 }
# VS Code Smoke Test Make sure you are on **Node v12.x**. ## Quick Overview ```bash # Build extensions in the VS Code repo (if needed) yarn && yarn compile # Dev (Electron) yarn smoketest # Dev (Web - Must be run on distro) yarn smoketest --web --browser [chromium|webkit] # Build (Electron) yarn smoketest --build <path to latest version> example: yarn smoketest --build /Applications/Visual\ Studio\ Code\ -\ Insiders.app # Build (Web - read instructions below) yarn smoketest --build <path to server web build (ends in -web)> --web --browser [chromium|webkit] # Remote (Electron) yarn smoketest --build <path to latest version> --remote ``` \* This step is necessary only when running without `--build` and OSS doesn't already exist in the `.build/electron` directory. ### Running for a release (Endgame) You must always run the smoketest version that matches the release you are testing. So, if you want to run the smoketest for a release build (e.g. `release/1.22`), you need to check out that version of the smoke tests too: ```bash git fetch git checkout release/1.22 yarn && yarn compile yarn --cwd test/smoke ``` #### Web There is no support for testing an old version to a new one yet. Instead, simply configure the `--build` command line argument to point to the absolute path of the extracted server web build folder (e.g. `<rest of path here>/vscode-server-darwin-x64-web` for macOS). The server web build is available from the builds page (see previous subsection). **macOS**: if you have downloaded the server with web bits, make sure to run the following command before unzipping it to avoid security issues on startup: ```bash xattr -d com.apple.quarantine <path to server with web folder zip> ``` **Note**: make sure to point to the server that includes the client bits! ### Debug - `--verbose` logs all the low level driver calls made to Code; - `-f PATTERN` (alias `-g PATTERN`) filters the tests to be run. You can also use pretty much any mocha argument; - `--headless` will run playwright in headless mode when `--web` is used. **Note**: you can enable verbose logging of playwright library by setting a `DEBUG` environment variable before running the tests (<https://playwright.dev/docs/debug#verbose-api-logs>), for example to `pw:browser`. ### Develop ```bash cd test/smoke yarn watch ``` ## Troubleshooting ### Error: Could not get a unique tmp filename, max tries reached On Windows, check for the folder `C:\Users\<username>\AppData\Local\Temp\t`. If this folder exists, the `tmp` module can't run properly, resulting in the error above. In this case, delete the `t` folder. ## Pitfalls - Beware of workbench **state**. The tests within a single suite will share the same state. - Beware of **singletons**. This evil can, and will, manifest itself under the form of FS paths, TCP ports, IPC handles. Whenever writing a test, or setting up more smoke test architecture, make sure it can run simultaneously with any other tests and even itself. All test suites should be able to run many times in parallel. - Beware of **focus**. **Never** depend on DOM elements having focus using `.focused` classes or `:focus` pseudo-classes, since they will lose that state as soon as another window appears on top of the running VS Code window. A safe approach which avoids this problem is to use the `waitForActiveElement` API. Many tests use this whenever they need to wait for a specific element to _have focus_. - Beware of **timing**. You need to read from or write to the DOM... but is it the right time to do that? Can you 100% guarantee that `input` box will be visible at that point in time? Or are you just hoping that it will be so? Hope is your worst enemy in UI tests. Example: just because you triggered Quick Access with `F1`, it doesn't mean that it's open and you can just start typing; you must first wait for the input element to be in the DOM as well as be the current active element. - Beware of **waiting**. **Never** wait longer than a couple of seconds for anything, unless it's justified. Think of it as a human using Code. Would a human take 10 minutes to run through the Search viewlet smoke test? Then, the computer should even be faster. **Don't** use `setTimeout` just because. Think about what you should wait for in the DOM to be ready and wait for that instead.
{ "source": "meltylabs/melty", "title": "test/smoke/README.md", "url": "https://github.com/meltylabs/melty/blob/main/test/smoke/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 4340 }
# Unit Tests ## Run (inside Electron) ./scripts/test.[sh|bat] All unit tests are run inside a Electron renderer environment which access to DOM and Nodejs api. This is the closest to the environment in which VS Code itself ships. Notes: - use the `--debug` to see an electron window with dev tools which allows for debugging - to run only a subset of tests use the `--run` or `--glob` options - use `yarn watch` to automatically compile changes For instance, `./scripts/test.sh --debug --glob **/extHost*.test.js` runs all tests from `extHost`-files and enables you to debug them. ## Run (inside browser) yarn test-browser --browser webkit --browser chromium Unit tests from layers `common` and `browser` are run inside `chromium`, `webkit`, and (soon'ish) `firefox` (using playwright). This complements our electron-based unit test runner and adds more coverage of supported platforms. Notes: - these tests are part of the continuous build, that means you might have test failures that only happen with webkit on _windows_ or _chromium_ on linux - you can run these tests locally via yarn `test-browser --browser chromium --browser webkit` - to debug, open `<vscode>/test/unit/browser/renderer.html` inside a browser and use the `?m=<amd_module>`-query to specify what AMD module to load, e.g `file:///Users/jrieken/Code/vscode/test/unit/browser/renderer.html?m=vs/base/test/common/strings.test` runs all tests from `strings.test.ts` - to run only a subset of tests use the `--run` or `--glob` options **Note**: you can enable verbose logging of playwright library by setting a `DEBUG` environment variable before running the tests (https://playwright.dev/docs/debug#verbose-api-logs) ## Run (with node) yarn test-node --run src/vs/editor/test/browser/controller/cursor.test.ts ## Coverage The following command will create a `coverage` folder in the `.build` folder at the root of the workspace: ### OS X and Linux ./scripts/test.sh --coverage ### Windows scripts\test --coverage
{ "source": "meltylabs/melty", "title": "test/unit/README.md", "url": "https://github.com/meltylabs/melty/blob/main/test/unit/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 2019 }
The file `JavaScript.tmLanguage.json` is derived from [TypeScriptReact.tmLanguage](https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage). To update to the latest version: - `cd extensions/typescript` and run `npm run update-grammars` - don't forget to run the integration tests at `./scripts/test-integration.sh` The script does the following changes: - fileTypes .tsx -> .js & .jsx - scopeName scope.tsx -> scope.js - update all rule names .tsx -> .js
{ "source": "meltylabs/melty", "title": "extensions/javascript/syntaxes/Readme.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/javascript/syntaxes/Readme.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 493 }
# VSCode JSON Language Server [![NPM Version](https://img.shields.io/npm/v/vscode-json-languageserver.svg)](https://npmjs.org/package/vscode-json-languageserver) [![NPM Downloads](https://img.shields.io/npm/dm/vscode-json-languageserver.svg)](https://npmjs.org/package/vscode-json-languageserver) [![NPM Version](https://img.shields.io/npm/l/vscode-json-languageserver.svg)](https://npmjs.org/package/vscode-json-languageserver) The JSON Language server provides language-specific smarts for editing, validating and understanding JSON documents. It runs as a separate executable and implements the [language server protocol](https://microsoft.github.io/language-server-protocol/overview) to be connected by any code editor or IDE. ## Capabilities ### Server capabilities The JSON language server supports requests on documents of language id `json` and `jsonc`. - `json` documents are parsed and validated following the [JSON specification](https://tools.ietf.org/html/rfc7159). - `jsonc` documents additionally accept single line (`//`) and multi-line comments (`/* ... */`). JSONC is a VSCode specific file format, intended for VSCode configuration files, without any aspirations to define a new common file format. The server implements the following capabilities of the language server protocol: - [Code completion](https://microsoft.github.io/language-server-protocol/specification#textDocument_completion) for JSON properties and values based on the document's [JSON schema](http://json-schema.org/) or based on existing properties and values used at other places in the document. JSON schemas are configured through the server configuration options. - [Hover](https://microsoft.github.io/language-server-protocol/specification#textDocument_hover) for values based on descriptions in the document's [JSON schema](http://json-schema.org/). - [Document Symbols](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol) for quick navigation to properties in the document. - [Document Colors](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentColor) for showing color decorators on values representing colors and [Color Presentation](https://microsoft.github.io/language-server-protocol/specification#textDocument_colorPresentation) for color presentation information to support color pickers. The location of colors is defined by the document's [JSON schema](http://json-schema.org/). All values marked with `"format": "color-hex"` (VSCode specific, non-standard JSON Schema extension) are considered color values. The supported color formats are `#rgb[a]` and `#rrggbb[aa]`. - [Code Formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_rangeFormatting) supporting ranges and formatting the whole document. - [Folding Ranges](https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange) for all folding ranges in the document. - Semantic Selection for semantic selection for one or multiple cursor positions. - [Goto Definition](https://microsoft.github.io/language-server-protocol/specification#textDocument_definition) for $ref references in JSON schemas - [Diagnostics (Validation)](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics) are pushed for all open documents - syntax errors - structural validation based on the document's [JSON schema](http://json-schema.org/). In order to load JSON schemas, the JSON server uses NodeJS `http` and `fs` modules. For all other features, the JSON server only relies on the documents and settings provided by the client through the LSP. ### Client requirements The JSON language server expects the client to only send requests and notifications for documents of language id `json` and `jsonc`. The JSON language server has the following dependencies on the client's capabilities: - Code completion requires that the client capability has *snippetSupport*. If not supported by the client, the server will not offer the completion capability. - Formatting support requires the client to support *dynamicRegistration* for *rangeFormatting*. If not supported by the client, the server will not offer the format capability. ## Configuration ### Initialization options The client can send the following initialization options to the server: - `provideFormatter: boolean | undefined`. If defined, the value defines whether the server provides the `documentRangeFormattingProvider` capability on initialization. If undefined, the setting `json.format.enable` is used to determine whether formatting is provided. The formatter will then be registered through dynamic registration. If the client does not support dynamic registration, no formatter will be available. - `handledSchemaProtocols`: The URI schemas handles by the server. See section `Schema configuration` below. - `customCapabilities`: Additional non-LSP client capabilities: - `rangeFormatting: { editLimit: x } }`: For performance reasons, limit the number of edits returned by the range formatter to `x`. ### Settings Clients may send a `workspace/didChangeConfiguration` notification to notify the server of settings changes. The server supports the following settings: - http - `proxy`: The URL of the proxy server to use when fetching schema. When undefined or empty, no proxy is used. - `proxyStrictSSL`: Whether the proxy server certificate should be verified against the list of supplied CAs. - json - `format` - `enable`: Whether the server should register the formatting support. This option is only applicable if the client supports *dynamicRegistration* for *rangeFormatting* and `initializationOptions.provideFormatter` is not defined. - `validate` - `enable`: Whether the server should validate. Defaults to `true` if not set. - `schemas`: Configures association of file names to schema URL or schemas and/or associations of schema URL to schema content. - `fileMatch`: an array of file names or paths (separated by `/`). `*` can be used as a wildcard. Exclusion patterns can also be defined and start with '!'. A file matches when there is at least one matching pattern and the last matching pattern is not an exclusion pattern. - `folderUri`: If provided, the association is only used if the document is located in the given folder (directly or in a subfolder) - `url`: The URL of the schema, optional when also a schema is provided. - `schema`: The schema content, optional - `resultLimit`: The max number of color decorators and outline symbols to be computed (for performance reasons) - `jsonFoldingLimit`: The max number of folding ranges to be computed for json documents (for performance reasons) - `jsoncFoldingLimit`: The max number of folding ranges to be computed for jsonc documents (for performance reasons) ```json { "http": { "proxy": "", "proxyStrictSSL": true }, "json": { "format": { "enable": true }, "schemas": [ { "fileMatch": [ "foo.json", "*.superfoo.json" ], "url": "http://json.schemastore.org/foo", "schema": { "type": "array" } } ] } } ``` ### Schema configuration and custom schema content delivery [JSON schemas](http://json-schema.org/) are essential for code assist, hovers, color decorators to work and are required for structural validation. To find the schema for a given JSON document, the server uses the following mechanisms: - JSON documents can define the schema URL using a `$schema` property - The settings define a schema association based on the documents URL. Settings can either associate a schema URL to a file or path pattern, and they can directly provide a schema. - Additionally, schema associations can also be provided by a custom 'schemaAssociations' configuration call. Schemas are identified by URLs. To load the content of a schema, the JSON language server either tries to load from that URI or path itself or delegates to the client. The `initializationOptions.handledSchemaProtocols` initialization option defines which URLs are handled by the server. Requests for all other URIs are sent to the client. `handledSchemaProtocols` is part of the initialization options and can't be changed while the server is running. ```ts let clientOptions: LanguageClientOptions = { initializationOptions: { handledSchemaProtocols: ['file'] // language server should only try to load file URLs } ... } ``` If `handledSchemaProtocols` is not set, the JSON language server will load the following URLs itself: - `http`, `https`: Loaded using NodeJS's HTTP support. Proxies can be configured through the settings. - `file`: Loaded using NodeJS's `fs` support. #### Schema content request Requests for schemas with URLs not handled by the server are forwarded to the client through an LSP request. This request is a JSON language server-specific, non-standardized, extension to the LSP. Request: - method: 'vscode/content' - params: `string` - The schema URL to request. - response: `string` - The content of the schema with the given URL #### Schema content change notification When the client is aware that a schema content has changed, it will notify the server through a notification. This notification is a JSON language server-specific, non-standardized, extension to the LSP. The server will, as a response, clear the schema content from the cache and reload the schema content when required again. #### Schema associations notification In addition to the settings, schemas associations can also be provided through a notification from the client to the server. This notification is a JSON language server-specific, non-standardized, extension to the LSP. Notification: - method: 'json/schemaAssociations' - params: `ISchemaAssociations` or `ISchemaAssociation[]` defined as follows ```ts interface ISchemaAssociations { /** * An object where: * - keys are file names or file paths (using `/` as path separator). `*` can be used as a wildcard. * - values are an arrays of schema URIs */ [pattern: string]: string[]; } interface ISchemaAssociation { /** * The URI of the schema, which is also the identifier of the schema. */ uri: string; /** * A list of file path patterns that are associated to the schema. The '*' wildcard can be used. Exclusion patterns starting with '!'. * For example '*.schema.json', 'package.json', '!foo*.schema.json'. * A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'. */ fileMatch: string[]; /** * If provided, the association is only used if the validated document is located in the given folder (directly or in a subfolder) */ folderUri?: string; /* * The schema for the given URI. * If no schema is provided, the schema will be fetched with the schema request service (if available). */ schema?: JSONSchema; } ``` `ISchemaAssociations` - keys: a file names or file path (separated by `/`). `*` can be used as a wildcard. - values: An array of schema URLs Notification: - method: 'json/schemaContent' - params: `string` the URL of the schema that has changed. ### Item Limit If the setting `resultLimit` is set, the JSON language server will limit the number of color symbols and document symbols computed. If the setting `jsonFoldingLimit` or `jsoncFoldingLimit` is set, the JSON language server will limit the number of folding ranges computed. ## Try The JSON language server is shipped with [Visual Studio Code](https://code.visualstudio.com/) as part of the built-in VSCode extension `json-language-features`. The server is started when the first JSON file is opened. The [VSCode JSON documentation](https://code.visualstudio.com/docs/languages/json) for detailed information on the user experience and has more information on how to configure the language support. ## Integrate If you plan to integrate the JSON language server into an editor and IDE, check out [this page](https://microsoft.github.io/language-server-protocol/implementors/tools/) if there's already an LSP client integration available. You can also launch the language server as a command and connect to it. For that, install the `vscode-json-languageserver` npm module: `npm install -g vscode-json-languageserver` Start the language server with the `vscode-json-languageserver` command. Use a command line argument to specify the preferred communication channel: ``` vscode-json-languageserver --node-ipc vscode-json-languageserver --stdio vscode-json-languageserver --socket=<port> ``` To connect to the server from NodeJS, see Remy Suen's great write-up on [how to communicate with the server](https://github.com/rcjsuen/dockerfile-language-server-nodejs#communicating-with-the-server) through the available communication channels. ## Participate The source code of the JSON language server can be found in the [VSCode repository](https://github.com/microsoft/vscode) at [extensions/json-language-features/server](https://github.com/microsoft/vscode/tree/master/extensions/json-language-features/server). File issues and pull requests in the [VSCode GitHub Issues](https://github.com/microsoft/vscode/issues). See the document [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) on how to build and run from source. Most of the functionality of the server is located in libraries: - [jsonc-parser](https://github.com/microsoft/node-jsonc-parser) contains the JSON parser and scanner. - [vscode-json-languageservice](https://github.com/microsoft/vscode-json-languageservice) contains the implementation of all features as a re-usable library. - [vscode-languageserver-node](https://github.com/microsoft/vscode-languageserver-node) contains the implementation of language server for NodeJS. Help on any of these projects is very welcome. ## Code of Conduct This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. ## License Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the [MIT](https://github.com/microsoft/vscode/blob/master/LICENSE.txt) License.
{ "source": "meltylabs/melty", "title": "extensions/json-language-features/server/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/json-language-features/server/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 14742 }
[b](b) [b.md](b.md) [./b.md](./b.md) [/b.md](/b.md) `[/b.md](/b.md)` [b#header1](b#header1) ``` [b](b) ``` ~~~ [b](b) ~~~ // Indented code [b](b)
{ "source": "meltylabs/melty", "title": "extensions/markdown-language-features/test-workspace/a.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/markdown-language-features/test-workspace/a.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 160 }
# `webview-ui` Directory This directory contains all of the code that will be executed within the webview context. It can be thought of as the place where all the "frontend" code of a webview is contained. Types of content that can be contained here: - Frontend framework code (i.e. React, Svelte, Vue, etc.) - JavaScript files - CSS files - Assets / resources (i.e. images, illustrations, etc.) Bugs - if you close the webview while the partial message is still being sent, it wont be saved
{ "source": "meltylabs/melty", "title": "extensions/spectacular/webview-ui/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/spectacular/webview-ui/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 496 }
The file `TypeScript.tmLanguage.json` and `TypeScriptReact.tmLanguage.json` are derived from [TypeScript.tmLanguage](https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScript.tmLanguage) and [TypeScriptReact.tmLanguage](https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage). To update to the latest version: - `cd extensions/typescript` and run `npm run update-grammars` - don't forget to run the integration tests at `./scripts/test-integration.sh` Migration notes and todos: - differentiate variable and function declarations from references - I suggest we use a new scope segment 'function-call' to signal a function reference, and 'definition' to the declaration. An alternative is to use 'support.function' everywhere. - I suggest we use a new scope segment 'definition' to the variable declarations. Haven't yet found a scope for references that other grammars use. - rename scope to return.type to return-type, which is already used in other grammars - rename entity.name.class to entity.name.type.class which is used in all other grammars I've seen - do we really want to have the list of all the 'library' types (Math, Dom...). It adds a lot of size to the grammar, lots of special rules and is not really correct as it depends on the JavaScript runtime which types are present.
{ "source": "meltylabs/melty", "title": "extensions/typescript-basics/syntaxes/Readme.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/typescript-basics/syntaxes/Readme.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1350 }
# vscode-wasm-typescript Language server host for typescript using vscode's sync-api in the browser. ## Getting up and running To test this out, you'll need three shells: 1. `yarn watch` for vscode itself 2. `yarn watch-web` for the web side 3. `node <root>/scripts/code-web.js --coi` The last command will open a browser window. You'll want to add `?vscode-coi=` to the end. This is for enabling shared array buffers. So, for example: `http://localhost:8080/?vscode-coi=`. ### Working on type acquisition In order to work with web's new type acquisition, you'll need to enable `TypeScript > Experimental > Tsserver > Web: Enable Project Wide Intellisense` in your VS Code options (`Ctrl-,`), you may need to reload the page. This happens when working in a regular `.js` file on a dependency without declared types. You should be able to open `file.js` and write something like `import lodash from 'lodash';` at the top of the file and, after a moment, get types and other intellisense features (like Go To Def/Source Def) working as expected. This scenario works off Tsserver's own Automatic Type Acquisition capabilities, and simulates a "global" types cache stored at `/vscode-global-typings/ts-nul-authority/project`, which is backed by an in-memory `MemFs` `FileSystemProvider`. ### Simulated `node_modules` For regular `.ts` files, instead of going through Tsserver's type acquisition, a separate `AutoInstallerFs` is used to create a "virtual" `node_modules` that extracts desired packages on demand, to an underlying `MemFs`. This will happen any time a filesystem operation is done inside a `node_modules` folder across any project in the workspace, and will use the "real" `package.json` (and, if present, `package-lock.json`) to resolve the dependency tree. A fallback is then set up such that when a URI like `memfs:/path/to/node_modules/lodash/lodash.d.ts` is accessed, that gets redirected to `vscode-node-modules:/ts-nul-authority/memfs/ts-nul-authority/path/to/node_modules/lodash/lodash.d.ts`, which will be sent to the `AutoInstallerFs`.
{ "source": "meltylabs/melty", "title": "extensions/typescript-language-features/web/README.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/typescript-language-features/web/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 2066 }
# Integration test ## Compile Make sure to run the following commands to compile and install dependencies: yarn --cwd test/integration/browser yarn --cwd test/integration/browser compile ## Run (inside Electron) scripts/test-integration.[sh|bat] All integration tests run in an Electron instance. You can specify to run the tests against a real build by setting the environment variables `INTEGRATION_TEST_ELECTRON_PATH` and `VSCODE_REMOTE_SERVER_PATH` (if you want to include remote tests). ## Run (inside browser) scripts/test-web-integration.[sh|bat] --browser [chromium|webkit] [--debug] All integration tests run in a browser instance as specified by the command line arguments. Add the `--debug` flag to see a browser window with the tests running. **Note**: you can enable verbose logging of playwright library by setting a `DEBUG` environment variable before running the tests (<https://playwright.dev/docs/debug#verbose-api-logs>) ## Debug All integration tests can be run and debugged from within VSCode (both Electron and Web) simply by selecting the related launch configuration and running them.
{ "source": "meltylabs/melty", "title": "test/integration/browser/README.md", "url": "https://github.com/meltylabs/melty/blob/main/test/integration/browser/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1137 }
# First # Second [b](/b.md) [b](../b.md) [b](./../b.md)
{ "source": "meltylabs/melty", "title": "extensions/markdown-language-features/test-workspace/sub/c.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/markdown-language-features/test-workspace/sub/c.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 56 }
<!-- Should highlight math blocks --> $$ \theta $$ **md** $$ \theta{ % comment $$ **md** $$ \relax{x}{1} = \int_{-\infty}^\infty \hat\xi\,e^{2 \pi i \xi x} \,d\xi % comment $$ **md** $ x = 1.1 \int_{a} $ **md** $ \begin{smallmatrix} 1 & 2 \\ 4 & 3 \end{smallmatrix} $ $ x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + a_4}}} $ $ \displaystyle {1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots }= \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1. $ <!-- Should highlight inline --> a **a** $$ \theta $$ aa a **a** a **a** $ \theta $ aa a **a** $ \theta $ $$ 1 \theta 1 1 $$ <!-- Should not highlight inline cases without whitespace --> $10 $20 **a** $10 $20 **a** **a** a $10 $20 a **a** a **a**$ \theta $aa a **a** a **a**$$ \theta $$aa a **a** <!-- Should be disabled in comments --> <!-- $$ \theta % comment $$ --> <!-- Should be disabled in fenced code blocks --> ```txt $$ \displaystyle \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) $$ ``` <!-- #128411 --> - list item **abc** $$ \begin{aligned} &\text{Any equation} \\ &\text {Inconsistent KaTeX keyword highlighting} \end{aligned} $$ **xyz** <!-- Support both \text{stuff} and \text {stuff} --> $$ \text{stuff} \text {stuff} $$ <!-- Should not highlight inside of raw code block --> $$ \frac{1}{2} $$ <!-- Should highlight leading and trailing equations on same line --> $$ \vec{a} \vec{a} \vec{a} $$ **md** $ \vec{a} \vec{a} \vec{a} $ **md** \vec{a} **md** $ \vec{a} \vec{a} = [2, 3] $ <!-- Should highlight inline blocks --> a **b** $$ **b** **md** a **b** $$ \frac{1}{2} $$ **b** **p** a **b** $$ \frac{1}{2} $$ **b** <!-- Should allow inline code to be followed by non word character #136584 --> Should be highlighted $\frac{1}{2}$. Should not be highlighted $\frac{1}{2}$text Should not be highlighted $\frac{1}{2}$10 <!-- Should not highlight dollar amount at start of line #136535 --> $12.45 $12.45 x x $12.45 <!-- Should not interpret text for skipped percent (\%) --> $$ \% Should not be highlighted $$
{ "source": "meltylabs/melty", "title": "extensions/vscode-colorize-tests/test/colorize-fixtures/md-math.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/vscode-colorize-tests/test/colorize-fixtures/md-math.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 2257 }
# h <pre><code> # a </code></pre> # h <pre> # a a</pre> # h
{ "source": "meltylabs/melty", "title": "extensions/vscode-colorize-tests/test/colorize-fixtures/test-33886.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/vscode-colorize-tests/test/colorize-fixtures/test-33886.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 63 }
# Header 1 # ## Header 2 ## ### Header 3 ### (Hashes on right are optional) ## Markdown plus h2 with a custom ID ## {#id-goes-here} [Link back to H2](#id-goes-here) ### Alternate heading styles: Alternate Header 1 ================== Alternate Header 2 ------------------ <!-- html madness --> <div class="custom-class" markdown="1"> <div> nested div </div> <script type='text/x-koka'> function( x: int ) { return x*x; } </script> This is a div _with_ underscores and a & <b class="bold">bold</b> element. <style> body { font: "Consolas" } </style> </div> * Bullet lists are easy too - Another one + Another one + nested list This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one line (or many), and can drone on for hours. Now some inline markup like _italics_, **bold**, and `code()`. Note that underscores in_words_are ignored. ````application/json { value: ["or with a mime type"] } ```` > Blockquotes are like quoted text in email replies >> And, they can be nested 1. A numbered list > Block quotes in list 2. Which is numbered 3. With periods and a space And now some code: // Code is just text indented a bit which(is_easy) to_remember(); And a block ~~~ // Markdown extra adds un-indented code blocks too if (this_is_more_code == true && !indented) { // tild wrapped code blocks, also not indented } ~~~ Text with two trailing spaces (on the right) can be used for things like poems ### Horizontal rules * * * * **** -------------------------- ![picture alt](/images/photo.jpeg "Title is optional") ## Markdown plus tables ## | Header | Header | Right | | ------ | ------ | -----: | | Cell | Cell | $10 | | Cell | Cell | $20 | * Outer pipes on tables are optional * Colon used for alignment (right versus left) ## Markdown plus definition lists ## Bottled water : $ 1.25 : $ 1.55 (Large) Milk Pop : $ 1.75 * Multiple definitions and terms are possible * Definitions can include multiple paragraphs too *[ABBR]: Markdown plus abbreviations (produces an <abbr> tag)
{ "source": "meltylabs/melty", "title": "extensions/vscode-colorize-tests/test/colorize-fixtures/test.md", "url": "https://github.com/meltylabs/melty/blob/main/extensions/vscode-colorize-tests/test/colorize-fixtures/test.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 2109 }
*italics*, **bold**, ``literal``. 1. A list 2. With items - With sub-lists ... - ... of things. 3. Other things definition list A list of terms and their definition Literal block:: x = 2 + 3 Section separators are all interchangeable. ===== Title ===== -------- Subtitle -------- Section 1 ========= Section 2 --------- Section 3 ~~~~~~~~~ | Keeping line | breaks. +-------------+--------------+ | Fancy table | with columns | +=============+==============+ | row 1, col 1| row 1, col 2 | +-------------+--------------+ ============ ============ Simple table with columns ============ ============ row 1, col1 row 1, col 2 ============ ============ Block quote is indented. This space intentionally not important. Doctest block >>> 2 +3 5 A footnote [#note]_. .. [#note] https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#footnotes Citation [cite]_. .. [cite] https://bing.com a simple link_. A `fancier link`_ . .. _link: https://docutils.sourceforge.io/ .. _fancier link: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html An `inline link <https://code.visualstudio.com>`__ . .. image:: https://code.visualstudio.com/assets/images/code-stable.png .. function: example() :module: mod :sub:`subscript` :sup:`superscript` .. This is a comment. .. And a bigger, longer comment. A |subst| of something. .. |subst| replace:: substitution
{ "source": "meltylabs/melty", "title": "extensions/vscode-colorize-tests/test/colorize-fixtures/test.rst", "url": "https://github.com/meltylabs/melty/blob/main/extensions/vscode-colorize-tests/test/colorize-fixtures/test.rst", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 1431 }
Tabstops -- With tabstops you can make the editor cursor move inside a snippet. Use `$1`, `$2` to specify cursor locations. The number is the order in which tabstops will be visited, whereas `$0` denotes the final cursor position. Multiple tabstops are linked and updated in sync. Placeholders -- Placeholders are tabstops with values, like `${1:foo}`. The placeholder text will be inserted and selected such that it can be easily changed. Placeholders can nested, like `${1:another ${2:placeholder}}`. Choice -- Placeholders can have choices as values. The syntax is a comma-separated enumeration of values, enclosed with the pipe-character, e.g. `${1|one,two,three|}`. When inserted and selected choices will prompt the user to pick one of the values. Variables -- With `$name` or `${name:default}` you can insert the value of a variable. When a variable isn't set its *default* or the empty string is inserted. When a variable is unknown (that is, its name isn't defined) the name of the variable is inserted and it is transformed into a placeholder. The following variables can be used: * `TM_SELECTED_TEXT` The currently selected text or the empty string * `TM_CURRENT_LINE` The contents of the current line * `TM_CURRENT_WORD` The contents of the word under cursor or the empty string * `TM_LINE_INDEX` The zero-index based line number * `TM_LINE_NUMBER` The one-index based line number * `TM_FILENAME` The filename of the current document * `TM_FILENAME_BASE` The filename of the current document without its extensions * `TM_DIRECTORY` The directory of the current document * `TM_FILEPATH` The full file path of the current document * `RELATIVE_FILEPATH` The relative (to the opened workspace or folder) file path of the current document * `CLIPBOARD` The contents of your clipboard * `WORKSPACE_NAME` The name of the opened workspace or folder * `WORKSPACE_FOLDER` The path of the opened workspace or folder For inserting the current date and time: * `CURRENT_YEAR` The current year * `CURRENT_YEAR_SHORT` The current year's last two digits * `CURRENT_MONTH` The month as two digits (example '02') * `CURRENT_MONTH_NAME` The full name of the month (example 'July') * `CURRENT_MONTH_NAME_SHORT` The short name of the month (example 'Jul') * `CURRENT_DATE` The day of the month * `CURRENT_DAY_NAME` The name of day (example 'Monday') * `CURRENT_DAY_NAME_SHORT` The short name of the day (example 'Mon') * `CURRENT_HOUR` The current hour in 24-hour clock format * `CURRENT_MINUTE` The current minute * `CURRENT_SECOND` The current second * `CURRENT_SECONDS_UNIX` The number of seconds since the Unix epoch For inserting random values: * `RANDOM` 6 random Base-10 digits * `RANDOM_HEX` 6 random Base-16 digits * `UUID` A Version 4 UUID Variable-Transform -- Transformations allow to modify the value of a variable before it is being inserted. The definition of a transformation consists of three parts: 1. A regular expression that is matched against the value of a variable, or the empty string when the variable cannot be resolved. 2. A "format string" that allows to reference matching groups from the regular expression. The format string allows for conditional inserts and simple modifications. 3. Options that are passed to the regular expression The following sample inserts the name of the current file without its ending, so from `foo.txt` it makes `foo`. ``` ${TM_FILENAME/(.*)\..+$/$1/} | | | | | | | |-> no options | | | | | |-> references the contents of the first | | capture group | | | |-> regex to capture everything before | the final `.suffix` | |-> resolves to the filename ``` Placeholder-Transform -- Like a Variable-Transform, a transformation of a placeholder allows changing the inserted text for the placeholder when moving to the next tab stop. The inserted text is matched with the regular expression and the match or matches - depending on the options - are replaced with the specified replacement format text. Every occurrence of a placeholder can define its own transformation independently using the value of the first placeholder. The format for Placeholder-Transforms is the same as for Variable-Transforms. The following sample removes an underscore at the beginning of the text. `_transform` becomes `transform`. ``` ${1/^_(.*)/$1/} | | | |-> No options | | | | | |-> Replace it with the first capture group | | | |-> Regular expression to capture everything after the underscore | |-> Placeholder Index ``` Grammar -- Below is the EBNF for snippets. ``` any ::= tabstop | placeholder | choice | variable | text tabstop ::= '$' int | '${' int '}' | '${' int transform '}' placeholder ::= '${' int ':' any '}' choice ::= '${' int '|' text (',' text)* '|}' variable ::= '$' var | '${' var }' | '${' var ':' any '}' | '${' var transform '}' transform ::= '/' regex '/' (format | text)+ '/' options format ::= '$' int | '${' int '}' | '${' int ':' '/upcase' | '/downcase' | '/capitalize' | '/camelcase' | '/pascalcase' '}' | '${' int ':+' if '}' | '${' int ':?' if ':' else '}' | '${' int ':-' else '}' | '${' int ':' else '}' regex ::= JavaScript Regular Expression value (ctor-string) options ::= JavaScript Regular Expression option (ctor-options) var ::= [_a-zA-Z] [_a-zA-Z0-9]* int ::= [0-9]+ text ::= .* ``` Escaping is done with with the `\` (backslash) character. The rule of thumb is that you can escape characters that otherwise would have a syntactic meaning, e.g within text you can escape `$`, `}` and `\`, within choice elements you can escape `|`, `,` and `\`, and within transform elements you can escape `/` and `\`. Also note that in JSON you need to escape `\` as `\\`.
{ "source": "meltylabs/melty", "title": "src/vs/editor/contrib/snippet/browser/snippet.md", "url": "https://github.com/meltylabs/melty/blob/main/src/vs/editor/contrib/snippet/browser/snippet.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 6021 }
# Diffing Fixture Tests Every folder in `fixtures` represents a test. The file that starts with `1.` is diffed against the file that starts with `2.`. Use `tst` instead of `ts` to avoid compiler/linter errors for typescript diff files. * Missing `*.expected.diff.json` are created automatically (as well as an `*.invalid.diff.json` file). * If the actual diff does not equal the expected diff, the expected file is updated automatically. The previous value of the expected file is written to `*.invalid.diff.json`. * The test will fail if there are any `*.invalid.diff.json` files. This makes sure that the test keeps failing even if it is run a second time. When changing the diffing algorithm, run the fixture tests, review the diff of the `*.expected.diff.json` files and delete all `*.invalid.diff.json` files.
{ "source": "meltylabs/melty", "title": "src/vs/editor/test/node/diffing/README.md", "url": "https://github.com/meltylabs/melty/blob/main/src/vs/editor/test/node/diffing/README.md", "date": "2024-09-02T00:01:16", "stars": 5355, "description": "Chat first code editor. To download the packaged app:", "file_size": 817 }
# Changelog ## 2025-02-13 ### New Features - All chats will be saved in the db table chat_messages ### Breaking Changes - Remove config.debug_resp flag, you can only use debug endpoint for debugging - Remove config.autonomous_memory_public, the autonomous task will always use chat id "autonomous" ## 2025-02-11 ### Improvements - Twitter account link support redirect after authorization ## 2025-02-05 ### New Features - Acolyt integration ## 2025-02-04 ### Improvements - split scheduler to new service - split singleton to new service ## 2025-02-03 ### Breaking Changes - Use async everywhere ## 2025-02-02 ### Bug Fixes - Fix bugs in twitter account binding ## 2025-02-01 ### New Features - Readonly API for better performance ## 2025-01-30 ### New Features - LLM creativity in agent config - Agent memory cleanup by token count ## 2025-01-28 ### New Features - Enso tx CDP wallet broadcast ## 2025-01-27 ### New Features - Sentry Error Tracking ### Improvements - Better short memory management, base on token count now - Better logs ## 2025-01-26 ### Improvements - If you open the jwt verify of admin api, it now ignore the reqest come from internal network - Improve the docker compose tutorial, comment the twitter and tg entrypoint service by default ### Break Changes - The new docker-compose.yml change the service name, add "intent-" prefix to all services ## 2025-01-25 ### New Features - DeepSeek LLM Support! - Enso skills now use CDP wallet - Add an API for frontend to link twitter account to an agent ## 2025-01-24 ### Improvements - Refactor telegram services - Save telegram user info to db when it linked to an agent ### Bug Fixes - Fix bug when twitter token refresh some skills will not work ## 2025-01-23 ### Features - Chat API released, you can use it to support a web UI ### Improvements - Admin API: - When create agent, id is not required now, we will generate a random id if not provided - All agent response data is improved, it has more data now - ENSO Skills improved ## 2025-01-22 ### Features - If admin api enable the JWT authentication, the agent can only updated by its owner - Add upstream_id to Agent, when other service call admin API, can use this field to keep idempotent, or track the agent ## 2025-01-21 ### Features - Enso add network skill ### Improvements - Enso skills behavior improved ## 2025-01-20 ### Features - Twitter skills now get more context, agent can know the author of the tweet, the thread of the tweet, and more. ## 2025-01-19 ### Improvements - Twitter skills will not reply to your own tweets - Twitter docs improved ## 2025-01-18 ### Improvements - Twitter rate limit only affected when using OAuth - Better twitter rate limit numbers - Slack notify improved ## 2025-01-17 ### New Features - Add twitter skill rate limit ### Improvements - Better doc/create_agent.sh - OAuth 2.0 refresh token failure handling ### Bug Fixes - Fix bug in twitter search skill ## 2025-01-16 ### New Features - Twitter Follow User - Twitter Like Tweet - Twitter Retweet - Twitter Search Tweets ## 2025-01-15 ### New Features - Twitter OAuth 2.0 Authorization Code Flow with PKCE - Twitter access token auto refresh - AgentData table and AgentStore interface ## 2025-01-14 ### New Features - ENSO Skills ## 2025-01-12 ### Improvements - Better architecture doc: [Architecture](docs/architecture.md) ## 2025-01-09 ### New Features - Add IntentKitSkill abstract class, for now, it has a skill store interface out of the box - Use skill store in Twitter skills, fetch skills will store the last processed tweet ID, prevent duplicate processing - CDP Skills Filter in Agent, choose the skills you want only, the less skills, the better performance ### Improvements - Add a document for skill contributors: [How to add a new skill](docs/contributing/skills.md) ## 2025-01-08 ### New Features - Add `prompt_append` to Agent, it will be appended to the entire prompt as system role, it has stronger priority - When you use web debug mode, you can see the entire prompt sent to the AI model - You can use new query param `thread` to debug any conversation thread ## 2025-01-07 ### New Features - Memory Management ### Improvements - Refactor the core ai agent creation ### Bug Fixes - Fix bug that resp debug model is not correct ## 2025-01-06 ### New Features - Optional JWT Authentication for admin API ### Improvements - Refactor the core ai agent engine for better architecture - Telegram entrypoint greeting message ### Bug Fixes - Fix bug that agent config update not taking effect sometimes ## 2025-01-05 ### Improvements - Telegram entrypoint support regenerate token - Telegram entrypoint robust error handling ## 2025-01-03 ### Improvements - Telegram entrypoint support dynamic enable and disable - Better conversation behavior about the wallet ## 2025-01-02 ### New Features - System Prompt, It will affect all agents in a deployment. - Nation number in Agent model ### Improvements - Share agent memory between all public entrypoints - Auto timestamp in db model ### Bug Fixes - Fix bug in db create from scratch ## 2025-01-01 ### Bug Fixes - Fix Telegram group bug ## 2024-12-31 ### New Features - Telegram Entrypoint ## 2024-12-30 ### Improvements - Twitter Integration Enchancement ## 2024-12-28 ### New Features - Twitter Entrypoint - Admin cron for quota clear - Admin API get all agents ### Improvements - Change lint tools to ruff - Improve CI - Improve twitter skills ### Bug Fixes - Fix bug in db base code ## 2024-12-27 ### New Features - Twitter Skills - Get Mentions - Get Timeline - Post Tweet - Reply Tweet ### Improvements - CI/CD refactoring for better security ## 2024-12-26 ### Improvements - Change default plan to "self-hosted" from "free", new agent now has 9999 message limit for testing - Add a flag "DEBUG_RESP", when set to true, the Agent will respond with thought processes and time costs - Better DB session management ## 2024-12-25 ### Improvements - Use Poetry as package manager - Docker Compose tutorial in readme ## 2024-12-24 ### New Features - Multiple Agent Support - Autonomous Agent Management - Blockchain Integration (CDP for now, will add more) - Extensible Skill System - Extensible Plugin System
{ "source": "crestalnetwork/intentkit", "title": "CHANGELOG.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/CHANGELOG.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 6307 }
# Contributing to IntentKit We love your input! We want to make contributing to IntentKit as easy and transparent as possible, whether it's: - Reporting a bug - Discussing the current state of the code - Submitting a fix - Proposing new features - Becoming a maintainer ## We Develop with Github We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. ## Pull Requests Process 1. Fork the repo and create your branch from `main`. 2. If you've added code that should be tested, add tests. 3. If you've changed APIs, update the documentation. 4. Ensure the test suite passes. 5. Make sure your code lints. 6. Issue that pull request! ## Any contributions you make will be under the MIT Software License In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. ## Report bugs using Github's [issue tracker](https://github.com/crestalnetwork/intentkit/issues) We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/crestalnetwork/intentkit/issues/new); it's that easy! ## Write bug reports with detail, background, and sample code **Great Bug Reports** tend to have: - A quick summary and/or background - Steps to reproduce - Be specific! - Give sample code if you can. - What you expected would happen - What actually happens - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) ## License By contributing, you agree that your contributions will be licensed under its MIT License.
{ "source": "crestalnetwork/intentkit", "title": "CONTRIBUTING.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/CONTRIBUTING.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 1709 }
# Development ## Quick Start ### Docker (Recommended) 0. Install [Docker](https://docs.docker.com/get-started/get-docker/). 1. Create a new directory and navigate into it: ```bash mkdir intentkit && cd intentkit ``` 2. Download the required files: ```bash # Download docker-compose.yml curl -O https://raw.githubusercontent.com/crestalnetwork/intentkit/main/docker-compose.yml # Download example environment file curl -O https://raw.githubusercontent.com/crestalnetwork/intentkit/main/example.env ``` 3. Set up environment: ```bash # Rename example.env to .env mv example.env .env # Edit .env file and add your configuration # Make sure to set OPENAI_API_KEY ``` 4. Start the services: ```bash docker compose up ``` 5. To create your first agent, check out the [agent creation guide](docs/create_agent.md) for development. 6. Try it out: ```bash curl "http://127.0.0.1:8000/admin/chat?q=Hello" ``` In terminal, curl cannot auto escape special characters, so you can use browser to test. Just copy the URL to your browser, replace "Hello" with your words. ### Local Development 0. Python 3.11-3.12 are supported versions, and it's recommended to use [3.12](https://www.python.org/downloads/). 1. Clone the repository: ```bash git clone https://github.com/crestalnetwork/intentkit.git cd intentkit ``` 2. Set up your environment: If you haven't installed [poetry](https://python-poetry.org/), please [install](https://python-poetry.org/docs/#installation) it first. We recommend manually creating a venv; otherwise, the venv created automatically by Poetry may not meet your needs. ```bash python3.12 -m venv .venv source .venv/bin/activate poetry install --with dev ``` 3. Configure your environment: Read [Configuration](docs/configuration.md) for detailed settings. Then create your local .env file. ```bash cp example.env .env # Edit .env with your configuration ``` 4. Run the application: ```bash # Run the API server in development mode uvicorn app.api:app --reload # Run the autonomous agent scheduler python -m app.autonomous ``` Refer to "To create your first agent" and "Try it out" in the Docker section.
{ "source": "crestalnetwork/intentkit", "title": "DEVELOPMENT.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/DEVELOPMENT.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 2133 }
# IntentKit <div align="center"> <img src="docs/images/intentkit_banner.png" alt="IntentKit by Crestal" width="100%" /> </div> IntentKit is an autonomous agent framework that enables the creation and management of AI agents with various capabilities including blockchain interaction, social media management, and custom skill integration. ## Alpha Warning This project is currently in alpha stage and is not recommended for production use. ## Features - 🤖 Multiple Agent Support - 🔄 Autonomous Agent Management - 🔗 Blockchain Integration (EVM chains first) - 🐦 Social Media Integration (Twitter, Telegram, and more) - 🛠️ Extensible Skill System - 🔌 Extensible Plugin System (WIP) ## Architecture ``` Entrypoints │ │ │ Twitter/Telegram & more │ └──────────────┬──────────────┘ │ Storage: ────┐ │ ┌──── Skills: │ │ │ Agent Config │ ┌───────────────▼────────────────┐ │ Chain Integration │ │ │ │ Credentials │ │ │ │ Wallet Management │ │ The Agent │ │ Personality │ │ │ │ On-Chain Actions │ │ │ │ Memory │ │ Powered by LangGraph │ │ Internet Search │ │ │ │ Skill State │ └────────────────────────────────┘ │ Image Processing ────┘ └──── More and More... ┌──────────────────────────┐ │ │ │ Agent Config & Memory │ │ │ └──────────────────────────┘ ``` The architecture is a simplified view, and more details can be found in the [Architecture](docs/architecture.md) section. ## Development Read [Development Guide](DEVELOPMENT.md) to get started with your setup. ## Documentation Check out [Documentation](docs/) before you start. ## Project Structure - [abstracts/](abstracts/): Abstract classes and interfaces - [app/](app/): Core application code - [core/](app/core/): Core modules - [services/](app/services/): Services - [entrypoints/](app/entrypoints/): Entrypoints means the way to interact with the agent - [admin/](app/admin/): Admin logic - [config/](app/config/): Configurations - [api.py](app/api.py): REST API server - [autonomous.py](app/autonomous.py): Autonomous agent scheduler - [singleton.py](app/singleton.py): Singleton agent scheduler - [scheduler.py](app/scheduler.py): Scheduler for periodic tasks - [readonly.py](app/readonly.py): Readonly entrypoint - [twitter.py](app/twitter.py): Twitter listener - [telegram.py](app/telegram.py): Telegram listener - [models/](models/): Database models - [skills/](skills/): Skill implementations - [plugins/](plugins/): Reserved for Plugin implementations - [utils/](utils/): Utility functions ## Contributing Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting a pull request. ### Contribute Skills If you want to add a skill collection, follow these steps: 1. Create a new skill collection in the [skills/](skills/) directory 2. Implement the skill interface 3. Register the skill in `skills/YOUR_SKILL_COLLECTION/__init__.py` If you want to add a simple skill, follow these steps: 1. Create a new skill in the [skills/common/](skills/common/) directory 2. Register the skill in [skills/common/\_\_init\_\_.py](skills/common/__init__.py) See the [Skill Development Guide](docs/contributing/skills.md) for more information. ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
{ "source": "crestalnetwork/intentkit", "title": "README.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/README.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 4956 }
# Security Policy ## Alpha Stage Warning ⚠️ IntentKit is currently in alpha stage. While we take security seriously, the software may contain unknown vulnerabilities. Use at your own risk and not recommended for production environments without thorough security review. ## Reporting a Vulnerability We take the security of IntentKit seriously. If you believe you have found a security vulnerability, please report it to us as described below. **Please do NOT report security vulnerabilities through public GitHub issues.** Instead, please report them via email to [[email protected]](mailto:[email protected]) with the following information: 1. Description of the vulnerability 2. Steps to reproduce the issue 3. Potential impact 4. Suggested fix (if any) You should receive a response within 48 hours. If for some reason you do not, please follow up via email to ensure we received your original message. ## Security Best Practices ### API Keys and Credentials 1. **Environment Variables** - Never commit API keys or credentials to version control - Use environment variables or secure secret management - Follow the example in `example.env` 2. **Access Control** - Implement proper authentication for your deployment - Use secure session management - Regularly rotate API keys and credentials 3. **Network Security** - Deploy behind a reverse proxy with SSL/TLS - Use firewalls to restrict access - Monitor for unusual traffic patterns ### Agent Security 1. **Quota Management** - Always implement rate limiting - Monitor agent usage patterns - Set appropriate quotas for your use case 2. **Tool Access** - Carefully review tool permissions - Implement tool-specific rate limiting - Monitor tool usage and audit logs 3. **Autonomous Execution** - Review autonomous prompts carefully - Implement safeguards for autonomous actions - Monitor autonomous agent behavior ### Database Security 1. **Connection Security** - Use strong passwords - Enable SSL for database connections - Restrict database access to necessary operations 2. **Data Protection** - Encrypt sensitive data at rest - Implement proper backup procedures - Regular security audits ### Deployment Security 1. **Container Security** - Keep base images updated - Run containers as non-root - Scan containers for vulnerabilities 2. **Infrastructure** - Use secure infrastructure configurations - Implement logging and monitoring - Regular security updates ## Known Limitations 1. **Alpha Stage Limitations** - Security features may be incomplete - APIs may change without notice - Some security controls are still in development 2. **Integration Security** - Third-party integrations may have their own security considerations - Review security implications of enabled integrations - Monitor integration access patterns ## Security Updates Security updates will be released as soon as possible after a vulnerability is confirmed. Updates will be published: 1. As GitHub releases with security notes 2. Via security advisories for critical issues 3. Through our notification system for registered users ## Secure Development When contributing to IntentKit, please follow these security guidelines: 1. **Code Review** - All code must be reviewed before merging - Security-sensitive changes require additional review - Follow secure coding practices 2. **Dependencies** - Keep dependencies up to date - Review security advisories for dependencies - Use dependency scanning tools 3. **Testing** - Include security tests where applicable - Test for common vulnerabilities - Validate input and output handling ## Version Support Given the alpha stage of the project, we currently: - Support only the latest release - Provide security updates for critical vulnerabilities - Recommend frequent updates to the latest version ## Acknowledgments We would like to thank the following for their contributions to our security: - All security researchers who responsibly disclose vulnerabilities - Our community members who help improve our security - Contributors who help implement security features ## Contact For any questions about this security policy, please contact: - Email: [[email protected]](mailto:[email protected])
{ "source": "crestalnetwork/intentkit", "title": "SECURITY.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/SECURITY.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 4380 }
# Issue Template ## Description Please provide a clear and concise description of the issue. ## Steps to Reproduce 1. Step one 2. Step two 3. Step three ## Expected Behavior Describe what you expected to happen. ## Actual Behavior Describe what actually happened. ## Additional Context Add any other context about the problem here.
{ "source": "crestalnetwork/intentkit", "title": ".github/ISSUE_TEMPLATE.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/.github/ISSUE_TEMPLATE.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 336 }
## Description Please include a summary of the changes and the related issue. ## Type of Change - [ ] Bugfix - [ ] New Feature - [ ] Improvement - [ ] Documentation Update ## Checklist - [ ] I have read the contributing guidelines. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. ## Related Issue Closes #[issue number]
{ "source": "crestalnetwork/intentkit", "title": ".github/PULL_REQUEST_TEMPLATE.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/.github/PULL_REQUEST_TEMPLATE.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 366 }
# Documentation ## General - [IntentKit Architecture](architecture.md) - [API Docs](api.md) - [How to Guides](how_to/) ## Developing - [Configuration](configuration.md) - [LLM](llm.md) - [Create an Agent](create_agent.md) ## Contributing - [Building Skills](contributing/skills.md) ## Skills - [X](skills/x.md) - [Coinbase Developer Platform](skills/cdp.md)
{ "source": "crestalnetwork/intentkit", "title": "docs/README.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/README.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 365 }
# API Documentation ## REST API Endpoints ### Agent Management #### GET `/{aid}/chat` Chat with an agent. **Parameters:** - `aid` (path): Agent ID - `q` (query): Input message **Response:** ```text [ You: ] your message ------------------- [ Agent: ] agent response ------------------- agent cost: 0.123 seconds ``` **Error Responses:** - `404`: Agent not found - `429`: Quota exceeded - `500`: Internal server error #### POST `/agents` Create or update an agent. **Request Body:** ```json { "id": "my-agent", "name": "My Agent", "model": "gpt-4", "prompt": "You are a helpful assistant", "autonomous_enabled": false, "autonomous_minutes": null, "autonomous_prompt": null, "cdp_enabled": false, "twitter_enabled": false, "crestal_skills": ["skill1", "skill2"], "common_skills": ["skill3"] } } ``` **Response:** ```json { "id": "my-agent", "name": "My Agent", ... } ``` ### Health Check #### GET `/health` Check API health status. **Response:** ```json { "status": "healthy" } ``` ## Autonomous Agent Configuration Autonomous agents can be configured with the following parameters: - `autonomous_enabled`: Enable autonomous execution - `autonomous_minutes`: Interval between executions - `autonomous_prompt`: Prompt for autonomous actions Example configuration: ```json { "id": "auto-agent", "autonomous_enabled": true, "autonomous_minutes": 60, "autonomous_prompt": "Check for new updates and summarize them" } ``` ## Quota Management Each agent has quota limits for: - Total messages - Monthly messages - Daily messages - Total autonomous executions - Monthly autonomous executions Quota errors include detailed information about current usage and limits.
{ "source": "crestalnetwork/intentkit", "title": "docs/api.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/api.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 1719 }
# IntentKit Architecture ## Overview IntentKit is built with a modular architecture that separates concerns into distinct components: ![Architecture](arch.jpg) ## Components ### Entrypoint Layer The entrypoint layer serves as the interface between the outside world and the Agent. It provides various integration points including Twitter and Telegram, along with autonomous execution capabilities. This layer includes adapters to handle input/output transformations, rate limiting, and modifications to ensure smooth communication between external services and the internal system. ### LangGraph Layer At the heart of IntentKit lies the LangGraph layer, which orchestrates the AI processing pipeline. It manages the language model interactions, prompt engineering, and tool execution flow. The layer maintains both thread-specific memory for ongoing conversations and a broader agent memory system, enabling contextual awareness and persistent knowledge across interactions. ### Processing Layer Skills and Memory Runtime ### Storage Layer The storage layer provides persistent data management across the system. It maintains agent configurations, securely stores credentials, preserves agent state information, and manages the memory store. This layer ensures that all persistent data is properly organized, secured, and readily accessible when needed. ## The Flow ![Flow](agent.webp) ## Key Design Decisions 1. **Agent Caching** - Agents are cached in memory for performance - Cache is invalidated on configuration changes 2. **Tool Management** - Tools are loaded dynamically based on agent configuration - Each tool is isolated and independently maintainable 3. **Error Handling** - Graceful degradation on tool failures - Comprehensive logging for debugging - Quota management to prevent abuse 4. **State Management** - PostgreSQL for persistent storage - In-memory caching for performance - Transaction management for data consistency
{ "source": "crestalnetwork/intentkit", "title": "docs/architecture.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/architecture.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 1985 }
# Configuration ## IntentKit configuration The application can be configured using environment variables or AWS Secrets Manager. Key configuration options: - `ENV`: Environment (local or others) - `DB_*`: PostgreSQL Database configuration (Required) - `OPENAI_API_KEY`: OpenAI API key for agent interactions (Required) - `CDP_*`: Coinbase Developer Platform configuration (Optional) See [example.env](../example.env) for all available options.
{ "source": "crestalnetwork/intentkit", "title": "docs/configuration.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/configuration.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 447 }
# How to create an agent ## Your First Agent Use the following bash script to create your first agent: ```bash curl -X POST http://127.0.0.1:8000/agents \ -H "Content-Type: application/json" \ -d '{ "id": "admin", "name": "Admin", "prompt": "You are an autonomous AI agent. Respond to user queries." }' ``` ## Advanced Agent Creation Script There are many fields that can control an agent's behavior. We have provided a [helper shell](create_agent.sh) for your convenience. To use it, modify the config fields in the script as necessary, then run: ```bash ./create_agent.sh ``` ## The Prompt In agent config, there are 3 fields about prompt, they are `prompt`, `prompt_append` and `autonomous_prompt`. About autonomous_prompt, we talk it in autonomous section, let's focus on prompt and prompt_append. ### LLM Interaction The models cannot remember anything, so every time we interact with it, we have to provide all the background information and interaction context (that is, additional knowledge and memory). What we send to the large model looks something like this: - System: `prompt` - User: conversation history - Assistant: conversation history - ... - User: conversation history - Assistant: conversation history - User: currently being said - System: `prompt_append` (Optional) The content of the system role is to inform the AI that it is being addressed by an administrator, so it should not treat you like an user. However, your permissions are not necessarily always higher than those of regular users; you simply have the advantage of being the first to set various rules for the AI to follow according to your logic. For example, you can tell it that the system role has the highest authority, and if the user role requests an action that violates the rules set by the system role, you should deny it. ### Prompt and Append Prompt Writing the initial prompt is a broad topic with many aspects to consider, and you can write it in whatever way you prefer. Here, I will only address the prompt_append. We’ve found that if you emphasize the most important rules again at the end, it significantly increases the likelihood of the AI following your rules. You can declare or repeat your core rules in this section. One last tip: the AI will perceive this information as having been inserted just before it responds to the user, so avoid saying anything like “later” in this instruction, as that “later” will never happen for the AI.
{ "source": "crestalnetwork/intentkit", "title": "docs/create_agent.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/create_agent.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 2514 }
# LLMs ## Supported Models For now, we support all models from [OpenAI](https://openai.com/) and [DeepSeek](https://www.deepseek.com/). We will support more models in the future.
{ "source": "crestalnetwork/intentkit", "title": "docs/llm.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/llm.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 181 }
# Building Skills for IntentKit This guide will help you create new skills for IntentKit. Skills are the building blocks that give agents their capabilities. ## Overview Skill can be enabled in the Agent configuration. The Agent is aware of all the skills it possesses and will spontaneously use them at appropriate times, utilizing the output of the skills for subsequent reasoning or decision-making. The Agent can call multiple skills in a single interaction based on the needs. A skill in IntentKit is a specialized tool that inherits from `IntentKitSkill` (which extends LangChain's `BaseTool`). Each skill provides specific functionality that agents can use to interact with external services or perform specific tasks. ## Where to add skills The skills are all in the `skills/` directory. In the future, it may also be in the `skills/` directory of the plugin root. Overall, we categorize as follows: * Common Skills: Skills located in the skills/common/ directory * First Class Skills: Skills found in other folders under skills/ * Skill Sets: Located in the skill-sets directory * Plugin Skills: Located in the plugin repositories We need to choose the placement of skills so that they can be configured in the Agent settings and loaded. We can judge based on the following principles: 1. If the basic capabilities provided by IntentKitSkill are sufficient, then it can be placed in common skills. 2. If additional initialization steps are needed (such as initializing an SDK client) or extra configuration information is required, then it can be placed in skill sets, which support additional configuration and use of that configuration for extra initialization. 3. If new Python dependencies need to be introduced, then they should be placed in a plugin. 4. First Class Skills can support any customizations because they require adding an extra initialization code segment in app/core/engine, while the first three only need the skill code itself. When a skills category becomes common enough, we can promote it to First Class Skills. ## Basic Structure Every skill consists of at least two components: 1. A skill class that inherits from `IntentKitSkill` 2. Input/Output models using Pydantic ### Example Structure ```python from pydantic import BaseModel from abstracts.skill import IntentKitSkill class MySkillInput(BaseModel): """Input parameters for your skill""" param1: str param2: int = 10 # with default value class MySkillOutput(BaseModel): """Output format for your skill""" result: str error: str | None = None class MySkill(IntentKitSkill): name: str = "my_skill_name" description: str = "Description of what your skill does" args_schema: Type[BaseModel] = MySkillInput def _run(self, param1: str, param2: int = 10) -> MySkillOutput: try: # Your skill implementation here result = f"Processed {param1} {param2} times" return MySkillOutput(result=result) except Exception as e: return MySkillOutput(result="", error=str(e)) async def _arun(self, param1: str, param2: int = 10) -> MySkillOutput: """Async implementation if needed""" return await self._run(param1, param2) ``` ## Key Components ### 1. Input/Output Models - Use Pydantic models to define input parameters and output structure - Input model will be used as `args_schema` in your skill - Output model ensures consistent return format ### 2. Skill Class Required attributes: - `name`: Unique identifier for your skill - `description`: Clear description of what the skill does - `args_schema`: Pydantic model for input validation Required methods: - `_run`: Synchronous implementation of your skill - `_arun`: Asynchronous implementation (if needed) ### 3. State Management Skills have access to persistent storage through `self.store`, which implements `SkillStoreABC`: ```python # Store agent-specific data self.skill_store.save_agent_skill_data( self.agent_id, # automatically provided self.name, # your skill name "key_name", # custom key for your data {"data": "value"} # any JSON-serializable data ) # Retrieve agent-specific data data = await self.skill_store.get_agent_skill_data( self.agent_id, self.name, "key_name" ) # Store thread-specific data await self.skill_store.save_thread_skill_data( thread_id, # provided in context self.agent_id, self.name, "key_name", {"data": "value"} ) # Retrieve thread-specific data data = await self.skill_store.get_thread_skill_data( thread_id, self.name, "key_name" ) ``` ## Best Practices 1. **Error Handling** - Always wrap your main logic in try-except blocks - Return errors through your output model rather than raising exceptions - Provide meaningful error messages 2. **Documentation** - Add detailed docstrings to your skill class and methods - Document input parameters and return values - Include usage examples in docstrings 3. **Input Validation** - Use Pydantic models to validate inputs - Set appropriate field types and constraints - Provide default values when sensible 4. **State Management** - Use `self.store` for persistent data storage - Keep agent-specific data separate from thread-specific data - Use meaningful keys for stored data 5. **Async Support** - Implement `_arun` for skills that perform I/O operations - Use async libraries when available - Maintain consistent behavior between sync and async implementations ## Example: Twitter Timeline Skill Here's a real-world example of a skill that fetches tweets from a user's timeline: ```python class TwitterGetTimelineInput(BaseModel): """Empty input model as no parameters needed""" pass class Tweet(BaseModel): """Model representing a Twitter tweet""" id: str text: str author_id: str created_at: datetime referenced_tweets: list[dict] | None = None attachments: dict | None = None class TwitterGetTimelineOutput(BaseModel): tweets: list[Tweet] error: str | None = None class TwitterGetTimeline(TwitterBaseTool): name: str = "twitter_get_timeline" description: str = "Get tweets from the authenticated user's timeline" args_schema: Type[BaseModel] = TwitterGetTimelineInput def _run(self) -> TwitterGetTimelineOutput: try: # Get last processed tweet ID from storage last = self.store.get_agent_skill_data(self.agent_id, self.name, "last") since_id = last.get("since_id") if last else None # Fetch timeline timeline = self.client.get_home_timeline(...) # Process and return results result = [Tweet(...) for tweet in timeline.data] # Update storage with newest tweet ID if timeline.meta: self.store.save_agent_skill_data( self.agent_id, self.name, "last", {"since_id": timeline.meta["newest_id"]} ) return TwitterGetTimelineOutput(tweets=result) except Exception as e: return TwitterGetTimelineOutput(tweets=[], error=str(e)) ``` ## Testing Your Skill 1. Create unit tests in the `tests/skills` directory 2. Test both success and error cases 3. Mock external services and dependencies 4. Verify state management behavior 5. Test both sync and async implementations ## Contributing 1. Create your skill in the `skills/` directory 2. Follow the structure of existing skills 3. Add comprehensive tests 4. Update documentation 5. Submit a pull request For more examples, check the existing skills in the `skills/` directory.
{ "source": "crestalnetwork/intentkit", "title": "docs/contributing/skills.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/contributing/skills.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 7732 }
# Agent's Memory Cleanup Agent memory can be cleared using a request that requires an admin JWT token for authentication. This functionality allows for granular control: - **Clear all agent memory**: Reset the entire memory state of the agent. - **Clear thread memory**: Clear memory specifically associated with a particular thread within the agent. > The `thread_id` parameter is used to specify the target thread for memory clearing. ```bash curl --location '{base_url}/agents/clean-memory' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {jwt_token}' \ --data '{ "agent_id": "local", "thread_id": "chat1", "clean_agent_memory": true, "clean_skills_memory": true }' ```
{ "source": "crestalnetwork/intentkit", "title": "docs/how_to/clean_memory.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/how_to/clean_memory.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 722 }
# How to ## Contents - [Clean Agent or Thread memory](clean_memory.md)
{ "source": "crestalnetwork/intentkit", "title": "docs/how_to/readme.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/how_to/readme.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 72 }
# Coinbase Developer Platform ## CDP AgentKit All CDP Skills are supported by [AgentKit](https://github.com/coinbase/agentkit/). AgentKit supports the following tools: ``` WalletActionProvider_get_balance WalletActionProvider_get_wallet_details WalletActionProvider_native_transfer CdpApiActionProvider_address_reputation CdpApiActionProvider_request_faucet_funds CdpWalletActionProvider_deploy_contract CdpWalletActionProvider_deploy_nft CdpWalletActionProvider_deploy_token CdpWalletActionProvider_trade PythActionProvider_fetch_price PythActionProvider_fetch_price_feed_id BasenameActionProvider_register_basename ERC20ActionProvider_get_balance ERC20ActionProvider_transfer Erc721ActionProvider_get_balance Erc721ActionProvider_mint Erc721ActionProvider_transfer WethActionProvider_wrap_eth MorphoActionProvider_deposit MorphoActionProvider_withdraw SuperfluidActionProvider_create_flow SuperfluidActionProvider_delete_flow SuperfluidActionProvider_update_flow WowActionProvider_buy_token WowActionProvider_create_token WowActionProvider_sell_token ```
{ "source": "crestalnetwork/intentkit", "title": "docs/skills/cdp.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/skills/cdp.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 1060 }
# Goat SDK Integration All GOAT Skills are supported by [GOAT](https://github.com/goat-sdk/goat/). The list of supported tools can be found [here](https://github.com/goat-sdk/goat/tree/main/python#plugins). ## Sample configuration ```json { "chains": { "base" } } ``` ## Sample Skills list ```json { "inch1": { "api_key": "1inch api key string" }, "coingecko": { "api_key": "coingecko api key string" }, "allora": { "api_key": "allora api key string", "api_root": "https://api.upshot.xyz/v2/allora" }, "dexscreener": {}, "erc20": { "tokens": [ "goat_plugins.erc20.token.USDC" ] }, "farcaster": { "api_key": "farcaster api key string", "base_url": "https://farcaster.xyz" }, "jsonrpc": { "endpoint": "https://eth.llamarpc.com" }, "jupiter": {}, "nansen": { "api_key": "nansen api key string" }, "opensea": { "api_key": "opensea api key string" }, "rugcheck": { "jwt_token": "rugcheck JWT token string" }, "spl_token": { "network": "mainnet", "tokens": [ "goat_plugins.erc20.token.USDC" ] }, "superfluid": {}, "uniswap": { "api_key": "uniswap api key string", "base_url": "https://app.uniswap.org" } } ```
{ "source": "crestalnetwork/intentkit", "title": "docs/skills/goat.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/skills/goat.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 1388 }
# X IntentKit provides two ways to integrate with X: using it as an entrypoint for your agent, or incorporating X-specific skills into your agent's capabilities. ## X Skills IntentKit provides a set of X-specific skills that can be added to your agent's toolkit. All skills are built on top of the `XBaseTool` base class which handles authentication and client initialization. ### Available Skills The following X skills are available: - **Follow User** (`follow_user`): Follow a specified X user - **Get Mentions** (`get_mentions`): Retrieve mentions of the authenticated user - **Get Timeline** (`get_timeline`): Fetch tweets from a user's timeline - **Like Tweet** (`like_tweet`): Like a specific tweet - **Post Tweet** (`post_tweet`): Post a new tweet - **Reply Tweet** (`reply_tweet`): Reply to a specific tweet - **Retweet** (`retweet`): Retweet a specific tweet - **Search Tweets** (`search_tweets`): Search for tweets based on query ### Using X Skills Add X skills to your agent: Just configure the skills you need in your agent's config. ```python agent.twitter_skills = ["get_mentions", "get_timeline", "post_tweet", "reply_tweet", "follow_user", "like_tweet", "retweet", "search_tweets"] ``` Before the first use, agent will request you to click the link to authorize the agent to access your twitter account. If you want to use your own twitter developer account, you can set it as follows: ```python agent.twitter_config = { "bearer_token": "your_bearer_token", "consumer_key": "your_consumer_key", "consumer_secret": "your_consumer_secret", "access_token": "your_access_token", "access_token_secret": "your_access_token_secret" } ``` ## X as an Entrypoint Entrypoint is a type of conversational interface. The X entrypoint allows your agent to automatically respond to X mentions. When enabled, the agent will monitor mentions every 15 minutes and respond to them all. We suggest you only use twitter skills, not use it as an entrypoint. ### Configuration 1. Enable X Entrypoint for your agent: ```python agent.twitter_enabled = True ``` 2. Configure X credentials in your agent's config: Get your X credentials from your [X developer portal](https://developer.x.com/en/portal/dashboard). > Notice: Free accounts can only use post_tweet skill, if you want to use other skills, you need to upgrade your account. ```python agent.twitter_config = { "bearer_token": "your_bearer_token", "consumer_key": "your_consumer_key", "consumer_secret": "your_consumer_secret", "access_token": "your_access_token", "access_token_secret": "your_access_token_secret" } ``` 3. Run the X entrypoint: If you have use the docker-compose, it already run. ```bash python -m app.entrypoints.twitter ``` ### How it Works The X entrypoint: - Polls for new mentions every 15 minutes - Uses both `since_id` and `start_time` for reliable mention tracking - Maintains the last processed tweet ID in the agent's plugin data - Automatically manages API rate limits and quotas - Responds to mentions as threaded replies ## Rate Limits and Quotas ### X side [Rate Limits](https://developer.x.com/en/docs/x-api/rate-limits) ### IntentKit Only when use the OAuth2.0 authentication, intentkit has a built-in rate limit: - post tweet: 20/day - reply tweet: 20/day - retweet: 5/15min - follow: 5/15min - like: 100/day - get mentions: 1/4hr - get timeline: 3/day - search: 3/day ### Yourself You can set the rate limit under the intentkit config in the future. Not released yet. ## Best Practices 1. Error Handling - Always handle X API errors gracefully - Implement exponential backoff for rate limits - Log failed interactions for debugging 2. Content Guidelines - Keep responses within X's character limit - Handle thread creation for longer responses - Consider X's content policies 3. Security - Store X credentials securely - Use environment variables for sensitive data - Regularly rotate access tokens ## Example Use Cases 1. Social Media Manager Bot ```python from models.agent import Agent # Create an agent with X skills agent = Agent( name="Social Media Manager", twitter_enabled=True, twitter_skills=["get_mentions", "post_tweet", "reply_tweet"], twitter_config={ "bearer_token": "your_bearer_token", "consumer_key": "your_consumer_key", "consumer_secret": "your_consumer_secret", "access_token": "your_access_token", "access_token_secret": "your_access_token_secret" }, prompt="You are a helpful social media manager. Monitor mentions and engage with users professionally." ) ``` 2. Content Aggregator with Timeline Analysis ```python # Create an agent that analyzes timeline content agent = Agent( name="Content Analyzer", twitter_enabled=True, twitter_skills=["get_timeline", "post_tweet"], twitter_config={...}, # X credentials prompt="""You are a content analyzer. Monitor the timeline for trending topics and provide insights. When you find interesting patterns, share them as tweets.""" ) ``` 3. Interactive Support Assistant ```python # Create a support agent that handles user queries agent = Agent( name="Support Assistant", twitter_enabled=True, twitter_skills=["get_mentions", "reply_tweet"], twitter_config={...}, # X credentials prompt="""You are a support assistant. Monitor mentions for support queries. Respond helpfully and professionally to user questions. If you can't help, politely explain why and suggest alternatives.""" ) ``` Each example demonstrates: - Proper agent configuration with X credentials - Specific skill selection for the use case - Custom prompts to guide agent behavior - Integration with IntentKit's agent system ## Troubleshooting Common issues and solutions: 1. Rate Limit Exceeded - Check your quota settings - Implement proper waiting periods - Use the built-in quota management 2. Authentication Errors - Verify credential configuration - Check token expiration - Ensure proper permission scopes 3. Missing Mentions - Verify `since_id` tracking - Check `start_time` configuration - Monitor the X entrypoint logs
{ "source": "crestalnetwork/intentkit", "title": "docs/skills/x.md", "url": "https://github.com/crestalnetwork/intentkit/blob/main/docs/skills/x.md", "date": "2024-12-09T04:32:22", "stars": 5147, "description": "An open and fair framework for everyone to build AI agents equipped with powerful skills. Launch your agent, improve the world, your wallet, or both!", "file_size": 6322 }
# Realtime API Agents Demo This is a simple demonstration of more advanced, agentic patterns built on top of the Realtime API. In particular, this demonstrates: - Sequential agent handoffs according to a defined agent graph (taking inspiration from [OpenAI Swarm](https://github.com/openai/swarm)) - Background escalation to more intelligent models like o1-mini for high-stakes decisions - Prompting models to follow a state machine, for example to accurately collect things like names and phone numbers with confirmation character by character to authenticate a user. You should be able to use this repo to prototype your own multi-agent realtime voice app in less than 20 minutes! ![Screenshot of the Realtime API Agents Demo](/public/screenshot.png) ## Setup - This is a Next.js typescript app - Install dependencies with `npm i` - Add your `OPENAI_API_KEY` to your env - Start the server with `npm run dev` - Open your browser to [http://localhost:3000](http://localhost:3000) to see the app. It should automatically connect to the `simpleExample` Agent Set. ## Configuring Agents Configuration in `src/app/agentConfigs/simpleExample.ts` ```javascript import { AgentConfig } from "@/app/types"; import { injectTransferTools } from "./utils"; // Define agents const haiku: AgentConfig = { name: "haiku", publicDescription: "Agent that writes haikus.", // Context for the agent_transfer tool instructions: "Ask the user for a topic, then reply with a haiku about that topic.", tools: [], }; const greeter: AgentConfig = { name: "greeter", publicDescription: "Agent that greets the user.", instructions: "Please greet the user and ask them if they'd like a Haiku. If yes, transfer them to the 'haiku' agent.", tools: [], downstreamAgents: [haiku], }; // add the transfer tool to point to downstreamAgents const agents = injectTransferTools([greeter, haiku]); export default agents; ``` This fully specifies the agent set that was used in the interaction shown in the screenshot above. ### Next steps - Check out the configs in `src/app/agentConfigs`. The example above is a minimal demo that illustrates the core concepts. - [frontDeskAuthentication](src/app/agentConfigs/frontDeskAuthentication) Guides the user through a step-by-step authentication flow, confirming each value character-by-character, authenticates the user with a tool call, and then transfers to another agent. Note that the second agent is intentionally "bored" to show how to prompt for personality and tone. - [customerServiceRetail](src/app/agentConfigs/customerServiceRetail) Also guides through an authentication flow, reads a long offer from a canned script verbatim, and then walks through a complex return flow which requires looking up orders and policies, gathering user context, and checking with `o1-mini` to ensure the return is eligible. To test this flow, say that you'd like to return your snowboard and go through the necessary prompts! ### Defining your own agents - You can copy these to make your own multi-agent voice app! Once you make a new agent set config, add it to `src/app/agentConfigs/index.ts` and you should be able to select it in the UI in the "Scenario" dropdown menu. - To see how to define tools and toolLogic, including a background LLM call, see [src/app/agentConfigs/customerServiceRetail/returns.ts](src/app/agentConfigs/customerServiceRetail/returns.ts) - To see how to define a detailed personality and tone, and use a prompt state machine to collect user information step by step, see [src/app/agentConfigs/frontDeskAuthentication/authentication.ts](src/app/agentConfigs/frontDeskAuthentication/authentication.ts) - To see how to wire up Agents into a single Agent Set, see [src/app/agentConfigs/frontDeskAuthentication/index.ts](src/app/agentConfigs/frontDeskAuthentication/index.ts) - If you want help creating your own prompt using these conventions, we've included a metaprompt [here](src/app/agentConfigs/voiceAgentMetaprompt.txt), or you can use our [Voice Agent Metaprompter GPT](https://chatgpt.com/g/g-678865c9fb5c81918fa28699735dd08e-voice-agent-metaprompt-gpt) ## UI - You can select agent scenarios in the Scenario dropdown, and automatically switch to a specific agent with the Agent dropdown. - The conversation transcript is on the left, including tool calls, tool call responses, and agent changes. Click to expand non-message elements. - The event log is on the right, showing both client and server events. Click to see the full payload. - On the bottom, you can disconnect, toggle between automated voice-activity detection or PTT, turn off audio playback, and toggle logs. ## Core Contributors - Noah MacCallum - [noahmacca](https://x.com/noahmacca) - Ilan Bigio - [ibigio](https://github.com/ibigio)
{ "source": "openai/openai-realtime-agents", "title": "README.md", "url": "https://github.com/openai/openai-realtime-agents/blob/main/README.md", "date": "2025-01-16T01:29:28", "stars": 5051, "description": "This is a simple demonstration of more advanced, agentic patterns built on top of the Realtime API.", "file_size": 4776 }
# DeepEP DeepEP is a communication library tailored for Mixture-of-Experts (MoE) and expert parallelism (EP). It provides high-throughput and low-latency all-to-all GPU kernels, which are also as known as MoE dispatch and combine. The library also supports low-precision operations, including FP8. To align with the group-limited gating algorithm proposed in the [DeepSeek-V3](https://github.com/deepseek-ai/DeepSeek-V3) paper, DeepEP offers a set of kernels optimized for asymmetric-domain bandwidth forwarding, such as forwarding data from NVLink domain to RDMA domain. These kernels deliver high throughput, making them suitable for both training and inference prefilling tasks. Additionally, they support SM (Streaming Multiprocessors) number control. For latency-sensitive inference decoding, DeepEP includes a set of low-latency kernels with pure RDMA to minimize delays. The library also introduces a hook-based communication-computation overlapping method that does not occupy any SM resource. Notice: the implementation in this library may have some slight differences from the [DeepSeek-V3](https://github.com/deepseek-ai/DeepSeek-V3) paper. ## Performance ### Normal kernels with NVLink and RDMA forwarding We test normal kernels on H800 (~160 GB/s NVLink maximum bandwidth), with each connected to a CX7 InfiniBand 400 Gb/s RDMA network card (~50 GB/s maximum bandwidth). And we follow the DeepSeek-V3/R1 pretraining setting (4096 tokens per batch, 7168 hidden, top-4 groups, top-8 experts, FP8 dispatching and BF16 combining). | Type | Dispatch #EP | Bottleneck bandwidth | Combine #EP | Bottleneck bandwidth | |:---------:|:------------:|:--------------------:|:-----------:|:--------------------:| | Intranode | 8 | 153 GB/s (NVLink) | 8 | 158 GB/s (NVLink) | | Internode | 16 | 43 GB/s (RDMA) | 16 | 43 GB/s (RDMA) | | Internode | 32 | 44 GB/s (RDMA) | 32 | 47 GB/s (RDMA) | | Internode | 64 | 46 GB/s (RDMA) | 64 | 45 GB/s (RDMA) | ### Low-latency kernels with pure RDMA We test low-latency kernels on H800 with each connected to a CX7 InfiniBand 400 Gb/s RDMA network card (~50 GB/s maximum bandwidth). And we follow a typical DeepSeek-V3/R1 production setting (128 tokens per batch, 7168 hidden, top-8 experts, FP8 dispatching and BF16 combining). | Dispatch #EP | Latency | RDMA bandwidth | Combine #EP | Latency | RDMA bandwidth | |:------------:|:-------:|:--------------:|:-----------:|:-------:|:--------------:| | 8 | 163 us | 46 GB/s | 8 | 318 us | 46 GB/s | | 16 | 173 us | 43 GB/s | 16 | 329 us | 44 GB/s | | 32 | 182 us | 41 GB/s | 32 | 350 us | 41 GB/s | | 64 | 186 us | 40 GB/s | 64 | 353 us | 41 GB/s | | 128 | 192 us | 39 GB/s | 128 | 369 us | 39 GB/s | | 256 | 194 us | 39 GB/s | 256 | 360 us | 40 GB/s | ## Quick start ### Requirements - Hopper GPUs (may support more architectures or devices later) - Python 3.8 and above - CUDA 12.3 and above - PyTorch 2.1 and above - NVLink for intranode communication - RDMA network for internode communication ### Download and install NVSHMEM dependency DeepEP also depends on our modified NVSHMEM. Please refer to our [NVSHMEM Installation Guide](third-party/README.md) for instructions. ### Development ```bash # Build and make symbolic links for SO files NVSHMEM_DIR=/path/to/installed/nvshmem python setup.py build # You may modify the specific SO names according to your own platform ln -s build/lib.linux-x86_64-cpython-38/deep_ep_cpp.cpython-38-x86_64-linux-gnu.so # Run test cases # NOTES: you may modify the `init_dist` function in `tests/utils.py` # according to your own cluster settings, and launch into multiple nodes python tests/test_intranode.py python tests/test_internode.py python tests/test_low_latency.py ``` ### Installation ```bash NVSHMEM_DIR=/path/to/installed/nvshmem python setup.py install ``` Then, import `deep_ep` in your Python project, and enjoy! ## Network configurations DeepEP is fully tested with InfiniBand networks. However, it is theoretically compatible with RDMA over Converged Ethernet (RoCE) as well. ### Traffic isolation Traffic isolation is supported by InfiniBand through Virtual Lanes (VL). To prevent interference between different types of traffic, we recommend segregating workloads across different virtual lanes as follows: - workloads using normal kernels - workloads using low-latency kernels - other workloads For DeepEP, you can control the virtual lane assignment by setting the `NVSHMEM_IB_SL` environment variable. ### Adaptive routing Adaptive routing is an advanced routing feature provided by InfiniBand switches that can evenly distribute traffic across multiple paths. Currently, low-latency kernels support adaptive routing, while normal kernels do not (support may be added soon). **Enabling adaptive routing for normal internode kernels may lead to deadlocks or data corruption issues**. For low-latency kernels, enabling adaptive routing can completely eliminate network congestion caused by routing conflicts, but it also introduces additional latency. We recommend the following configuration for optimal performance: - enable adaptive routing in environments with heavy network loads - use static routing in environments with light network loads ### Congestion control Congestion control is disabled as we have not observed significant congestion in our production environment. ## Interfaces and examples ### Example use in model training or inference prefilling The normal kernels can be used in model training or the inference prefilling phase (without the backward part) as the below example code shows. ```python import torch import torch.distributed as dist from typing import List, Tuple, Optional, Union from deep_ep import Buffer, EventOverlap # Communication buffer (will allocate at runtime) _buffer: Optional[Buffer] = None # Set the number of SMs to use # NOTES: this is a static variable Buffer.set_num_sms(24) # You may call this function at the framework initialization def get_buffer(group: dist.ProcessGroup, hidden_bytes: int) -> Buffer: global _buffer # NOTES: you may also replace `get_*_config` with your auto-tuned results via all the tests num_nvl_bytes, num_rdma_bytes = 0, 0 for config in (Buffer.get_dispatch_config(group.size()), Buffer.get_combine_config(group.size())): num_nvl_bytes = max(config.get_nvl_buffer_size_hint(hidden_bytes, group.size()), num_nvl_bytes) num_rdma_bytes = max(config.get_rdma_buffer_size_hint(hidden_bytes, group.size()), num_rdma_bytes) # Allocate a buffer if not existed or not enough buffer size # NOTES: the adaptive routing configuration of the network **must be off** if _buffer is None or _buffer.group != group or _buffer.num_nvl_bytes < num_nvl_bytes or _buffer.num_rdma_bytes < num_rdma_bytes: _buffer = Buffer(group, num_nvl_bytes, num_rdma_bytes) return _buffer def get_hidden_bytes(x: torch.Tensor) -> int: t = x[0] if isinstance(x, tuple) else x return t.size(1) * max(t.element_size(), 2) def dispatch_forward(x: Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]], topk_idx: torch.Tensor, topk_weights: torch.Tensor, num_experts: int, previous_event: Optional[EventOverlap] = None) -> \ Tuple[Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]], torch.Tensor, torch.Tensor, List, Tuple, EventOverlap]: # NOTES: an optional `previous_event` means a CUDA event captured that you want to make it as a dependency # of the dispatch kernel, it may be useful with communication-computation overlap. For more information, please # refer to the docs of `Buffer.dispatch` global _buffer # Calculate layout before actual dispatch num_tokens_per_rank, num_tokens_per_rdma_rank, num_tokens_per_expert, is_token_in_rank, previous_event = \ _buffer.get_dispatch_layout(topk_idx, num_experts, previous_event=previous_event, async_finish=True, allocate_on_comm_stream=previous_event is not None) # Do MoE dispatch # NOTES: the CPU will wait for GPU's signal to arrive, so this is not compatible with CUDA graph # For more advanced usages, please refer to the docs of the `dispatch` function recv_x, recv_topk_idx, recv_topk_weights, num_recv_tokens_per_expert_list, handle, event = \ _buffer.dispatch(x, topk_idx=topk_idx, topk_weights=topk_weights, num_tokens_per_rank=num_tokens_per_rank, num_tokens_per_rdma_rank=num_tokens_per_rdma_rank, is_token_in_rank=is_token_in_rank, num_tokens_per_expert=num_tokens_per_expert, previous_event=previous_event, async_finish=True, allocate_on_comm_stream=True) # For event management, please refer to the docs of the `EventOverlap` class return recv_x, recv_topk_idx, recv_topk_weights, num_recv_tokens_per_expert_list, handle, event def dispatch_backward(grad_recv_x: torch.Tensor, grad_recv_topk_weights: torch.Tensor, handle: Tuple) -> \ Tuple[torch.Tensor, torch.Tensor, EventOverlap]: global _buffer # The backward process of MoE dispatch is actually a combine # For more advanced usages, please refer to the docs of the `combine` function combined_grad_x, combined_grad_recv_topk_weights, event = \ _buffer.combine(grad_recv_x, handle, topk_weights=grad_recv_topk_weights, async_finish=True) # For event management, please refer to the docs of the `EventOverlap` class return combined_grad_x, combined_grad_recv_topk_weights, event def combine_forward(x: torch.Tensor, handle: Tuple, previous_event: Optional[EventOverlap] = None) -> \ Tuple[torch.Tensor, EventOverlap]: global _buffer # Do MoE combine # For more advanced usages, please refer to the docs of the `combine` function combined_x, _, event = _buffer.combine(x, handle, async_finish=True, previous_event=previous_event, allocate_on_comm_stream=previous_event is not None) # For event management, please refer to the docs of the `EventOverlap` class return combined_x, event def combine_backward(grad_combined_x: Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]], handle: Tuple, previous_event: Optional[EventOverlap] = None) -> \ Tuple[Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]], EventOverlap]: global _buffer # The backward process of MoE combine is actually a dispatch # For more advanced usages, please refer to the docs of the `combine` function grad_x, _, _, _, _, event = _buffer.dispatch(grad_combined_x, handle=handle, async_finish=True, previous_event=previous_event, allocate_on_comm_stream=previous_event is not None) # For event management, please refer to the docs of the `EventOverlap` class return grad_x, event ``` Moreover, inside the dispatch function, we may not know how many tokens to receive for the current rank. So an implicit CPU wait for GPU received count signal will be involved, as the following figure shows. ![normal](figures/normal.png) ### Example use in inference decoding The low latency kernels can be used in the inference decoding phase as the below example code shows. ```python import torch import torch.distributed as dist from typing import Tuple, Optional from deep_ep import Buffer # Communication buffer (will allocate at runtime) # NOTES: there is no SM control API for the low-latency kernels _buffer: Optional[Buffer] = None # You may call this function at the framework initialization def get_buffer(group: dist.ProcessGroup, num_max_dispatch_tokens_per_rank: int, hidden: int, num_experts: int) -> Buffer: # NOTES: the low-latency mode will consume much more space than the normal mode # So we recommend that `num_max_dispatch_tokens_per_rank` (the actual batch size in the decoding engine) should be less than 256 global _buffer num_rdma_bytes = Buffer.get_low_latency_rdma_size_hint(num_max_dispatch_tokens_per_rank, hidden, group.size(), num_experts) # Allocate a buffer if not existed or not enough buffer size if _buffer is None or _buffer.group != group or not _buffer.low_latency_mode or _buffer.num_rdma_bytes < num_rdma_bytes: # NOTES: for best performance, the QP number **must** be equal to the number of the local experts assert num_experts % group.size() == 0 _buffer = Buffer(group, 0, num_rdma_bytes, low_latency_mode=True, num_qps_per_rank=num_experts // group.size()) return _buffer def low_latency_dispatch(hidden_states: torch.Tensor, topk_idx: torch.Tensor, num_max_dispatch_tokens_per_rank: int, num_experts: int): global _buffer # Do MoE dispatch, compatible with CUDA graph (but you may restore some buffer status once you replay) recv_hidden_states, recv_expert_count, handle, event, hook = \ _buffer.low_latency_dispatch(hidden_states, topk_idx, num_max_dispatch_tokens_per_rank, num_experts, async_finish=False, return_recv_hook=True) # NOTES: the actual tensor will not be received only if you call `hook()`, # it is useful for double-batch overlapping, but **without any SM occupation** # If you don't want to overlap, please set `return_recv_hook=False` # Later, you can use our GEMM library to do the computation with this specific format return recv_hidden_states, recv_expert_count, handle, event, hook def low_latency_combine(hidden_states: torch.Tensor, topk_idx: torch.Tensor, topk_weights: torch.Tensor, handle: Tuple): global _buffer # Do MoE combine, compatible with CUDA graph (but you may restore some buffer status once you replay) combined_hidden_states, event_overlap, hook = \ _buffer.low_latency_combine(hidden_states, topk_idx, topk_weights, handle, async_finish=False, return_recv_hook=True) # NOTES: the same behavior as described in the dispatch kernel return combined_hidden_states, event_overlap, hook ``` For two micro-batch overlapping, you can refer to the following figure. With our receiving hook interface, the RDMA network traffics are happening in the background, without costing any GPU SMs from the computation part. But notice, the overlapped parts can be adjusted, i.e. the 4 parts of attention/dispatch/MoE/combine may not have the exact same execution time. You may adjust the stage settings according to your workload. ![low-latency](figures/low-latency.png) ## Notices - For extreme performance, we discover and use a behavior-out-of-doc PTX instruction: `ld.global.nc.L1::no_allocate.L2::256B`. This instruction will lead to an undefined behavior: accessing volatile GPU memory with non-coherent read-only PTX modifiers `.nc`. But the correctness is tested to be guaranteed with `.L1::no_allocate` on Hopper architectures, and performance will be much better. If you find kernels not working on some other platforms, you may add `DISABLE_AGGRESSIVE_PTX_INSTRS=1` to `setup.py` and disable this, or file an issue. - For better performance on your cluster, we recommend to run all the tests and use the best auto-tuned configuration. The default configurations are optimized on the DeepSeek's internal cluster. ## License This code repository is released under [the MIT License](LICENSE), except for codes that reference NVSHMEM (including `csrc/kernels/ibgda_device.cuh` and `third-party/nvshmem.patch`), which are subject to [NVSHMEM SLA](https://docs.nvidia.com/nvshmem/api/sla.html). ## Citation If you use this codebase, or otherwise found our work valuable, please cite: ```bibtex @misc{deepep2025, title={DeepEP: an efficient expert-parallel communication library}, author={Chenggang Zhao and Shangyan Zhou and Liyue Zhang and Chengqi Deng and Zhean Xu and Yuxuan Liu and Kuai Yu and Jiashi Li and Liang Zhao}, year={2025}, publisher = {GitHub}, howpublished = {\url{https://github.com/deepseek-ai/DeepEP}}, } ```
{ "source": "deepseek-ai/DeepEP", "title": "README.md", "url": "https://github.com/deepseek-ai/DeepEP/blob/main/README.md", "date": "2025-02-17T01:33:04", "stars": 4772, "description": "DeepEP: an efficient expert-parallel communication library", "file_size": 16562 }
# Install NVSHMEM ## Important notices **This project is neither sponsored nor supported by NVIDIA.** **Use of NVIDIA NVSHMEM is governed by the terms at [NVSHMEM Software License Agreement](https://docs.nvidia.com/nvshmem/api/sla.html).** ## Prerequisites 1. [GDRCopy](https://github.com/NVIDIA/gdrcopy) (v2.4 and above recommended) is a low-latency GPU memory copy library based on NVIDIA GPUDirect RDMA technology, and *it requires kernel module installation with root privileges.* 2. Hardware requirements - GPUDirect RDMA capable devices, see [GPUDirect RDMA Documentation](https://docs.nvidia.com/cuda/gpudirect-rdma/) - InfiniBand GPUDirect Async (IBGDA) support, see [IBGDA Overview](https://developer.nvidia.com/blog/improving-network-performance-of-hpc-systems-using-nvidia-magnum-io-nvshmem-and-gpudirect-async/) - For more detailed requirements, see [NVSHMEM Hardware Specifications](https://docs.nvidia.com/nvshmem/release-notes-install-guide/install-guide/abstract.html#hardware-requirements) ## Installation procedure ### 1. Install GDRCopy GDRCopy requires kernel module installation on the host system. Complete these steps on the bare-metal host before container deployment: #### Build and installation ```bash wget https://github.com/NVIDIA/gdrcopy/archive/refs/tags/v2.4.4.tar.gz cd gdrcopy-2.4.4/ make -j$(nproc) sudo make prefix=/opt/gdrcopy install ``` #### Kernel module installation After compiling the software, you need to install the appropriate packages based on your Linux distribution. For instance, using Ubuntu 22.04 and CUDA 12.3 as an example: ```bash cd packages CUDA=/path/to/cuda ./build-deb-packages.sh sudo dpkg -i gdrdrv-dkms_2.4.4_amd64.Ubuntu22_04.deb \ libgdrapi_2.4.4_amd64.Ubuntu22_04.deb \ gdrcopy-tests_2.4.4_amd64.Ubuntu22_04+cuda12.3.deb \ gdrcopy_2.4.4_amd64.Ubuntu22_04.deb sudo ./insmod.sh # Load kernel modules on the bare-metal system ``` #### Container environment notes For containerized environments: 1. Host: keep kernel modules loaded (`gdrdrv`) 2. Container: install DEB packages *without* rebuilding modules: ```bash sudo dpkg -i gdrcopy_2.4.4_amd64.Ubuntu22_04.deb \ libgdrapi_2.4.4_amd64.Ubuntu22_04.deb \ gdrcopy-tests_2.4.4_amd64.Ubuntu22_04+cuda12.3.deb ``` #### Verification ```bash gdrcopy_copybw # Should show bandwidth test results ``` ### 2. Acquiring NVSHMEM source code Download NVSHMEM v3.1.7 from the [NVIDIA NVSHMEM Archive](https://developer.nvidia.com/nvshmem-archive). ### 3. Apply our custom patch Navigate to your NVSHMEM source directory and apply our provided patch: ```bash git apply /path/to/deep_ep/dir/third-party/nvshmem.patch ``` ### 4. Configure NVIDIA driver Enable IBGDA by modifying `/etc/modprobe.d/nvidia.conf`: ```bash options nvidia NVreg_EnableStreamMemOPs=1 NVreg_RegistryDwords="PeerMappingOverride=1;" ``` Update kernel configuration: ```bash sudo update-initramfs -u sudo reboot ``` For more detailed configurations, please refer to the [NVSHMEM Installation Guide](https://docs.nvidia.com/nvshmem/release-notes-install-guide/install-guide/abstract.html). ### 5. Build and installation The following example demonstrates building NVSHMEM with IBGDA support: ```bash CUDA_HOME=/path/to/cuda && \ GDRCOPY_HOME=/path/to/gdrcopy && \ NVSHMEM_SHMEM_SUPPORT=0 \ NVSHMEM_UCX_SUPPORT=0 \ NVSHMEM_USE_NCCL=0 \ NVSHMEM_IBGDA_SUPPORT=1 \ NVSHMEM_PMIX_SUPPORT=0 \ NVSHMEM_TIMEOUT_DEVICE_POLLING=0 \ NVSHMEM_USE_GDRCOPY=1 \ cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=/path/to/your/dir/to/install cd build make -j$(nproc) make install ``` ## Post-installation configuration Set environment variables in your shell configuration: ```bash export NVSHMEM_DIR=/path/to/your/dir/to/install # Use for DeepEP installation export LD_LIBRARY_PATH="${NVSHMEM_DIR}/lib:$LD_LIBRARY_PATH" export PATH="${NVSHMEM_DIR}/bin:$PATH" ``` ## Verification ```bash nvshmem-info -a # Should display details of nvshmem ```
{ "source": "deepseek-ai/DeepEP", "title": "third-party/README.md", "url": "https://github.com/deepseek-ai/DeepEP/blob/main/third-party/README.md", "date": "2025-02-17T01:33:04", "stars": 4772, "description": "DeepEP: an efficient expert-parallel communication library", "file_size": 4023 }
<p align="center"> <a href="https://openauth.js.org"> <picture> <source srcset="https://raw.githubusercontent.com/openauthjs/identity/main/logo-dark.svg" media="(prefers-color-scheme: dark)"> <source srcset="https://raw.githubusercontent.com/openauthjs/identity/main/logo-light.svg" media="(prefers-color-scheme: light)"> <img src="https://raw.githubusercontent.com/openauthjs/identity/main/logo-light.svg" alt="OpenAuth logo"> </picture> </a> </p> <p align="center"> <a href="https://sst.dev/discord"><img alt="Discord" src="https://img.shields.io/discord/983865673656705025?style=flat-square&label=Discord" /></a> <a href="https://www.npmjs.com/package/@openauthjs/openauth"><img alt="npm" src="https://img.shields.io/npm/v/%40openauthjs%2Fcore?style=flat-square" /></a> <a href="https://github.com/openauthjs/openauth/actions/workflows/release.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/openauthjs/openauth/release.yml?style=flat-square&branch=master" /></a> </p> --- [OpenAuth](https://openauth.js.org) is a standards-based auth provider for web apps, mobile apps, single pages apps, APIs, or 3rd party clients. It is currently in beta. - **Universal**: You can deploy it as a standalone service or embed it into an existing application. It works with any framework or platform. - **Self-hosted**: It runs entirely on your infrastructure and can be deployed on Node.js, Bun, AWS Lambda, or Cloudflare Workers. - **Standards-based**: It implements the OAuth 2.0 spec and is based on web standards. So any OAuth client can use it. - **Customizable**: It comes with prebuilt themeable UI that you can customize or opt out of. <picture> <source srcset="https://raw.githubusercontent.com/openauthjs/identity/main/assets/themes-dark.png" media="(prefers-color-scheme: dark)"> <source srcset="https://raw.githubusercontent.com/openauthjs/identity/main/assets/themes-light.png" media="(prefers-color-scheme: dark)"> <img src="https://raw.githubusercontent.com/openauthjs/identity/main/assets/themes-light.png" alt="OpenAuth themes"> </picture> ## Quick Start If you just want to get started as fast as possible you can jump straight into the [code examples](https://github.com/openauthjs/openauthjs/tree/master/examples) folder and copy paste away. There are also [SST components](https://sst.dev/docs/component/aws/auth) for deploying everything OpenAuth needs. ## Approach While there are many open source solutions for auth, almost all of them are libraries that are meant to be embedded into a single application. Centralized auth servers typically are delivered as SaaS services - eg Auth0 or Clerk. OpenAuth instead is a centralized auth server that runs on your own infrastructure and has been designed for ease of self hosting. It can be used to authenticate all of your applications - web apps, mobile apps, internal admin tools, etc. It adheres mostly to OAuth 2.0 specifications - which means anything that can speak OAuth can use it to receive access and refresh tokens. When a client initiates an authorization flow, OpenAuth will hand off to one of the configured providers - this can be third party identity providers like Google, GitHub, etc or built in flows like email/password or pin code. Because it follows these specifications it can even be used to issue credentials for third party applications - allowing you to implement "login with myapp" flows. OpenAuth very intentionally does not attempt to solve user management. We've found that this is a very difficult problem given the wide range of databases and drivers that are used in the JS ecosystem. Additionally it's quite hard to build data abstractions that work for every use case. Instead, once a user has identified themselves OpenAuth will invoke a callback where you can implement your own user lookup/creation logic. While OpenAuth tries to be mostly stateless, it does need to store a minimal amount of data (refresh tokens, password hashes, etc). However this has been reduced to a simple KV store with various implementations for zero overhead systems like Cloudflare KV and DynamoDB. You should never need to directly access any data that is stored in there. There is also a themeable UI that you can use to get going without implementing any designs yourself. This is built on top of a lower level system so you can copy paste the default UI and tweak it or opt out entirely and implement your own. Finally, OpenAuth is created by the maintainers of [SST](https://sst.dev) which is a tool to manage all the infrastructure for your app. It contains components for OpenAuth that make deploying it to AWS or Cloudflare as simple as it can get. ## Tutorial We'll show how to deploy the auth server and then a sample app that uses it. ### Auth server Start by importing the `issuer` function from the `@openauthjs/openauth` package. ```ts import { issuer } from "@openauthjs/openauth" ``` OpenAuth is built on top of [Hono](https://github.com/honojs/hono) which is a minimal web framework that can run anywhere. The `issuer` function creates a Hono app with all of the auth server implemented that you can then deploy to AWS Lambda, Cloudflare Workers, or in a container running under Node.js or Bun. The `issuer` function requires a few things: ```ts const app = issuer({ providers: { ... }, storage, subjects, success: async (ctx, value) => { ... } }) ``` First we need to define some providers that are enabled - these are either third party identity providers like Google, GitHub, etc or built in flows like email/password or pin code. You can also implement your own. Let's try the GitHub provider. ```ts import { GithubProvider } from "@openauthjs/openauth/provider/github" const app = issuer({ providers: { github: GithubProvider({ clientID: process.env.GITHUB_CLIENT_ID!, clientSecret: process.env.GITHUB_CLIENT_SECRET!, scopes: ["user:email"], }), }, ... }) ``` Providers take some configuration - since this is a third party identity provider there is no UI to worry about and all it needs is a client ID, secret and some scopes. Let's add the password provider which is a bit more complicated. ```ts import { PasswordProvider } from "@openauthjs/openauth/provider/password" const app = issuer({ providers: { github: ..., password: PasswordProvider(...), }, ... }) ``` The password provider is quite complicated as username/password involve a lot of flows so there are a lot of callbacks to implement. However you can opt into the default UI which has all of this already implemented for you. The only thing you have to specify is how to send a code for forgot password/email verification. In this case we'll log the code but you would send this over email. ```ts import { PasswordProvider } from "@openauthjs/openauth/provider/password" import { PasswordUI } from "@openauthjs/openauth/ui/password" const app = issuer({ providers: { github: ..., password: PasswordProvider( PasswordUI({ sendCode: async (email, code) => { console.log(email, code) }, }), ), }, ... }) ``` Next up is the `subjects` field. Subjects are what the access token generated at the end of the auth flow will map to. Under the hood, the access token is a JWT that contains this data. You will likely just have a single subject to start but you can define additional ones for different types of users. ```ts import { object, string } from "valibot" const subjects = createSubjects({ user: object({ userID: string(), // may want to add workspaceID here if doing a multi-tenant app workspaceID: string(), }), }) ``` Note we are using [valibot](https://github.com/fabian-hiller/valibot) to define the shape of the subject so it can be validated properly. You can use any validation library that is following the [standard-schema specification](https://github.com/standard-schema/standard-schema) - the next version of Zod will support this. You typically will want to place subjects in its own file as it can be imported by all of your apps. You can pass it to the issuer in the `subjects` field. ```ts import { subjects } from "./subjects.js" const app = issuer({ providers: { ... }, subjects, ... }) ``` Next we'll implement the `success` callback which receives the payload when a user successfully completes a provider flow. ```ts const app = issuer({ providers: { ... }, subjects, async success(ctx, value) { let userID if (value.provider === "password") { console.log(value.email) userID = ... // lookup user or create them } if (value.provider === "github") { console.log(value.tokenset.access) userID = ... // lookup user or create them } return ctx.subject("user", { userID, 'a workspace id' }) } }) ``` Note all of this is typesafe - based on the configured providers you will receive different properties in the `value` object. Also the `subject` method will only accept properties. Note - most callbacks in OpenAuth can return a `Response` object. In this case if something goes wrong, you can return a `Response.redirect("...")` sending them to a different place or rendering an error. Next we have the `storage` field which defines where things like refresh tokens and password hashes are stored. If on AWS we recommend DynamoDB, if on Cloudflare we recommend Cloudflare KV. We also have a MemoryStore used for testing. ```ts import { MemoryStorage } from "@openauthjs/openauth/storage/memory" const app = issuer({ providers: { ... }, subjects, async success(ctx, value) { ... }, storage: MemoryStorage(), }) ``` And now we are ready to deploy! Here's how you do that depending on your infrastructure. ```ts // Bun export default app // Cloudflare export default app // Lambda import { handle } from "hono/aws-lambda" export const handler = handle(app) // Node.js import { serve } from "@hono/node-server" serve(app) ``` You now have a centralized auth server. Test it out by visiting `/.well-known/oauth-authorization-server` - you can see a live example [here](https://auth.terminal.shop/.well-known/oauth-authorization-server). ### Auth client Since this is a standard OAuth server you can use any libraries for OAuth and it will work. OpenAuth does provide some light tooling for this although even a manual flow is pretty simple. You can create a client like this: ```ts import { createClient } from "@openauthjs/openauth/client" const client = createClient({ clientID: "my-client", issuer: "https://auth.myserver.com", // url to the OpenAuth server }) ``` #### SSR Sites If your frontend has a server component you can use the code flow. Redirect the user here ```ts const { url } = await client.authorize( <redirect-uri>, "code" ) ``` You can make up a `client_id` that represents your app. This will initiate the auth flow and user will be redirected to the `redirect_uri` you provided with a query parameter `code` which you can exchange for an access token. ```ts // the redirect_uri is the original redirect_uri you passed in and is used for verification const tokens = await client.exchange(query.get("code"), redirect_uri) console.log(tokens.access, tokens.refresh) ``` You likely want to store both the access token and refresh token in an HTTP only cookie so they are sent up with future requests. Then you can use the `client` to verify the tokens. ```ts const verified = await client.verify(subjects, cookies.get("access_token")!, { refresh: cookies.get("refresh_token") || undefined, }) console.log( verified.subject.type, verified.subject.properties, verified.refresh, verified.access, ) ``` Passing in the refresh token is optional but if you do, this function will automatically refresh the access token if it has expired. It will return a new access token and refresh token which you should set back into the cookies. #### SPA Sites, Mobile apps, etc In cases where you do not have a server, you can use the `token` flow with `pkce` on the frontend. ```ts const { challenge, url } = await client.authorize(<redirect_uri>, "code", { pkce: true }) localStorage.setItem("challenge", JSON.stringify(challenge)) location.href = url ``` When the auth flow is complete the user's browser will be redirected to the `redirect_uri` with a `code` query parameter. You can then exchange the code for access/refresh tokens. ```ts const challenge = JSON.parse(localStorage.getItem("challenge")) const exchanged = await client.exchange( query.get("code"), redirect_uri, challenge.verifier, ) if (exchanged.err) throw new Error("Invalid code") localStorage.setItem("access_token", exchanged.tokens.access) localStorage.setItem("refresh_token", exchanged.tokens.refresh) ``` Then when you make requests to your API you can include the access token in the `Authorization` header. ```ts const accessToken = localStorage.getItem("access_token") fetch("https://auth.example.com/api/user", { headers: { Authorization: `Bearer ${accessToken}`, }, }) ``` And then you can verify the access token on the server. ```ts const verified = await client.verify(subjects, accessToken) console.log(verified.subject) ``` --- OpenAuth is created by the maintainers of [SST](https://sst.dev). **Join our community** [Discord](https://sst.dev/discord) | [YouTube](https://www.youtube.com/c/sst-dev) | [X.com](https://x.com/SST_dev)
{ "source": "openauthjs/openauth", "title": "README.md", "url": "https://github.com/openauthjs/openauth/blob/master/README.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 13496 }
# Changesets Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets) We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
{ "source": "openauthjs/openauth", "title": ".changeset/README.md", "url": "https://github.com/openauthjs/openauth/blob/master/.changeset/README.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 509 }
# Examples There are two sets of examples here, issuers and clients. Issuers are examples of setting up an OpenAuth server. The clients are examples of using OpenAuth in a client application and work with any of the issuer servers. The fastest way to play around is to use the bun issuer. You can bring it up with: ```shell $ bun run --hot ./issuer/bun/issuer.ts ``` You might have to install some workspace packages first, run this in the root: ```shell $ bun install $ cd packages/openauth $ bun run build ``` This will bring it up on port 3000. Then try one of the clients - for example the astro one. ``` $ cd client/astro $ bun dev ``` Now visit `http://localhost:4321` (the astro app) and experience the auth flow. Or head over to `http://localhost:3000/password/authorize` to try the password flow directly.
{ "source": "openauthjs/openauth", "title": "examples/README.md", "url": "https://github.com/openauthjs/openauth/blob/master/examples/README.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 823 }
# Starlight Starter Kit: Basics [![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) ``` npm create astro@latest -- --template starlight ``` [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics) [![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics) [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics) [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs) > 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! ## 🚀 Project Structure Inside of your Astro + Starlight project, you'll see the following folders and files: ``` . ├── public/ ├── src/ │ ├── assets/ │ ├── content/ │ │ ├── docs/ │ │ └── config.ts │ └── env.d.ts ├── astro.config.mjs ├── package.json └── tsconfig.json ``` Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. Images can be added to `src/assets/` and embedded in Markdown with a relative link. Static assets, like favicons, can be placed in the `public/` directory. ## 🧞 Commands All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | | `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | | `npm run astro -- --help` | Get help using the Astro CLI | ## 👀 Want to learn more? Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
{ "source": "openauthjs/openauth", "title": "www/README.md", "url": "https://github.com/openauthjs/openauth/blob/master/www/README.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 2563 }
# @openauthjs/openauth ## 0.4.0 ### Minor Changes - 4e38fa6: feat: Return expires_in from /token endpoint - fcaafcf: Return signing alg from jwks.json endpoint ### Patch Changes - 9e3c2ac: Call password validation callback on password reset - dc40b02: Fix providers client id case from `clientId` to `clientID` ## 0.3.9 ### Patch Changes - 40f6033: enable logger by default - 3ce40fd: log dynamo error cause ## 0.3.8 ### Patch Changes - c75005b: retry failed dynamo calls ## 0.3.7 ### Patch Changes - 9036544: Add PKCE option to Oauth2Provider - 8f214e3: Import only hono type in util.ts - 4cd9e96: add provider logos for apple, x, facebook, microsoft and slack - 3e3c9e6: Add password validation callback - f46946c: Add use: sig to jwks. - 7d39e76: Add way to modify the dynamo ttl attribute name - 754d776: Supports forwarded protocol and forwarded port in the relative URL - 1b5525b: add ability to resend verification code during registration ## 0.3.6 ### Patch Changes - f7bd440: Adding a new default openauth theme ## 0.3.5 ### Patch Changes - b22fb30: fix: enable CORS on well-known routes ## 0.3.4 ### Patch Changes - 34ca2b0: remove catch all route so hono instance can be extended ## 0.3.3 ### Patch Changes - 9712422: fix: add charset meta tag to ui/base.tsx - 92e7170: Adds support for refresh token reuse interval and reuse detection Also fixes an issue with token invalidation, where removing keys while scanning may cause some refresh tokens to be skipped (depending on storage provider.) ## 0.3.2 ### Patch Changes - 03da3e0: fix issue with oidc adapter ## 0.3.1 ### Patch Changes - 8764ed4: support specify custom subject ## 0.3.0 ### Minor Changes - b2af22a: renamed authorizer -> issuer and adapter -> provider this should be a superficial change, but it's a breaking change previously you imported adapters like this: ```js import { PasswordAdapter } from "@openauth/openauth/adapter/password" ``` update it to this: ```js import { PasswordProvider } from "@openauth/openauth/provider/password" ``` for the authorizer, you import it like this: ```js import { authorizer } from "@openauth/openauth" ``` update it to this: ```js import { issuer } from "@openauth/openauth" ``` also subjects should be imported deeply like this: ```js import { createSubjects } from "@openauth/openauth" ``` update it to this: ```js import { createSubjects } from "@openauth/openauth/subject" ``` ## 0.2.7 ### Patch Changes - 3004802: refactor: export `AuthorizationState` for better reusability - 2975608: switching signing key algorithm to es256. generate seperate keys for symmetrical encryption. old keys will automatically be marked expired and not used - c92604b: Adds support for a custom DynamoDB endpoint which enables use of a amazon/dynamodb-local container. Usabe example: ```ts storage: DynamoStorage({ table: 'openauth-users', endpoint: 'http://localhost:8000', }), ``` ## 0.2.6 ### Patch Changes - ca0df5d: ui: support phone mode for code ui - d8d1580: Add slack adapter to the list of available adapters. - ce44ed6: fix for password adapter not redirecting to the right place after change password flow - 4940bef: fix: add `node:` prefix for built-in modules ## 0.2.5 ### Patch Changes - 8d6a243: fix: eliminate OTP bias and timing attack vulnerability - 873d1af: support specifying granular ttl for access/refresh token ## 0.2.4 ### Patch Changes - 8b5f490: feat: Add copy customization to Code UI component ## 0.2.3 ### Patch Changes - 80238de: return aud field when verifying token ## 0.2.2 ### Patch Changes - 6da8647: fix copy for code resend ## 0.2.1 ### Patch Changes - 83125f1: Remove predefined scopes from Spotify adapter to allow user-defined scopes ## 0.2.0 ### Minor Changes - 8c3f050: BREAKING CHANGE: `client.exchange` and `client.authorize` signatures have changed. `client.exchange` will now return an `{ err, tokens }` object. check `if (result.err)` for errors. `client.authorize` now accepts `pkce: true` as an option. it is now async and returns a promise with `{ challenge, url}`. the `challenge` contains the `state` and `verifier` if using `pkce` all exchanges have been updated to reflect this if you would like to reference ### Patch Changes - 0f93def: refactor: update storage adapters to use Date for expiry ## 0.1.2 ### Patch Changes - 584728f: Add common ColorScheme - 41acdc2: ui: missing copy in password.tsx - 2aa531b: Add GitHub Actions workflow for running tests ## 0.1.1 ### Patch Changes - 04cd031: if only single provider is configured, skip provider selection ## 0.1.0 ### Minor Changes - 3c8cdf8: BREAKING CHANGE: The api for `client` has changed. It no longer throws errors and instead returns an `err` field that you must check or ignore. All the examples have been updated to reflect this change. ## 0.0.26 ### Patch Changes - 5dd6aa4: feature: add twitter adapter ## 0.0.25 ### Patch Changes - 7e3fa38: feat(cognito): add CognitoAdapter - f496e3a: Set input autocomplete attribute in password UI ## 0.0.24 ### Patch Changes - f695881: feature: added apple adapter ## 0.0.23 ### Patch Changes - a585875: remove console.log - 079c514: feat: add JumpCloud ## 0.0.22 ### Patch Changes - d3391f4: do not import createClient from root - it causes some bundlers to include too much code ## 0.0.21 ### Patch Changes - acc2c5f: add tests for memory adapter and fixed issues with ttl - 7630c87: added facebook, discord, and keycloak adapter ## 0.0.20 ### Patch Changes - 1a0ff69: fix for theme not being applied ## 0.0.19 ### Patch Changes - 0864481: allow configuring storage through environment ## 0.0.18 ### Patch Changes - bbf90c5: fix type issues when using ui components ## 0.0.17 ### Patch Changes - f43e320: test - c10dfdd: test - c10dfdd: test - c10dfdd: test - 2d81677: test changeset ## 0.0.16 ### Patch Changes - 515635f: rename package
{ "source": "openauthjs/openauth", "title": "packages/openauth/CHANGELOG.md", "url": "https://github.com/openauthjs/openauth/blob/master/packages/openauth/CHANGELOG.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 6011 }
# OpenAuth Astro Client The files to note are - `src/auth.ts` - creates the client that is used to interact with the auth server - `src/middleware.ts` - middleware that runs to verify access tokens, refresh them if out of date, and redirect the user to the auth server if they are not logged in - `src/pages/callback.ts` - the callback endpoint that receives the auth code and exchanges it for an access/refresh token
{ "source": "openauthjs/openauth", "title": "examples/client/astro/README.md", "url": "https://github.com/openauthjs/openauth/blob/master/examples/client/astro/README.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 419 }
# jwt-api ## 1.0.1 ### Patch Changes - Updated dependencies [8b5f490] - @openauthjs/[email protected]
{ "source": "openauthjs/openauth", "title": "examples/client/jwt-api/CHANGELOG.md", "url": "https://github.com/openauthjs/openauth/blob/master/examples/client/jwt-api/CHANGELOG.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 103 }
# JWT API This simple API verifies the `Authorization` header using the OpenAuth client and returns the subject. Run it using. ```bash bun run --hot index.ts ``` Then visit `http://localhost:3001/` in your browser. This works with the [React Client](../react) example that makes a call to this API after the auth flow.
{ "source": "openauthjs/openauth", "title": "examples/client/jwt-api/README.md", "url": "https://github.com/openauthjs/openauth/blob/master/examples/client/jwt-api/README.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 323 }
# nextjs ## 0.1.6 ### Patch Changes - Updated dependencies [8b5f490] - @openauthjs/[email protected] ## 0.1.5 ### Patch Changes - Updated dependencies [80238de] - @openauthjs/[email protected] ## 0.1.4 ### Patch Changes - Updated dependencies [6da8647] - @openauthjs/[email protected] ## 0.1.3 ### Patch Changes - Updated dependencies [83125f1] - @openauthjs/[email protected] ## 0.1.2 ### Patch Changes - Updated dependencies [8c3f050] - Updated dependencies [0f93def] - @openauthjs/[email protected] ## 0.1.1 ### Patch Changes - Updated dependencies [584728f] - Updated dependencies [41acdc2] - Updated dependencies [2aa531b] - @openauthjs/[email protected]
{ "source": "openauthjs/openauth", "title": "examples/client/nextjs/CHANGELOG.md", "url": "https://github.com/openauthjs/openauth/blob/master/examples/client/nextjs/CHANGELOG.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 671 }
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). ## Getting Started Make sure your OpenAuth server is running at `http://localhost:3000`. Then start the development server: ```bash npm run dev # or yarn dev # or pnpm dev # or bun dev ``` Open [http://localhost:3001](http://localhost:3001) with your browser and click **Login with OpenAuth** to start the auth flow. ## Files - [`app/auth.ts`](app/auth.ts): OpenAuth client and helper to set tokens in cookies. - [`app/actions.ts`](app/actions.ts): Actions to get current logged in user, and to login and logout. - [`app/api/callback/route.ts`](app/api/callback/route.ts): Callback route for OpenAuth. - [`app/page.tsx`](app/page.tsx): Shows login and logout buttons and the current user.
{ "source": "openauthjs/openauth", "title": "examples/client/nextjs/README.md", "url": "https://github.com/openauthjs/openauth/blob/master/examples/client/nextjs/README.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 845 }
# React SPA Auth This uses the token + pkce flow to authenticate a user. Start it using. ```bash bun run dev ``` Then visit `http://localhost:5173` in your browser. It needs the OpenAuth server running at `http://localhost:3000`. Start it from the `examples/` dir using. ```bash bun run --hot issuer/bun/issuer.ts ``` You might have to install some workspace packages first, run this in the root: ```bash $ bun install $ cd packages/openauth $ bun run build ``` And optionally a JWT API running to get the user subject on `http://localhost:3001`. Start it using. ```bash bun run --hot client/jwt-api/index.ts ```
{ "source": "openauthjs/openauth", "title": "examples/client/react/README.md", "url": "https://github.com/openauthjs/openauth/blob/master/examples/client/react/README.md", "date": "2024-11-12T20:58:02", "stars": 4721, "description": "▦ Universal, standards-based auth provider.", "file_size": 621 }