smashspace 0.1.8 → 0.1.9
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 +4 -3
- package/dist/smash.mjs +32 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,9 +55,10 @@ It writes (and is safe to re-run — existing config is kept unless `--force`):
|
|
|
55
55
|
- `.smashspace.json` — pins the instance + space (which space this dir talks to).
|
|
56
56
|
- `.mcp.json` — wires the `smashspace` MCP server (merged, other servers kept).
|
|
57
57
|
|
|
58
|
-
Plain `smash init` (no space flag)
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
Plain `smash init` (no space flag) doesn't guess: it prints how to specify a
|
|
59
|
+
space (`--new-space` / `--space-id`) and exits without writing anything. Same,
|
|
60
|
+
predictable behaviour in a terminal, an agent, or CI — nothing hangs, nothing is
|
|
61
|
+
written half-way. (`--skills-only` installs just the skill, no space needed.)
|
|
61
62
|
|
|
62
63
|
Flags: `--new-space <name>`, `--space-id <id>` (`--board-id` is a legacy alias),
|
|
63
64
|
`--skills-only` (just the operator skill), `--no-mcp`, `--force`. Sign in once
|
package/dist/smash.mjs
CHANGED
|
@@ -4781,34 +4781,45 @@ program2.command("init").description(
|
|
|
4781
4781
|
return false;
|
|
4782
4782
|
}
|
|
4783
4783
|
};
|
|
4784
|
+
const baseUrl = resolveBaseUrl();
|
|
4785
|
+
if (!opts.skillsOnly && !opts.newSpace && !opts.spaceId && !opts.boardId) {
|
|
4786
|
+
console.error(
|
|
4787
|
+
[
|
|
4788
|
+
"\u30B9\u30DA\u30FC\u30B9\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002\u6B21\u306E\u3069\u3061\u3089\u304B\u3092\u4ED8\u3051\u3066\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044:",
|
|
4789
|
+
"",
|
|
4790
|
+
' smash init --new-space "Your Project" # \u65B0\u3057\u304F\u4F5C\u3063\u3066\u7D50\u3073\u3064\u3051\u308B',
|
|
4791
|
+
" smash init --space-id s_xxxxxxxx # \u65E2\u5B58\u306E\u30B9\u30DA\u30FC\u30B9\u306B\u7D50\u3073\u3064\u3051\u308B",
|
|
4792
|
+
"",
|
|
4793
|
+
"\u65E2\u5B58\u30B9\u30DA\u30FC\u30B9\u306E id \u306F `smash space list` \u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002",
|
|
4794
|
+
"\u30B9\u30AD\u30EB\u3060\u3051\u5165\u308C\u305F\u3044\u5834\u5408\u306F `smash init --skills-only`\u3002"
|
|
4795
|
+
].join("\n")
|
|
4796
|
+
);
|
|
4797
|
+
process.exit(1);
|
|
4798
|
+
}
|
|
4784
4799
|
await put(".claude/skills/smash/SKILL.md", SMASH_SKILL_MD);
|
|
4785
4800
|
await put(".codex/skills/smash/SKILL.md", SMASH_SKILL_MD);
|
|
4786
4801
|
await put(".codex/skills/smash/agents/openai.yaml", OPENAI_AGENT_YAML);
|
|
4787
|
-
actions.push(
|
|
4788
|
-
|
|
4789
|
-
)
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
boardId = opts.spaceId ?? opts.boardId ?? "s_xxxxxxxx";
|
|
4802
|
+
actions.push("\u2713 operator skill \u2192 .claude/skills/smash/ + .codex/skills/smash/");
|
|
4803
|
+
let boardId = "";
|
|
4804
|
+
if (!opts.skillsOnly) {
|
|
4805
|
+
if (opts.newSpace) {
|
|
4806
|
+
const space = await api(
|
|
4807
|
+
"/api/boards",
|
|
4808
|
+
{ method: "POST", body: JSON.stringify({ title: opts.newSpace }) },
|
|
4809
|
+
baseUrl
|
|
4810
|
+
);
|
|
4811
|
+
boardId = space.id;
|
|
4812
|
+
actions.push(`\u2713 created space "${space.title || opts.newSpace}" (${space.id})`);
|
|
4813
|
+
} else {
|
|
4814
|
+
boardId = opts.spaceId ?? opts.boardId;
|
|
4815
|
+
}
|
|
4802
4816
|
}
|
|
4803
|
-
const placeholder = boardId === "s_xxxxxxxx";
|
|
4804
4817
|
if (!opts.skillsOnly) {
|
|
4805
4818
|
if (await exists(CONFIG_FILENAME) && !opts.force) {
|
|
4806
4819
|
actions.push(`\u2022 ${CONFIG_FILENAME} exists \u2014 kept (use --force)`);
|
|
4807
4820
|
} else {
|
|
4808
4821
|
await put(CONFIG_FILENAME, smashspaceJson(baseUrl, boardId));
|
|
4809
|
-
actions.push(
|
|
4810
|
-
`\u2713 ${CONFIG_FILENAME}${placeholder ? " (placeholder space_id \u2014 set a real one below)" : ` \u2192 ${boardId}`}`
|
|
4811
|
-
);
|
|
4822
|
+
actions.push(`\u2713 ${CONFIG_FILENAME} \u2192 ${boardId}`);
|
|
4812
4823
|
}
|
|
4813
4824
|
if (opts.mcp !== false) {
|
|
4814
4825
|
let mcp = { mcpServers: {} };
|
|
@@ -4843,19 +4854,14 @@ program2.command("init").description(
|
|
|
4843
4854
|
}
|
|
4844
4855
|
}
|
|
4845
4856
|
const next = ["", "Next:"];
|
|
4846
|
-
if (!opts.skillsOnly
|
|
4847
|
-
next.push(" This project isn't pinned to a space yet. Pick one:");
|
|
4848
|
-
next.push(' smash init --new-space "My Project" --force # create + pin a new space');
|
|
4849
|
-
next.push(" smash init --space-id s_xxxxxxxx --force # pin an existing space");
|
|
4850
|
-
next.push(" (find ids with: smash space list)");
|
|
4851
|
-
} else if (!opts.skillsOnly) {
|
|
4857
|
+
if (!opts.skillsOnly) {
|
|
4852
4858
|
next.push(" smash login # if you haven't yet \u2014 then you're ready.");
|
|
4853
4859
|
}
|
|
4854
4860
|
next.push(
|
|
4855
4861
|
" \u2192 Claude Code / Codex pick up .claude|.codex/skills/smash automatically"
|
|
4856
4862
|
);
|
|
4857
4863
|
if (getOpts().json) {
|
|
4858
|
-
show({ cwd, actions, baseUrl, boardId:
|
|
4864
|
+
show({ cwd, actions, baseUrl, boardId: boardId || null });
|
|
4859
4865
|
return;
|
|
4860
4866
|
}
|
|
4861
4867
|
show(void 0, [...actions, ...next]);
|