@longzai-intelligence-agent-tools/core 0.0.7 → 0.0.9
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 +12 -14
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -120,24 +120,22 @@ declare const COMMON_SOURCE: 'agents/agent.md';
|
|
|
120
120
|
*/
|
|
121
121
|
declare const IDE_OUTPUT_DIRS: Readonly<Record<AgentType, string>>;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* 根指令文件生成区起始标记
|
|
124
124
|
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
125
|
+
* 根指令文件(CLAUDE.md / AGENTS.md)采用单文件标记区锚定方案:
|
|
126
|
+
* 合成内容包裹在一对固定标记之间,工具只改标记之间的内容,
|
|
127
|
+
* 标记之外的手写内容永不触碰。
|
|
128
|
+
*
|
|
129
|
+
* 标记使用 HTML 注释格式,对 IDE 与 markdown 渲染均不可见,
|
|
130
|
+
* 不污染正文渲染,但工具可据此定位生成区边界。
|
|
127
131
|
*/
|
|
128
|
-
declare const
|
|
132
|
+
declare const GENERATED_BLOCK_BEGIN: '<!-- BEGIN Lzi Generated(工具维护,请勿手改;修改请编辑 .lzi/ 真源后运行 sync) -->';
|
|
129
133
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* 根指令文件(CLAUDE.md / AGENTS.md)生成两份:
|
|
133
|
-
*
|
|
134
|
-
* 1. <原名>.generated.md:真正的合成产物(共同 + 独有内容),文件名带后缀标识。
|
|
135
|
-
* 2. <原名>(如 CLAUDE.md):入口文件,正文为此引导文本,指向对应的 .generated.md。
|
|
134
|
+
* 根指令文件生成区结束标记
|
|
136
135
|
*
|
|
137
|
-
*
|
|
138
|
-
* 入口文件保留原名是因为 IDE 以此为读取入口,实际内容载体是 .generated.md。
|
|
136
|
+
* 与 {@link GENERATED_BLOCK_BEGIN} 成对使用,界定生成区尾部。
|
|
139
137
|
*/
|
|
140
|
-
declare const
|
|
138
|
+
declare const GENERATED_BLOCK_END: '<!-- END Lzi Generated -->';
|
|
141
139
|
/**
|
|
142
140
|
* 内置合成规则表
|
|
143
141
|
*
|
|
@@ -202,4 +200,4 @@ declare const AUTO_AGENT_KEYWORD: 'auto';
|
|
|
202
200
|
*/
|
|
203
201
|
declare const detectAgentTypes: (projectRoot: string) => Promise<readonly AgentType[]>;
|
|
204
202
|
//#endregion
|
|
205
|
-
export { AUTO_AGENT_KEYWORD, type AgentToolsConfig, type AgentType, BUILTIN_PLACEHOLDERS, CATEGORY_RULES, COMMON_SOURCE, type Category, type CategoryRule, DEFAULT_SOURCES, ENV_KEYS,
|
|
203
|
+
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, 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
|
|
42
|
+
`},r=`.lzi`,i=`agents/agent.md`,a={claude:`.claude`,trae:`.trae`,zcode:`.zcode`},o=`<!-- BEGIN Lzi Generated(工具维护,请勿手改;修改请编辑 .lzi/ 真源后运行 sync) -->`,s=`<!-- END Lzi Generated -->`,c={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`}]},l={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`}}},u=[`claude`,`trae`,`zcode`],d={AGENT_TYPE:`LZI_AGENT_TYPE`,PLACEHOLDER_PREFIX:`LZI_PLACEHOLDER_`},f={DATE:()=>new Date().toISOString().slice(0,10),PROJECT_NAME:()=>process.cwd().split(`/`).pop()??``},p=`auto`,m=async t=>{try{return await e(t),!0}catch{return!1}},h=async e=>{let n=t(e,r);if(!await m(n))return[];let i=[];for(let e of u){let r=c[e];(await Promise.all(r.map(async e=>m(t(n,e.agentSource))))).some(e=>e)&&i.push(e)}return i};export{p as AUTO_AGENT_KEYWORD,f as BUILTIN_PLACEHOLDERS,l as CATEGORY_RULES,i as COMMON_SOURCE,n as DEFAULT_SOURCES,d as ENV_KEYS,o as GENERATED_BLOCK_BEGIN,s as GENERATED_BLOCK_END,a as IDE_OUTPUT_DIRS,r as LZI_DIR,c as SYNTHESIS_RULES,u as VALID_AGENTS,h 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.9",
|
|
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",
|