arashi 1.10.1 → 1.11.1

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
@@ -37,8 +37,9 @@ arashi --version
37
37
  ```
38
38
 
39
39
  By default, the installer places `arashi` in `~/.arashi/bin`, adds that path to your shell config, and in interactive installs offers to enable shell integration for `arashi switch --cd`.
40
+ It also runs a quick `arashi --version` smoke test before declaring success.
40
41
 
41
- If curl installation fails, use npm installation below or the manual release instructions in [`docs/INSTALLATION.md`](./docs/INSTALLATION.md).
42
+ If curl installation fails, or if the smoke test reports a bad release artifact, use npm installation below or the manual release instructions in [`docs/INSTALLATION.md`](./docs/INSTALLATION.md).
42
43
 
43
44
  ### Option 2: Install with npm
44
45
 
@@ -129,6 +130,8 @@ arashi switch --no-default-launch # bypass configured launch mode defa
129
130
 
130
131
  Use the docs site workflow guides when you want setup guidance by outcome instead of by individual command.
131
132
 
133
+ For contributors working on Arashi itself, the project planning workflow in the `arashi-arashi` meta-repo now uses OpenSpec. Older SpecKit-oriented references in legacy planning artifacts are historical context only.
134
+
132
135
  - Hooks and configuration defaults: [arashi.haphazard.dev/workflows/hooks-and-config](https://arashi.haphazard.dev/workflows/hooks-and-config/)
133
136
  - Integrations for VSCode, tmux, and `tmux` plus `sesh`: [arashi.haphazard.dev/workflows/integrations](https://arashi.haphazard.dev/workflows/integrations/)
134
137
  - Agent-assisted and spec-driven change flow: [arashi.haphazard.dev/workflows/agents-and-specs](https://arashi.haphazard.dev/workflows/agents-and-specs/)
@@ -252,8 +255,15 @@ Example config header:
252
255
  "defaults": {
253
256
  "create": {
254
257
  "switch": true,
255
- "launch": true,
256
- "launchMode": "sesh"
258
+ "launch": false
259
+ },
260
+ "editors": {
261
+ "vscode": {
262
+ "create": {
263
+ "launch": true,
264
+ "launchMode": "sesh"
265
+ }
266
+ }
257
267
  },
258
268
  "switch": {
259
269
  "mode": "auto",
@@ -266,7 +276,9 @@ Example config header:
266
276
 
267
277
  `defaults.switch.mode` accepts `"launch"`, `"cd"`, or `"auto"`. `"auto"` prefers parent-shell switching only when shell integration is active.
268
278
 
269
- Defaults precedence for create/switch behavior: explicit CLI flag > opt-out flag > config default > built-in default.
279
+ Use `defaults.create` for terminal `arashi create` behavior. Use `defaults.editors.<host>.create` for editor-specific overrides such as VS Code extension create flows. Supported hosts are `vscode`, `cursor`, and `kiro`.
280
+
281
+ Defaults precedence for create/switch behavior: explicit CLI flag > opt-out flag > config default > built-in default. For editor-hosted `create`, Arashi uses the matching `defaults.editors.<host>.create` override when present and otherwise skips post-create defaults instead of falling back to terminal defaults.
270
282
 
271
283
  ## skills.sh Integration
272
284
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arashi",
3
- "version": "1.10.1",
3
+ "version": "1.11.1",
4
4
  "description": "Git worktree manager for meta-repositories - The eye of the storm for your development workflow",
5
5
  "keywords": [
6
6
  "cli",
@@ -8,6 +8,9 @@
8
8
  "create": {
9
9
  "$ref": "#/definitions/CreateCommandDefaults"
10
10
  },
11
+ "editors": {
12
+ "$ref": "#/definitions/EditorDefaultsConfig"
13
+ },
11
14
  "switch": {
12
15
  "$ref": "#/definitions/SwitchCommandDefaults"
13
16
  }
@@ -93,6 +96,31 @@
93
96
  },
94
97
  "type": "object"
95
98
  },
99
+ "EditorCommandDefaults": {
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "create": {
103
+ "$ref": "#/definitions/CreateCommandDefaults",
104
+ "description": "Editor-scoped create defaults"
105
+ }
106
+ },
107
+ "type": "object"
108
+ },
109
+ "EditorDefaultsConfig": {
110
+ "additionalProperties": false,
111
+ "properties": {
112
+ "cursor": {
113
+ "$ref": "#/definitions/EditorCommandDefaults"
114
+ },
115
+ "kiro": {
116
+ "$ref": "#/definitions/EditorCommandDefaults"
117
+ },
118
+ "vscode": {
119
+ "$ref": "#/definitions/EditorCommandDefaults"
120
+ }
121
+ },
122
+ "type": "object"
123
+ },
96
124
  "LaunchMode": {
97
125
  "enum": ["auto", "sesh"],
98
126
  "type": "string"
@@ -5,11 +5,12 @@
5
5
  * This keeps the npm package size small while providing pre-compiled binaries
6
6
  */
7
7
 
8
- import { access, constants, mkdir } from "node:fs/promises";
8
+ import { access, constants, mkdir, readFile, rm } from "node:fs/promises";
9
9
  import { chmodSync, createWriteStream } from "node:fs";
10
10
  import { dirname, join } from "node:path";
11
11
  import { fileURLToPath } from "node:url";
12
12
  import { get } from "node:https";
13
+ import { spawnSync } from "node:child_process";
13
14
 
14
15
  const __filename = fileURLToPath(import.meta.url);
15
16
  const __dirname = dirname(__filename);
@@ -81,8 +82,36 @@ function downloadFile(url, dest) {
81
82
  });
82
83
  }
83
84
 
85
+ function verifyBinary(binaryPath) {
86
+ const result = spawnSync(binaryPath, ["--version"], {
87
+ encoding: "utf8",
88
+ stdio: ["ignore", "pipe", "pipe"],
89
+ });
90
+
91
+ if (result.error) {
92
+ throw result.error;
93
+ }
94
+
95
+ if (result.status !== 0) {
96
+ const signalDetail = result.signal ? ` (signal: ${result.signal})` : "";
97
+ const output = `${result.stdout ?? ""}${result.stderr ?? ""}`.trim();
98
+ throw new Error(
99
+ `Downloaded binary failed smoke test with exit code ${result.status ?? "unknown"}${signalDetail}${output ? `: ${output}` : ""}`,
100
+ );
101
+ }
102
+
103
+ const versionOutput = (result.stdout ?? "").trim();
104
+ if (!versionOutput) {
105
+ throw new Error("Downloaded binary returned success but produced no version output");
106
+ }
107
+
108
+ console.log(`✓ Verified ${PACKAGE_NAME} executable (${versionOutput})`);
109
+ }
110
+
84
111
  // Main installation logic
85
112
  async function install() {
113
+ let binaryPath = "";
114
+
86
115
  try {
87
116
  // Skip postinstall in development (when installing from the repo)
88
117
  // Check if we're in development by looking for src/ directory
@@ -98,13 +127,12 @@ async function install() {
98
127
 
99
128
  // Get version from package.json
100
129
  const packageJsonPath = join(__dirname, "..", "package.json");
101
- const { readFile } = await import("node:fs/promises");
102
130
  const packageJson = JSON.parse(await readFile(packageJsonPath, "utf8"));
103
131
  const { version } = packageJson;
104
132
 
105
133
  const { binaryName, isWindows } = getPlatformInfo();
106
134
  const binDir = join(__dirname, "..", "bin");
107
- const binaryPath = join(binDir, binaryName);
135
+ binaryPath = join(binDir, binaryName);
108
136
 
109
137
  // Check if binary already exists
110
138
  try {
@@ -128,9 +156,15 @@ async function install() {
128
156
  chmodSync(binaryPath, 0o755);
129
157
  }
130
158
 
159
+ verifyBinary(binaryPath);
160
+
131
161
  console.log(`✓ Successfully installed ${PACKAGE_NAME} v${version}`);
132
162
  console.log(` Binary location: ${binaryPath}`);
133
163
  } catch (error) {
164
+ if (binaryPath) {
165
+ await rm(binaryPath, { force: true }).catch(() => {});
166
+ }
167
+
134
168
  console.error(`✗ Failed to install ${PACKAGE_NAME}:`, error.message);
135
169
  console.error(
136
170
  `\nYou can manually download binaries from: https://github.com/${GITHUB_REPO}/releases`,