wordspace 0.0.7 → 0.0.8
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/commands/run.js +2 -2
- package/dist/index.js +1 -1
- package/dist/steps/auto-init.js +31 -3
- package/package.json +1 -1
package/dist/commands/run.js
CHANGED
|
@@ -46,9 +46,9 @@ export async function run(target, force) {
|
|
|
46
46
|
}
|
|
47
47
|
prosePath = target;
|
|
48
48
|
}
|
|
49
|
-
const prompt =
|
|
49
|
+
const prompt = `/prose run ${prosePath}`;
|
|
50
50
|
console.log();
|
|
51
|
-
log.info(
|
|
51
|
+
log.info(prompt);
|
|
52
52
|
console.log();
|
|
53
53
|
const exitCode = spawnClaude(prompt, cwd);
|
|
54
54
|
process.exit(exitCode);
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { search } from "./commands/search.js";
|
|
|
4
4
|
import { add } from "./commands/add.js";
|
|
5
5
|
import { run } from "./commands/run.js";
|
|
6
6
|
import * as log from "./lib/log.js";
|
|
7
|
-
const VERSION = "0.0.
|
|
7
|
+
const VERSION = "0.0.8";
|
|
8
8
|
const HELP = `
|
|
9
9
|
Usage: wordspace <command> [options]
|
|
10
10
|
|
package/dist/steps/auto-init.js
CHANGED
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
|
+
import { execSync } from "node:child_process";
|
|
2
3
|
import { join } from "node:path";
|
|
3
4
|
import { setupClaude } from "./setup-claude.js";
|
|
4
5
|
import { createDirs } from "./create-dirs.js";
|
|
5
6
|
import * as log from "../lib/log.js";
|
|
7
|
+
const SKILL_PACKAGES = [
|
|
8
|
+
"frames-engineering/skills",
|
|
9
|
+
"frames-engineering/wordspace",
|
|
10
|
+
];
|
|
11
|
+
function installSkills(cwd) {
|
|
12
|
+
for (const pkg of SKILL_PACKAGES) {
|
|
13
|
+
try {
|
|
14
|
+
execSync(`npx -y skills add ${pkg} --all`, {
|
|
15
|
+
cwd,
|
|
16
|
+
stdio: "inherit",
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
log.warn(`Could not install skills from ${pkg}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
6
24
|
/** Silently initialize the project if not already done. */
|
|
7
25
|
export function ensureInit(cwd) {
|
|
8
26
|
const hasSettings = existsSync(join(cwd, ".claude", "settings.local.json"));
|
|
9
27
|
const hasOutput = existsSync(join(cwd, "output"));
|
|
10
|
-
|
|
28
|
+
const skillsDir = join(cwd, ".agents", "skills");
|
|
29
|
+
const hasSkills = existsSync(join(skillsDir, "open-prose")) &&
|
|
30
|
+
existsSync(join(skillsDir, "agentwallet")) &&
|
|
31
|
+
existsSync(join(skillsDir, "registry")) &&
|
|
32
|
+
existsSync(join(skillsDir, "wordspace"));
|
|
33
|
+
if (hasSettings && hasOutput && hasSkills)
|
|
11
34
|
return;
|
|
12
35
|
log.info("Auto-initializing project...");
|
|
13
|
-
|
|
14
|
-
|
|
36
|
+
if (!hasSettings || !hasOutput) {
|
|
37
|
+
setupClaude(cwd);
|
|
38
|
+
createDirs(cwd);
|
|
39
|
+
}
|
|
40
|
+
if (!hasSkills) {
|
|
41
|
+
installSkills(cwd);
|
|
42
|
+
}
|
|
15
43
|
}
|