@blxzer/cursor-trellis 0.2.1 → 0.2.3

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/README.zh-CN.md CHANGED
@@ -128,23 +128,25 @@ trellis uninstall -y
128
128
 
129
129
  ---
130
130
 
131
- ## smart-search
131
+ ## smart-search 集成
132
132
 
133
- 内置于本包(`vendor/smart-search/`,bin `smart-search`)。
133
+ Trellis 集成了 [smart-search](https://github.com/blxzer77/smart-search),这是一个用于 Agent 从网络检索当前信息的 CLI 工具。当你安装 cursor-trellis 时,smart-search 会自动作为依赖安装。
134
134
 
135
- | 主题 | 说明 |
136
- | --- | --- |
137
- | 是什么 | 用于 search、fetch、doctor、research 的 CLI,**不是** MCP 服务 |
138
- | Agent 何时用 | 项目 `.trellis/workflow.md` 约定外部事实在健康时**优先**走 smart-search |
139
- | 配置 | `smart-search setup`、`smart-search doctor`(见 [vendor README](vendor/smart-search/README.zh-CN.md)) |
140
- | Readiness | `init`/`update` 默认检查,可用 `--skip-readiness` 跳过 |
135
+ **安装:**
136
+
137
+ 当你安装 cursor-trellis 时,smart-search 会自动安装:
141
138
 
142
139
  ```bash
143
- smart-search search "查询" --format json
144
- smart-search doctor --format markdown
140
+ npm install -g @blxzer/cursor-trellis
141
+ # smart-search 现已可用
142
+ smart-search --version
145
143
  ```
146
144
 
147
- 更新 vendor 快照为维护者操作(本包内 `pnpm run sync:smart-search`)。见 [../../docs/maintainers.md](../../docs/maintainers.md)。
145
+ **链接:**
146
+ - npm 包:https://www.npmjs.com/package/@blxzer/smart-search
147
+ - GitHub 仓库:https://github.com/blxzer77/smart-search
148
+
149
+ 工作流会在 smart-search 可用时,将外部事实查询路由到它。详见仓库了解配置和使用详情。
148
150
 
149
151
  ---
150
152
 
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { fileURLToPath } from "node:url";
4
+ import { dirname, join } from "node:path";
5
+ import { spawn } from "node:child_process";
6
+
7
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const packageRoot = join(__dirname, "..");
9
+
10
+ // Forward to @blxzer/smart-search dependency
11
+ const smartSearchBin = join(
12
+ packageRoot,
13
+ "node_modules",
14
+ "@blxzer",
15
+ "smart-search",
16
+ "bin",
17
+ "smart-search.js"
18
+ );
19
+
20
+ const child = spawn(process.execPath, [smartSearchBin, ...process.argv.slice(2)], {
21
+ stdio: "inherit",
22
+ windowsHide: true,
23
+ });
24
+
25
+ child.on("exit", (code) => {
26
+ process.exit(code ?? 1);
27
+ });
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.2.1",
3
+ "description": "v0.2.1 — 移除 vendored smart-search,改用 npm 依赖。",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**@blxzer/cursor-trellis 0.2.1 和 @blxzer/cursor-trellis-core 0.2.1**\n\n### Changed\n- refactor: 移除 vendored smart-search (37个源文件 + wrapper),改用 npm 依赖 @blxzer/smart-search@^0.1.0\n- chore: 从版本控制移除 .trellis/ 和 .cursor/ 目录(这些是生成的工件)\n- docs: 简化用户文档,去除营销化语言\n- test: 删除 smart-search vendor 相关测试和脚本\n\n### Upgrade notes\n- smart-search 现在作为 npm 依赖自动安装\n- 运行 `npm install -g @blxzer/cursor-trellis` 会自动安装 smart-search",
7
+ "migrations": [],
8
+ "notes": "首次将 smart-search 从 vendor 迁移到 npm 依赖的版本。"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.2.3",
3
+ "description": "v0.2.3 — 修复 smart-search bin wrapper。",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**@blxzer/cursor-trellis 0.2.3 和 @blxzer/cursor-trellis-core 0.2.3**\n\n### Fixed\n- fix(bin): 添加 smart-search bin wrapper,将命令转发到 @blxzer/smart-search 依赖包\n- fix(scripts): 更新 check-release-pack-contents.js,移除 vendor/ 路径检查\n- docs(readme): 更新中文 README,移除 vendor 相关说明\n\n### Upgrade notes\n- 运行 `npm install -g @blxzer/cursor-trellis@latest` 升级\n- smart-search 命令现在可以全局使用",
7
+ "migrations": [],
8
+ "notes": "修复 smart-search 命令不可用的问题。"
9
+ }
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@blxzer/cursor-trellis",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "AI capabilities grow like ivy — Trellis provides the structure to guide them along a disciplined path",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "bin": {
9
9
  "trellis": "./bin/trellis.js",
10
- "tl": "./bin/trellis.js"
10
+ "tl": "./bin/trellis.js",
11
+ "smart-search": "./bin/smart-search.js"
11
12
  },
12
13
  "publishConfig": {
13
14
  "access": "public"
@@ -35,7 +36,7 @@
35
36
  "inquirer": "^9.3.7",
36
37
  "undici": "^6.21.0",
37
38
  "zod": "^4.4.2",
38
- "@blxzer/cursor-trellis-core": "0.2.1"
39
+ "@blxzer/cursor-trellis-core": "0.2.3"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@eslint/js": "^9.18.0",
@@ -1,45 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { spawnSync } from "node:child_process";
4
- import fs from "node:fs";
5
- import path from "node:path";
6
- import { fileURLToPath } from "node:url";
3
+ // smart-search is now a dependency (@blxzer/smart-search)
4
+ // and handles its own postinstall setup.
5
+ // This script is kept for backward compatibility but does nothing.
7
6
 
8
- const packageRoot = path.resolve(
9
- path.dirname(fileURLToPath(import.meta.url)),
10
- "..",
11
- );
12
- const vendorRoot = path.join(packageRoot, "vendor", "smart-search");
13
- const smartSearchPostinstall = path.join(
14
- vendorRoot,
15
- "npm",
16
- "scripts",
17
- "postinstall.js",
18
- );
19
-
20
- if (process.env.TRELLIS_SKIP_SMART_SEARCH_POSTINSTALL === "1") {
21
- console.log(
22
- "Skipping smart-search runtime setup (TRELLIS_SKIP_SMART_SEARCH_POSTINSTALL=1).",
23
- );
24
- process.exit(0);
25
- }
26
-
27
- if (!fs.existsSync(smartSearchPostinstall)) {
28
- console.error(
29
- `Trellis smart-search runtime setup script was not found: ${smartSearchPostinstall}`,
30
- );
31
- process.exit(1);
32
- }
33
-
34
- const result = spawnSync(process.execPath, [smartSearchPostinstall], {
35
- cwd: vendorRoot,
36
- stdio: "inherit",
37
- windowsHide: true,
38
- });
39
-
40
- if (result.error) {
41
- console.error(`Trellis smart-search runtime setup failed: ${result.error.message}`);
42
- process.exit(1);
43
- }
44
-
45
- process.exit(result.status ?? 1);
7
+ process.exit(0);