@longzai-intelligence-agent-tools/core 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -8
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -127,17 +127,22 @@ declare const IDE_OUTPUT_DIRS: Readonly<Record<AgentType, string>>;
|
|
|
127
127
|
*/
|
|
128
128
|
declare const GENERATED_FILE_SUFFIX: '.generated';
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
130
|
+
* 根指令文件生成区起始标记
|
|
131
131
|
*
|
|
132
|
-
* 根指令文件(CLAUDE.md / AGENTS.md
|
|
132
|
+
* 根指令文件(CLAUDE.md / AGENTS.md)采用单文件标记区锚定方案:
|
|
133
|
+
* 合成内容包裹在一对固定标记之间,工具只改标记之间的内容,
|
|
134
|
+
* 标记之外的手写内容永不触碰。
|
|
133
135
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
+
* 标记使用 HTML 注释格式,对 IDE 与 markdown 渲染均不可见,
|
|
137
|
+
* 不污染正文渲染,但工具可据此定位生成区边界。
|
|
138
|
+
*/
|
|
139
|
+
declare const GENERATED_BLOCK_BEGIN: '<!-- BEGIN Lzi Generated(工具维护,请勿手改;修改请编辑 .lzi/ 真源后运行 sync) -->';
|
|
140
|
+
/**
|
|
141
|
+
* 根指令文件生成区结束标记
|
|
136
142
|
*
|
|
137
|
-
*
|
|
138
|
-
* 入口文件保留原名是因为 IDE 以此为读取入口,实际内容载体是 .generated.md。
|
|
143
|
+
* 与 {@link GENERATED_BLOCK_BEGIN} 成对使用,界定生成区尾部。
|
|
139
144
|
*/
|
|
140
|
-
declare const
|
|
145
|
+
declare const GENERATED_BLOCK_END: '<!-- END Lzi Generated -->';
|
|
141
146
|
/**
|
|
142
147
|
* 内置合成规则表
|
|
143
148
|
*
|
|
@@ -202,4 +207,4 @@ declare const AUTO_AGENT_KEYWORD: 'auto';
|
|
|
202
207
|
*/
|
|
203
208
|
declare const detectAgentTypes: (projectRoot: string) => Promise<readonly AgentType[]>;
|
|
204
209
|
//#endregion
|
|
205
|
-
export { AUTO_AGENT_KEYWORD, type AgentToolsConfig, type AgentType, BUILTIN_PLACEHOLDERS, CATEGORY_RULES, COMMON_SOURCE, type Category, type CategoryRule, DEFAULT_SOURCES, ENV_KEYS, GENERATED_FILE_SUFFIX, IDE_OUTPUT_DIRS, LZI_DIR,
|
|
210
|
+
export { AUTO_AGENT_KEYWORD, type AgentToolsConfig, type AgentType, BUILTIN_PLACEHOLDERS, CATEGORY_RULES, COMMON_SOURCE, type Category, type CategoryRule, DEFAULT_SOURCES, ENV_KEYS, GENERATED_BLOCK_BEGIN, GENERATED_BLOCK_END, GENERATED_FILE_SUFFIX, IDE_OUTPUT_DIRS, LZI_DIR, SYNTHESIS_RULES, type SynthesisMode, type SynthesisRule, VALID_AGENTS, type VendorRule, detectAgentTypes };
|
package/dist/index.js
CHANGED
|
@@ -39,4 +39,4 @@ import"./rolldown-runtime-BqT_7tdF.js";import{stat as e}from"node:fs/promises";i
|
|
|
39
39
|
# frontmatter 各 IDE 不同(claude paths / trae alwaysApply+globs),见 docs/vendors/
|
|
40
40
|
`,"skills/.gitkeep":`# 此目录存放技能真源
|
|
41
41
|
# 命名约定:<base>.md(共同)+ <base>.<type>.md(某 IDE 独有)
|
|
42
|
-
`},r=`.lzi`,i=`agents/agent.md`,a={claude:`.claude`,trae:`.trae`,zcode:`.zcode`},o=`.generated`,s
|
|
42
|
+
`},r=`.lzi`,i=`agents/agent.md`,a={claude:`.claude`,trae:`.trae`,zcode:`.zcode`},o=`.generated`,s=`<!-- BEGIN Lzi Generated(工具维护,请勿手改;修改请编辑 .lzi/ 真源后运行 sync) -->`,c=`<!-- END Lzi Generated -->`,l={claude:[{output:`CLAUDE.md`,commonSource:i,agentSource:`agents/agent.claude.md`}],trae:[{output:`CLAUDE.md`,commonSource:i,agentSource:`agents/agent.claude.md`},{output:`AGENTS.md`,commonSource:i,agentSource:`agents/agent.trae.md`}],zcode:[{output:`AGENTS.md`,commonSource:i,agentSource:`agents/agent.zcode.md`}]},u={commands:{claude:{ideRoot:a.claude,mode:`append`},trae:{ideRoot:a.trae,mode:`append`},zcode:{ideRoot:a.zcode,mode:`append`}},rules:{claude:{ideRoot:a.claude,mode:`prepend`},trae:{ideRoot:a.trae,mode:`prepend`},zcode:{ideRoot:a.zcode,mode:`prepend`}},skills:{claude:{ideRoot:a.claude,mode:`append`},trae:{ideRoot:a.trae,mode:`append`},zcode:{ideRoot:a.zcode,mode:`append`}}},d=[`claude`,`trae`,`zcode`],f={AGENT_TYPE:`LZI_AGENT_TYPE`,PLACEHOLDER_PREFIX:`LZI_PLACEHOLDER_`},p={DATE:()=>new Date().toISOString().slice(0,10),PROJECT_NAME:()=>process.cwd().split(`/`).pop()??``},m=`auto`,h=async t=>{try{return await e(t),!0}catch{return!1}},g=async e=>{let n=t(e,r);if(!await h(n))return[];let i=[];for(let e of d){let r=l[e];(await Promise.all(r.map(async e=>h(t(n,e.agentSource))))).some(e=>e)&&i.push(e)}return i};export{m as AUTO_AGENT_KEYWORD,p as BUILTIN_PLACEHOLDERS,u as CATEGORY_RULES,i as COMMON_SOURCE,n as DEFAULT_SOURCES,f as ENV_KEYS,s as GENERATED_BLOCK_BEGIN,c as GENERATED_BLOCK_END,o as GENERATED_FILE_SUFFIX,a as IDE_OUTPUT_DIRS,r as LZI_DIR,l as SYNTHESIS_RULES,d as VALID_AGENTS,g as detectAgentTypes};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longzai-intelligence-agent-tools/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"files": [
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "lzi-builder",
|
|
20
|
-
"build:prod": "NODE_ENV=production
|
|
20
|
+
"build:prod": "NODE_ENV=production bun run build",
|
|
21
21
|
"prepublishOnly": "bun run build:prod",
|
|
22
22
|
"typecheck": "bun run typecheck:app && bun run typecheck:node && bun run typecheck:test",
|
|
23
|
-
"typecheck:app": "tsgo
|
|
24
|
-
"typecheck:node": "tsgo
|
|
25
|
-
"typecheck:test": "tsgo
|
|
23
|
+
"typecheck:app": "lzi-tsgo typecheck tsconfig/app.json",
|
|
24
|
+
"typecheck:node": "lzi-tsgo typecheck tsconfig/node.json",
|
|
25
|
+
"typecheck:test": "lzi-tsgo typecheck tsconfig/test.json",
|
|
26
26
|
"lint": "oxlint && oxfmt --check",
|
|
27
27
|
"lint:fix": "oxlint --fix && oxfmt",
|
|
28
28
|
"test": "bun test",
|