@longzai-intelligence-agent-tools/core 0.0.3 → 0.0.4

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 CHANGED
@@ -111,6 +111,21 @@ 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 生成的类别产物(commands/rules/skills)文件名追加此后缀,
118
+ * 使其与手写文件明确区分(根 CLAUDE.md/AGENTS.md 因 IDE 固定识别其名而不加)。
119
+ * 如 monorepo-quality-check.md → monorepo-quality-check.generated.md。
120
+ */
121
+ declare const GENERATED_FILE_SUFFIX: '.generated';
122
+ /**
123
+ * 根指令文件(CLAUDE.md/AGENTS.md)生成标识
124
+ *
125
+ * 根文件名被 IDE 固定识别,不能加文件名后缀,故在内容首行注入此 HTML 注释作为生成标识。
126
+ * 不影响 markdown 渲染,打开文件第一行即可见。
127
+ */
128
+ declare const GENERATED_FILE_HEADER: '<!-- 本文件由 lzi-agent-cli 生成,请勿手改,修改请编辑 .lzi/ 真源后运行 bun run agent:sync -->';
114
129
  /**
115
130
  * 内置合成规则表
116
131
  *
@@ -140,9 +155,13 @@ declare const VALID_AGENTS: readonly AgentType[];
140
155
  * 环境变量名称常量
141
156
  */
142
157
  declare const ENV_KEYS: {
143
- /** 当前 Agent 类型 */
158
+ /**
159
+ * 当前 Agent 类型
160
+ */
144
161
  readonly AGENT_TYPE: 'LZI_AGENT_TYPE';
145
- /** 占位符环境变量前缀 */
162
+ /**
163
+ * 占位符环境变量前缀
164
+ */
146
165
  readonly PLACEHOLDER_PREFIX: 'LZI_PLACEHOLDER_';
147
166
  };
148
167
  /**
@@ -152,4 +171,4 @@ declare const ENV_KEYS: {
152
171
  */
153
172
  declare const BUILTIN_PLACEHOLDERS: Readonly<Record<string, () => string>>;
154
173
  //#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 };
174
+ export { type AgentToolsConfig, type AgentType, BUILTIN_PLACEHOLDERS, CATEGORY_RULES, COMMON_SOURCE, type Category, type CategoryRule, DEFAULT_SOURCES, ENV_KEYS, GENERATED_FILE_HEADER, GENERATED_FILE_SUFFIX, IDE_OUTPUT_DIRS, LZI_DIR, 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`}]},a={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`}}},o=[`claude`,`trae`,`zcode`],s={AGENT_TYPE:`LZI_AGENT_TYPE`,PLACEHOLDER_PREFIX:`LZI_PLACEHOLDER_`},c={DATE:()=>new Date().toISOString().slice(0,10),PROJECT_NAME:()=>process.cwd().split(`/`).pop()??``};export{c as BUILTIN_PLACEHOLDERS,a as CATEGORY_RULES,n as COMMON_SOURCE,e as DEFAULT_SOURCES,s as ENV_KEYS,r as IDE_OUTPUT_DIRS,t as LZI_DIR,i as SYNTHESIS_RULES,o as VALID_AGENTS};
42
+ `},t=`.lzi`,n=`agents/agent.md`,r={claude:`.claude`,trae:`.trae`,zcode:`.zcode`},i=`.generated`,a=`<!-- 本文件由 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,a as GENERATED_FILE_HEADER,i as GENERATED_FILE_SUFFIX,r as IDE_OUTPUT_DIRS,t as LZI_DIR,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",
3
+ "version": "0.0.4",
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",