@wenrwa/marketplace-cli 0.7.2 → 0.7.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.
|
@@ -80,3 +80,17 @@ describe('hasClaudeSessionHistory', () => {
|
|
|
80
80
|
expect(result).toBe(true);
|
|
81
81
|
});
|
|
82
82
|
});
|
|
83
|
+
describe('a registered folder with a trailing slash (2026-10-04 "Session ID … is already in use")', () => {
|
|
84
|
+
it('slugs exactly like the same folder without the slash', () => {
|
|
85
|
+
expect((0, claudeSessionHistory_1.claudeProjectSlug)('/Users/me/Wenrwa Projects/Site/')).toBe((0, claudeSessionHistory_1.claudeProjectSlug)('/Users/me/Wenrwa Projects/Site'));
|
|
86
|
+
expect((0, claudeSessionHistory_1.claudeProjectSlug)('/Users/me/Wenrwa Projects/Site/')).toBe('-Users-me-Wenrwa-Projects-Site');
|
|
87
|
+
});
|
|
88
|
+
it('finds the agent transcript, so the launch resumes instead of re-creating the session', () => {
|
|
89
|
+
const seen = [];
|
|
90
|
+
const found = (0, claudeSessionHistory_1.hasAgentSessionHistory)('/Users/me/Wenrwa Projects/Site/', 'abc', {
|
|
91
|
+
env: { CLAUDE_CONFIG_DIR: '/cfg' },
|
|
92
|
+
existsSync: (p) => { seen.push(String(p)); return String(p) === '/cfg/projects/-Users-me-Wenrwa-Projects-Site/abc.jsonl'; },
|
|
93
|
+
});
|
|
94
|
+
expect(found).toBe(true);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
@@ -67,7 +67,13 @@ const path = __importStar(require("path"));
|
|
|
67
67
|
/** Claude Code's project-directory naming rule — see module doc for the
|
|
68
68
|
* empirical verification. */
|
|
69
69
|
function claudeProjectSlug(cwd) {
|
|
70
|
-
|
|
70
|
+
// Claude Code names the folder after the cwd WITHOUT a trailing slash. The
|
|
71
|
+
// local folder registry stores paths with one ("…/MyProject/"), which made
|
|
72
|
+
// the slug end in "-", missed the agent's transcript, and launched
|
|
73
|
+
// `--session-id <existing id>` → "Session ID … is already in use" on every
|
|
74
|
+
// reopen (2026-10-04). Normalise first.
|
|
75
|
+
const normalized = cwd.length > 1 ? cwd.replace(/\/+$/, '') : cwd;
|
|
76
|
+
return normalized.replace(/[^a-zA-Z0-9]/g, '-');
|
|
71
77
|
}
|
|
72
78
|
/** Where Claude Code keeps its config + session files: `$CLAUDE_CONFIG_DIR`
|
|
73
79
|
* when set (the hosted image's persistent-volume path), else `~/.claude`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenrwa/marketplace-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "CLI tool for the Wenrwa Agent Marketplace \u2014 monitor bounties, agents, workspaces, and treasury from your terminal",
|
|
5
5
|
"author": "Wenrwa <dev@wenrwa.com>",
|
|
6
6
|
"license": "MIT",
|