@claudetools/tools 0.3.6 → 0.3.7

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.
@@ -143,8 +143,12 @@ export function getDefaultProjectId() {
143
143
  // Try config first
144
144
  if (config.defaultProjectId) {
145
145
  if (!isValidProjectId(config.defaultProjectId)) {
146
- throw new Error(`Invalid defaultProjectId in config: ${config.defaultProjectId}. ` +
147
- `Expected format: proj_xxxxxxxxxxxxxxxxxxxx or local_projectname`);
146
+ // Legacy format - convert to local_ format instead of throwing
147
+ const sanitized = config.defaultProjectId.toLowerCase().replace(/[^a-z0-9]/g, '_');
148
+ _defaultProjectId = `local_${sanitized}`;
149
+ console.error(`[claudetools] Warning: Legacy project ID "${config.defaultProjectId}" ` +
150
+ `converted to "${_defaultProjectId}". Run "claudetools cleanup" to fix config.`);
151
+ return _defaultProjectId;
148
152
  }
149
153
  _defaultProjectId = config.defaultProjectId;
150
154
  return _defaultProjectId;
@@ -163,8 +167,12 @@ export async function getDefaultProjectIdAsync() {
163
167
  // Try config first
164
168
  if (config.defaultProjectId) {
165
169
  if (!isValidProjectId(config.defaultProjectId)) {
166
- throw new Error(`Invalid defaultProjectId in config: ${config.defaultProjectId}. ` +
167
- `Expected format: proj_xxxxxxxxxxxxxxxxxxxx or local_projectname`);
170
+ // Legacy format - convert to local_ format instead of throwing
171
+ const sanitized = config.defaultProjectId.toLowerCase().replace(/[^a-z0-9]/g, '_');
172
+ _defaultProjectId = `local_${sanitized}`;
173
+ console.error(`[claudetools] Warning: Legacy project ID "${config.defaultProjectId}" ` +
174
+ `converted to "${_defaultProjectId}". Run "claudetools cleanup" to fix config.`);
175
+ return _defaultProjectId;
168
176
  }
169
177
  _defaultProjectId = config.defaultProjectId;
170
178
  return _defaultProjectId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudetools/tools",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Persistent AI memory, task management, and codebase intelligence for Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",