@longzai-intelligence-agent-tools/core 0.0.3 → 0.0.5
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 +25 -3
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -111,6 +111,24 @@ declare const COMMON_SOURCE: 'agents/agent.md';
|
|
|
111
111
|
* IDE 读取指令文件的根目录,源自 docs/vendors/<ide>.md。
|
|
112
112
|
*/
|
|
113
113
|
declare const IDE_OUTPUT_DIRS: Readonly<Record<AgentType, string>>;
|
|
114
|
+
/**
|
|
115
|
+
* 类别产物文件名生成标识后缀
|
|
116
|
+
*
|
|
117
|
+
* sync 生成的所有产物文件名追加此后缀,使其与手写文件明确区分。
|
|
118
|
+
* 如 monorepo-quality-check.md → monorepo-quality-check.generated.md。
|
|
119
|
+
*/
|
|
120
|
+
declare const GENERATED_FILE_SUFFIX: '.generated';
|
|
121
|
+
/**
|
|
122
|
+
* 根指令文件入口引导模板
|
|
123
|
+
*
|
|
124
|
+
* 根指令文件(CLAUDE.md / AGENTS.md)生成两份:
|
|
125
|
+
* 1. <原名>.generated.md:真正的合成产物(共同 + 独有内容),文件名带后缀标识。
|
|
126
|
+
* 2. <原名>(如 CLAUDE.md):入口文件,正文为此引导文本,指向对应的 .generated.md。
|
|
127
|
+
*
|
|
128
|
+
* 引导文本由工具固定生成(非真源内容),{{generatedFile}} 占位符替换为 .generated.md 文件名。
|
|
129
|
+
* 入口文件保留原名是因为 IDE 以此为读取入口,实际内容载体是 .generated.md。
|
|
130
|
+
*/
|
|
131
|
+
declare const ROOT_ENTRY_TEMPLATE: '本文件为入口占位,实际内容见 {{generatedFile}}(由 lzi-agent-cli 生成,请勿手改,修改请编辑 .lzi/ 真源后运行 bun run agent:sync)。';
|
|
114
132
|
/**
|
|
115
133
|
* 内置合成规则表
|
|
116
134
|
*
|
|
@@ -140,9 +158,13 @@ declare const VALID_AGENTS: readonly AgentType[];
|
|
|
140
158
|
* 环境变量名称常量
|
|
141
159
|
*/
|
|
142
160
|
declare const ENV_KEYS: {
|
|
143
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* 当前 Agent 类型
|
|
163
|
+
*/
|
|
144
164
|
readonly AGENT_TYPE: 'LZI_AGENT_TYPE';
|
|
145
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* 占位符环境变量前缀
|
|
167
|
+
*/
|
|
146
168
|
readonly PLACEHOLDER_PREFIX: 'LZI_PLACEHOLDER_';
|
|
147
169
|
};
|
|
148
170
|
/**
|
|
@@ -152,4 +174,4 @@ declare const ENV_KEYS: {
|
|
|
152
174
|
*/
|
|
153
175
|
declare const BUILTIN_PLACEHOLDERS: Readonly<Record<string, () => string>>;
|
|
154
176
|
//#endregion
|
|
155
|
-
export { type AgentToolsConfig, type AgentType, BUILTIN_PLACEHOLDERS, CATEGORY_RULES, COMMON_SOURCE, type Category, type CategoryRule, DEFAULT_SOURCES, ENV_KEYS, IDE_OUTPUT_DIRS, LZI_DIR, SYNTHESIS_RULES, type SynthesisMode, type SynthesisRule, VALID_AGENTS, type VendorRule };
|
|
177
|
+
export { 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, ROOT_ENTRY_TEMPLATE, SYNTHESIS_RULES, type SynthesisMode, type SynthesisRule, VALID_AGENTS, type VendorRule };
|
package/dist/index.js
CHANGED
|
@@ -39,4 +39,4 @@ const e={"agents/agent.md":`# 共同部分
|
|
|
39
39
|
# frontmatter 各 IDE 不同(claude paths / trae alwaysApply+globs),见 docs/vendors/
|
|
40
40
|
`,"skills/.gitkeep":`# 此目录存放技能真源
|
|
41
41
|
# 命名约定:<base>.md(共同)+ <base>.<type>.md(某 IDE 独有)
|
|
42
|
-
`},t=`.lzi`,n=`agents/agent.md`,r={claude:`.claude`,trae:`.trae`,zcode:`.zcode`},i={claude:[{output:`CLAUDE.md`,commonSource:n,agentSource:`agents/agent.claude.md`}],trae:[{output:`CLAUDE.md`,commonSource:n,agentSource:`agents/agent.claude.md`},{output:`AGENTS.md`,commonSource:n,agentSource:`agents/agent.trae.md`}],zcode:[{output:`AGENTS.md`,commonSource:n,agentSource:`agents/agent.zcode.md`}]},
|
|
42
|
+
`},t=`.lzi`,n=`agents/agent.md`,r={claude:`.claude`,trae:`.trae`,zcode:`.zcode`},i=`.generated`,a=`本文件为入口占位,实际内容见 {{generatedFile}}(由 lzi-agent-cli 生成,请勿手改,修改请编辑 .lzi/ 真源后运行 bun run agent:sync)。`,o={claude:[{output:`CLAUDE.md`,commonSource:n,agentSource:`agents/agent.claude.md`}],trae:[{output:`CLAUDE.md`,commonSource:n,agentSource:`agents/agent.claude.md`},{output:`AGENTS.md`,commonSource:n,agentSource:`agents/agent.trae.md`}],zcode:[{output:`AGENTS.md`,commonSource:n,agentSource:`agents/agent.zcode.md`}]},s={commands:{claude:{ideRoot:r.claude,mode:`append`},trae:{ideRoot:r.trae,mode:`append`},zcode:{ideRoot:r.zcode,mode:`append`}},rules:{claude:{ideRoot:r.claude,mode:`prepend`},trae:{ideRoot:r.trae,mode:`prepend`},zcode:{ideRoot:r.zcode,mode:`prepend`}},skills:{claude:{ideRoot:r.claude,mode:`append`},trae:{ideRoot:r.trae,mode:`append`},zcode:{ideRoot:r.zcode,mode:`append`}}},c=[`claude`,`trae`,`zcode`],l={AGENT_TYPE:`LZI_AGENT_TYPE`,PLACEHOLDER_PREFIX:`LZI_PLACEHOLDER_`},u={DATE:()=>new Date().toISOString().slice(0,10),PROJECT_NAME:()=>process.cwd().split(`/`).pop()??``};export{u as BUILTIN_PLACEHOLDERS,s as CATEGORY_RULES,n as COMMON_SOURCE,e as DEFAULT_SOURCES,l as ENV_KEYS,i as GENERATED_FILE_SUFFIX,r as IDE_OUTPUT_DIRS,t as LZI_DIR,a as ROOT_ENTRY_TEMPLATE,o as SYNTHESIS_RULES,c as VALID_AGENTS};
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longzai-intelligence-agent-tools/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
6
9
|
"type": "module",
|
|
7
10
|
"main": "./dist/index.js",
|
|
8
11
|
"types": "./dist/index.d.ts",
|
|
@@ -12,9 +15,6 @@
|
|
|
12
15
|
"import": "./dist/index.js"
|
|
13
16
|
}
|
|
14
17
|
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "lzi-builder",
|
|
20
20
|
"build:prod": "NODE_ENV=production lzi-builder",
|