@colin4k1024/tsp 2.4.2 → 2.4.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/README.md CHANGED
@@ -35,6 +35,7 @@ node scripts/install-apply.js --profile full --target codex
35
35
  - 内置 React/Next 优先的前端工程规范与 UI/UX 治理能力,用统一规则承接页面、交互和体验质量。
36
36
  - 内置 ECC 风格的 specialist agents、快捷 commands、rules packs、runtime hooks、contexts 与 examples,提升整体可用性。
37
37
  - npm 安装包内置 `crates/oris-claude-bridge` 与多平台预构建二进制,安装时按用户操作系统自动选择 bridge,无需本机 Rust 工具链。
38
+ - **持续净化原则**:每次大版本升级,目标是尽可能移除当前版本引入的所有补丁程序与临时绕行方案——补丁是现实妥协,不是长期设计;每一轮演进都应让平台比上一版更干净。
38
39
 
39
40
  ## 框架说明
40
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colin4k1024/tsp",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "description": "Open-source Team Skills Platform for role-based AI delivery workflows, shared skills, hooks, commands, and multi-platform installs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -71,6 +71,7 @@
71
71
  "docs:preview": "vitepress preview docs"
72
72
  },
73
73
  "bin": {
74
+ "tsp": "bin/tsp-create.js",
74
75
  "tsp-create": "bin/tsp-create.js",
75
76
  "tsp-install": "bin/tsp-install.js"
76
77
  },
@@ -87,7 +87,9 @@ function dedupeRecentSessions(searchDirs) {
87
87
  * Priority (highest to lowest):
88
88
  * 1. Exact worktree (cwd) match — most recent
89
89
  * 2. Same project name match — most recent
90
- * 3. Fallback to overall most recent (original behavior)
90
+ *
91
+ * If neither matches, returns null so that a fresh project never receives
92
+ * another project's session context.
91
93
  *
92
94
  * Sessions are already sorted newest-first, so the first match in each
93
95
  * category wins.
@@ -107,19 +109,11 @@ function selectMatchingSession(sessions, cwd, currentProject) {
107
109
 
108
110
  let projectMatch = null;
109
111
  let projectMatchContent = null;
110
- let fallbackSession = null;
111
- let fallbackContent = null;
112
112
 
113
113
  for (const session of sessions) {
114
114
  const content = readFile(session.path);
115
115
  if (!content) continue;
116
116
 
117
- // Cache first readable session+content pair for fallback
118
- if (!fallbackSession) {
119
- fallbackSession = session;
120
- fallbackContent = content;
121
- }
122
-
123
117
  // Extract **Worktree:** field
124
118
  const worktreeMatch = content.match(/\*\*Worktree:\*\*\s*(.+)$/m);
125
119
  const sessionWorktree = worktreeMatch ? worktreeMatch[1].trim() : '';
@@ -145,12 +139,7 @@ function selectMatchingSession(sessions, cwd, currentProject) {
145
139
  return { session: projectMatch, content: projectMatchContent, matchReason: 'project' };
146
140
  }
147
141
 
148
- // Fallback: most recent readable session (original behavior)
149
- if (fallbackSession) {
150
- return { session: fallbackSession, content: fallbackContent, matchReason: 'recency-fallback' };
151
- }
152
-
153
- log('[SessionStart] All session files were unreadable');
142
+ // No match found do not inject another project's session context
154
143
  return null;
155
144
  }
156
145
 
@@ -186,7 +175,7 @@ async function main() {
186
175
  additionalContextParts.push(`Previous session summary:\n${content}`);
187
176
  }
188
177
  } else {
189
- log('[SessionStart] No matching session found');
178
+ log(`[SessionStart] No session matched current project (${currentProject || cwd}); skipping context injection`);
190
179
  }
191
180
  }
192
181