@holochain/hc-spin 0.700.0-dev.0 → 0.700.0-dev.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/.envrc ADDED
@@ -0,0 +1 @@
1
+ use flake
package/CHANGELOG.md CHANGED
@@ -4,10 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
5
  ## \[Unreleased\]
6
6
 
7
- ### Added
8
- ### Fixed
7
+ ## 2026-02-13: v0.700.0-dev.1
8
+
9
9
  ### Changed
10
- ### Removed
10
+ - Holochain is now run with the iroh transport. The argument `--signaling-url` has been replaced with `--relay-url`.
11
11
 
12
12
  ## 2026-01-13: v0.700.0-dev.0
13
13
  ### Changed
package/README.md CHANGED
@@ -50,7 +50,7 @@ Options:
50
50
  --network-seed <string> Install the app with a specific network seed.
51
51
  --ui-path <path> Path to the folder containing the index.html of the webhapp's UI.
52
52
  --ui-port <number> Port pointing to a localhost dev server that serves your UI assets.
53
- --signaling-url <url> Url of the signaling server to use. By default, hc spin spins up a local development signaling server for you
53
+ --relay-url <url> Url of the relay server to use. By default, hc spin spins up a local development relay server for you
54
54
  but this argument allows you to specify a custom one.
55
55
  --open-devtools Automatically open the devtools on startup.
56
56
  -h, --help display help for command
@@ -12432,18 +12432,6 @@ function validateCliArgs(cliArgs, cliOpts, appDataRootDir) {
12432
12432
  const appId = cliOpts.appId ? cliOpts.appId : path.parse(path.basename(cliArgs[0])).name;
12433
12433
  const holochainPath = cliOpts.holochainPath;
12434
12434
  const numAgents = cliOpts.numAgents ? cliOpts.numAgents : 2;
12435
- let forceAdminPorts;
12436
- if (cliOpts.forceAdminPorts !== void 0) {
12437
- forceAdminPorts = cliOpts.forceAdminPorts.split(",").map((portStr) => {
12438
- const portInt = parseInt(portStr);
12439
- if (Number.isNaN(portInt)) {
12440
- throw new Error(
12441
- `The --force-admin-ports must be a comma-separated list of valid port numbers, but got: ${cliOpts.forceAdminPorts}`
12442
- );
12443
- }
12444
- return portInt;
12445
- });
12446
- }
12447
12435
  return {
12448
12436
  appId,
12449
12437
  holochainPath,
@@ -12451,11 +12439,10 @@ function validateCliArgs(cliArgs, cliOpts, appDataRootDir) {
12451
12439
  networkSeed: cliOpts.networkSeed,
12452
12440
  targetArcFactor: cliOpts.targetArcFactor,
12453
12441
  uiSource: cliOpts.uiPath ? { type: "path", path: cliOpts.uiPath } : cliOpts.uiPort ? { type: "port", port: cliOpts.uiPort } : { type: "path", path: path.join(appDataRootDir, "apps", appId, "ui") },
12454
- singalingUrl: cliOpts.signalingUrl,
12442
+ relayUrl: cliOpts.relayUrl,
12455
12443
  bootstrapUrl: cliOpts.bootstrapUrl,
12456
12444
  happOrWebhappPath: isHapp ? { type: "happ", path: happOrWebhappPath } : { type: "webhapp", path: happOrWebhappPath },
12457
- openDevtools: cliOpts.openDevtools ? true : false,
12458
- forceAdminPorts
12445
+ openDevtools: cliOpts.openDevtools ? true : false
12459
12446
  };
12460
12447
  }
12461
12448
  async function createHappWindow(uiSource, appId, agentNum, appPort, appAuthToken, appDataRootDir) {
@@ -12576,7 +12563,7 @@ function setLinkOpenHandlers(browserWindow) {
12576
12563
  }
12577
12564
  const rustUtils = require("@holochain/hc-spin-rust-utils");
12578
12565
  const cli = new commander.Command();
12579
- cli.name("hc-spin").description("CLI to run Holochain apps during development.").version(`${"0.700.0-dev.0"} (built for holochain ${"0.7.0-dev.7"})`).argument(
12566
+ cli.name("hc-spin").description("CLI to run Holochain apps during development.").version(`${"0.600.2-rc.0"} (built for holochain ${"0.6.1-rc.0"})`).argument(
12580
12567
  "<path>",
12581
12568
  "Path to .webhapp or .happ file to launch. If a .happ file is passed, either a UI path must be specified via --ui-path or a port pointing to a localhost server via --ui-port"
12582
12569
  ).option(
@@ -12598,11 +12585,8 @@ cli.name("hc-spin").description("CLI to run Holochain apps during development.")
12598
12585
  "--ui-port <number>",
12599
12586
  "Port pointing to a localhost dev server that serves your UI assets."
12600
12587
  ).option(
12601
- "--signaling-url <url>",
12602
- "Url of the signaling server to use. By default, hc spin spins up a local development signaling server for you but this argument allows you to specify a custom one."
12603
- ).option(
12604
- "--force-admin-ports <ports>",
12605
- "A comma-separated list of port numbers for the holochain conductors to bind to their admin interfaces. By default, hc spin picks any available ports."
12588
+ "--relay-url <url>",
12589
+ "Url of the relay server to use. By default, hc spin spins up a local development relay server for you but this argument allows you to specify a custom one."
12606
12590
  ).option("--open-devtools", "Automatically open the devtools on startup.");
12607
12591
  cli.parse();
12608
12592
  const rl = require("readline").createInterface({
@@ -12680,34 +12664,31 @@ async function startLocalServices() {
12680
12664
  const localServicesHandle = childProcess__namespace.spawn("kitsune2-bootstrap-srv");
12681
12665
  return new Promise((resolve) => {
12682
12666
  let bootStrapUrl;
12683
- let signalUrl;
12667
+ let relayUrl;
12684
12668
  let bootstrapRunning = false;
12685
- let signalRunnig = false;
12669
+ let relayRunning = false;
12686
12670
  localServicesHandle.stdout.pipe(split()).on("data", async (line) => {
12687
12671
  console.log(`[hc-spin] | [kitsune2-bootstrap-srv]: ${line}`);
12688
12672
  if (line.includes("#kitsune2_bootstrap_srv#listening#")) {
12689
12673
  const hostAndPort = line.split("#kitsune2_bootstrap_srv#listening#")[1].split("#")[0];
12690
12674
  bootStrapUrl = `http://${hostAndPort}`;
12691
- signalUrl = `ws://${hostAndPort}`;
12675
+ relayUrl = `http://${hostAndPort}`;
12692
12676
  }
12693
12677
  if (line.includes("#kitsune2_bootstrap_srv#running#")) {
12694
12678
  bootstrapRunning = true;
12695
- signalRunnig = true;
12679
+ relayRunning = true;
12696
12680
  }
12697
- if (bootstrapRunning && signalRunnig && bootStrapUrl && signalUrl)
12698
- resolve([bootStrapUrl, signalUrl]);
12681
+ if (bootstrapRunning && relayRunning && bootStrapUrl && relayUrl)
12682
+ resolve([bootStrapUrl, relayUrl]);
12699
12683
  });
12700
12684
  localServicesHandle.stderr.pipe(split()).on("data", async (line) => {
12701
12685
  console.log(`[hc-spin] | [hc run-local-services] ERROR: ${line}`);
12702
12686
  });
12703
12687
  });
12704
12688
  }
12705
- async function spawnSandboxes(nAgents, happPath, bootStrapUrl, signalUrl, appId, networkSeed, targetArcFactor, forceAdminPorts) {
12706
- const generateArgs = ["sandbox"];
12707
- if (forceAdminPorts !== void 0 && forceAdminPorts.length > 0) {
12708
- generateArgs.push("--force-admin-ports", forceAdminPorts.join(","));
12709
- }
12710
- generateArgs.push(
12689
+ async function spawnSandboxes(nAgents, happPath, bootStrapUrl, relayUrl, appId, networkSeed, targetArcFactor) {
12690
+ const generateArgs = [
12691
+ "sandbox",
12711
12692
  "--piped",
12712
12693
  "generate",
12713
12694
  "--num-sandboxes",
@@ -12715,7 +12696,7 @@ async function spawnSandboxes(nAgents, happPath, bootStrapUrl, signalUrl, appId,
12715
12696
  "--app-id",
12716
12697
  appId,
12717
12698
  "--run"
12718
- );
12699
+ ];
12719
12700
  let appPorts = "";
12720
12701
  for (let i = 1; i <= nAgents; i++) {
12721
12702
  const appPort = await getPorts();
@@ -12730,7 +12711,7 @@ async function spawnSandboxes(nAgents, happPath, bootStrapUrl, signalUrl, appId,
12730
12711
  if (targetArcFactor !== void 0) {
12731
12712
  generateArgs.push("--target-arc-factor", targetArcFactor.toString());
12732
12713
  }
12733
- generateArgs.push("--bootstrap", bootStrapUrl, "webrtc", signalUrl);
12714
+ generateArgs.push("--bootstrap", bootStrapUrl, "quic", relayUrl);
12734
12715
  let readyConductors = 0;
12735
12716
  const portsInfo = {};
12736
12717
  const sandboxPaths = [];
@@ -12767,23 +12748,22 @@ electron.app.whenReady().then(async () => {
12767
12748
  if (CLI_OPTS.happOrWebhappPath.type === "webhapp") {
12768
12749
  happTargetDir = path.join(DATA_ROOT_DIR, "apps", CLI_OPTS.appId);
12769
12750
  const uiTargetDir = path.join(happTargetDir, "ui");
12770
- await rustUtils.unpackAndSaveWebhapp(
12751
+ await rustUtils.saveHappOrWebhapp(
12771
12752
  CLI_OPTS.happOrWebhappPath.path,
12772
12753
  CLI_OPTS.appId,
12773
12754
  uiTargetDir,
12774
12755
  happTargetDir
12775
12756
  );
12776
12757
  }
12777
- const [bootstrapUrl, signalingUrl] = await startLocalServices();
12758
+ const [bootstrapUrl, relayUrl] = await startLocalServices();
12778
12759
  const [sandboxHandle, sandboxPaths, portsInfo] = await spawnSandboxes(
12779
12760
  CLI_OPTS.numAgents,
12780
12761
  happTargetDir ? happTargetDir : CLI_OPTS.happOrWebhappPath.path,
12781
12762
  CLI_OPTS.bootstrapUrl ? CLI_OPTS.bootstrapUrl : bootstrapUrl,
12782
- CLI_OPTS.singalingUrl ? CLI_OPTS.singalingUrl : signalingUrl,
12763
+ CLI_OPTS.relayUrl ? CLI_OPTS.relayUrl : relayUrl,
12783
12764
  CLI_OPTS.appId,
12784
12765
  CLI_OPTS.networkSeed,
12785
- CLI_OPTS.targetArcFactor,
12786
- CLI_OPTS.forceAdminPorts
12766
+ CLI_OPTS.targetArcFactor
12787
12767
  );
12788
12768
  const lairUrls = [];
12789
12769
  sandboxPaths.forEach((sandbox) => {
package/flake.lock CHANGED
@@ -2,11 +2,11 @@
2
2
  "nodes": {
3
3
  "crane": {
4
4
  "locked": {
5
- "lastModified": 1763511871,
6
- "narHash": "sha256-KKZWi+ij7oT0Ag8yC6MQkzfHGcytyjMJDD+47ZV1YNU=",
5
+ "lastModified": 1766194365,
6
+ "narHash": "sha256-4AFsUZ0kl6MXSm4BaQgItD0VGlEKR3iq7gIaL7TjBvc=",
7
7
  "owner": "ipetkov",
8
8
  "repo": "crane",
9
- "rev": "099f9014bc8d0cd6e445470ea1df0fd691d5a548",
9
+ "rev": "7d8ec2c71771937ab99790b45e6d9b93d15d9379",
10
10
  "type": "github"
11
11
  },
12
12
  "original": {
@@ -20,11 +20,11 @@
20
20
  "nixpkgs-lib": "nixpkgs-lib"
21
21
  },
22
22
  "locked": {
23
- "lastModified": 1762980239,
24
- "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
23
+ "lastModified": 1765835352,
24
+ "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
25
25
  "owner": "hercules-ci",
26
26
  "repo": "flake-parts",
27
- "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
27
+ "rev": "a34fae9c08a15ad73f295041fec82323541400a9",
28
28
  "type": "github"
29
29
  },
30
30
  "original": {
@@ -53,16 +53,16 @@
53
53
  "holochain": {
54
54
  "flake": false,
55
55
  "locked": {
56
- "lastModified": 1768178786,
57
- "narHash": "sha256-JsYqXKZMkt4v0hd7dA3GCs8ELuLEoiectSY4Zw9pWJw=",
56
+ "lastModified": 1769992510,
57
+ "narHash": "sha256-hYq8p1BiPR+AdiOgeOPV+Gz+aTs2t5yu3V8lBGctBkE=",
58
58
  "owner": "holochain",
59
59
  "repo": "holochain",
60
- "rev": "6594a0ed6a038113bc55e0c1545310736189d88b",
60
+ "rev": "5194f7af4f71db22dd22dc37cf8c1e68d0b6d628",
61
61
  "type": "github"
62
62
  },
63
63
  "original": {
64
64
  "owner": "holochain",
65
- "ref": "holochain-0.7.0-dev.7",
65
+ "ref": "holochain-0.7.0-dev.10",
66
66
  "repo": "holochain",
67
67
  "type": "github"
68
68
  }
@@ -80,11 +80,11 @@
80
80
  "rust-overlay": "rust-overlay"
81
81
  },
82
82
  "locked": {
83
- "lastModified": 1768299200,
84
- "narHash": "sha256-wg7yUc/n6iYf5/qgV2tosZimJu0iTLVZOouko95TuiM=",
83
+ "lastModified": 1770384077,
84
+ "narHash": "sha256-9llOslhUNN0VN1EM57NDB5AByRgztxChw3DaytgcGjU=",
85
85
  "owner": "holochain",
86
86
  "repo": "holonix",
87
- "rev": "70c034a9eedfd3d48450432f938b86dc11202361",
87
+ "rev": "b6587f0dbbb68de2d69d526e35a3efe7d311f2c4",
88
88
  "type": "github"
89
89
  },
90
90
  "original": {
@@ -97,16 +97,16 @@
97
97
  "kitsune2": {
98
98
  "flake": false,
99
99
  "locked": {
100
- "lastModified": 1763403287,
101
- "narHash": "sha256-dqQJMoDbcD0ekttrv5+8ph5Yf25EdXwKktsxNjV57Iw=",
100
+ "lastModified": 1770115587,
101
+ "narHash": "sha256-bF/7ERAfd41zEfzoUBKKyxuQU3c0QUi2Fc8MpM+hnEs=",
102
102
  "owner": "holochain",
103
103
  "repo": "kitsune2",
104
- "rev": "22de6e42100aa960d05f5f30427a236ad922bd80",
104
+ "rev": "31b84100151a1eccaf7ed3e0037d27f77b5d7cdb",
105
105
  "type": "github"
106
106
  },
107
107
  "original": {
108
108
  "owner": "holochain",
109
- "ref": "v0.3.2",
109
+ "ref": "main",
110
110
  "repo": "kitsune2",
111
111
  "type": "github"
112
112
  }
@@ -130,27 +130,27 @@
130
130
  },
131
131
  "nixpkgs": {
132
132
  "locked": {
133
- "lastModified": 1763622513,
134
- "narHash": "sha256-1jQnuyu82FpiSxowrF/iFK6Toh9BYprfDqfs4BB+19M=",
133
+ "lastModified": 1766201043,
134
+ "narHash": "sha256-eplAP+rorKKd0gNjV3rA6+0WMzb1X1i16F5m5pASnjA=",
135
135
  "owner": "nixos",
136
136
  "repo": "nixpkgs",
137
- "rev": "c58bc7f5459328e4afac201c5c4feb7c818d604b",
137
+ "rev": "b3aad468604d3e488d627c0b43984eb60e75e782",
138
138
  "type": "github"
139
139
  },
140
140
  "original": {
141
141
  "owner": "nixos",
142
- "ref": "nixos-25.05",
142
+ "ref": "nixos-25.11",
143
143
  "repo": "nixpkgs",
144
144
  "type": "github"
145
145
  }
146
146
  },
147
147
  "nixpkgs-lib": {
148
148
  "locked": {
149
- "lastModified": 1761765539,
150
- "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
149
+ "lastModified": 1765674936,
150
+ "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
151
151
  "owner": "nix-community",
152
152
  "repo": "nixpkgs.lib",
153
- "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
153
+ "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
154
154
  "type": "github"
155
155
  },
156
156
  "original": {
@@ -197,11 +197,11 @@
197
197
  ]
198
198
  },
199
199
  "locked": {
200
- "lastModified": 1763692705,
201
- "narHash": "sha256-tCKCyMYU0Vy+ph/xswlNsYXXjnFVweWBV+ew/5FS9tA=",
200
+ "lastModified": 1766371695,
201
+ "narHash": "sha256-W7CX9vy7H2Jj3E8NI4djHyF8iHSxKpb2c/7uNQ/vGFU=",
202
202
  "owner": "oxalica",
203
203
  "repo": "rust-overlay",
204
- "rev": "6fbf5d328dce1828d887b8ee7d44a785196a34e7",
204
+ "rev": "d81285ba8199b00dc31847258cae3c655b605e8c",
205
205
  "type": "github"
206
206
  },
207
207
  "original": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holochain/hc-spin",
3
- "version": "0.700.0-dev.0",
3
+ "version": "0.700.0-dev.1",
4
4
  "holochainVersion": "0.7.0-dev.7",
5
5
  "description": "CLI to run Holochain apps during development.",
6
6
  "author": "matthme",
package/src/main/index.ts CHANGED
@@ -63,8 +63,8 @@ cli
63
63
  'Port pointing to a localhost dev server that serves your UI assets.',
64
64
  )
65
65
  .option(
66
- '--signaling-url <url>',
67
- 'Url of the signaling server to use. By default, hc spin spins up a local development signaling server for you but this argument allows you to specify a custom one.',
66
+ '--relay-url <url>',
67
+ 'Url of the relay server to use. By default, hc spin spins up a local development relay server for you but this argument allows you to specify a custom one.',
68
68
  )
69
69
  .option(
70
70
  '--force-admin-ports <ports>',
@@ -179,22 +179,22 @@ async function startLocalServices(): Promise<[string, string]> {
179
179
  const localServicesHandle = childProcess.spawn('kitsune2-bootstrap-srv');
180
180
  return new Promise((resolve) => {
181
181
  let bootStrapUrl;
182
- let signalUrl;
182
+ let relayUrl;
183
183
  let bootstrapRunning = false;
184
- let signalRunnig = false;
184
+ let relayRunning = false;
185
185
  localServicesHandle.stdout.pipe(split()).on('data', async (line: string) => {
186
186
  console.log(`[hc-spin] | [kitsune2-bootstrap-srv]: ${line}`);
187
187
  if (line.includes('#kitsune2_bootstrap_srv#listening#')) {
188
188
  const hostAndPort = line.split('#kitsune2_bootstrap_srv#listening#')[1].split('#')[0];
189
189
  bootStrapUrl = `http://${hostAndPort}`;
190
- signalUrl = `ws://${hostAndPort}`;
190
+ relayUrl = `http://${hostAndPort}`;
191
191
  }
192
192
  if (line.includes('#kitsune2_bootstrap_srv#running#')) {
193
193
  bootstrapRunning = true;
194
- signalRunnig = true;
194
+ relayRunning = true;
195
195
  }
196
- if (bootstrapRunning && signalRunnig && bootStrapUrl && signalUrl)
197
- resolve([bootStrapUrl, signalUrl]);
196
+ if (bootstrapRunning && relayRunning && bootStrapUrl && relayUrl)
197
+ resolve([bootStrapUrl, relayUrl]);
198
198
  });
199
199
  localServicesHandle.stderr.pipe(split()).on('data', async (line: string) => {
200
200
  console.log(`[hc-spin] | [hc run-local-services] ERROR: ${line}`);
@@ -211,7 +211,7 @@ async function spawnSandboxes(
211
211
  nAgents: number,
212
212
  happPath: string,
213
213
  bootStrapUrl: string,
214
- signalUrl: string,
214
+ relayUrl: string,
215
215
  appId: string,
216
216
  networkSeed?: string,
217
217
  targetArcFactor?: number,
@@ -250,7 +250,7 @@ async function spawnSandboxes(
250
250
  if (targetArcFactor !== undefined) {
251
251
  generateArgs.push('--target-arc-factor', targetArcFactor.toString());
252
252
  }
253
- generateArgs.push('--bootstrap', bootStrapUrl, 'webrtc', signalUrl);
253
+ generateArgs.push('--bootstrap', bootStrapUrl, 'quic', relayUrl);
254
254
  // console.log('GENERATE ARGS: ', generateArgs);
255
255
 
256
256
  let readyConductors = 0;
@@ -313,13 +313,13 @@ app.whenReady().then(async () => {
313
313
  );
314
314
  }
315
315
 
316
- const [bootstrapUrl, signalingUrl] = await startLocalServices();
316
+ const [bootstrapUrl, relayUrl] = await startLocalServices();
317
317
 
318
318
  const [sandboxHandle, sandboxPaths, portsInfo] = await spawnSandboxes(
319
319
  CLI_OPTS.numAgents,
320
320
  happTargetDir ? happTargetDir : CLI_OPTS.happOrWebhappPath.path,
321
321
  CLI_OPTS.bootstrapUrl ? CLI_OPTS.bootstrapUrl : bootstrapUrl,
322
- CLI_OPTS.singalingUrl ? CLI_OPTS.singalingUrl : signalingUrl,
322
+ CLI_OPTS.relayUrl ? CLI_OPTS.relayUrl : relayUrl,
323
323
  CLI_OPTS.appId,
324
324
  CLI_OPTS.networkSeed,
325
325
  CLI_OPTS.targetArcFactor,
@@ -11,7 +11,7 @@ export type CliOpts = {
11
11
  targetArcFactor?: number;
12
12
  uiPath?: string;
13
13
  uiPort?: number;
14
- signalingUrl?: string;
14
+ relayUrl?: string;
15
15
  bootstrapUrl?: string;
16
16
  openDevtools?: boolean;
17
17
  forceAdminPorts?: string;
@@ -24,7 +24,7 @@ export type CliOptsValidated = {
24
24
  networkSeed: string | undefined;
25
25
  targetArcFactor: number | undefined;
26
26
  uiSource: UISource;
27
- singalingUrl: string | undefined;
27
+ relayUrl: string | undefined;
28
28
  bootstrapUrl: string | undefined;
29
29
  happOrWebhappPath: HappOrWebhappPath;
30
30
  openDevtools: boolean;
@@ -114,7 +114,7 @@ export function validateCliArgs(
114
114
  : cliOpts.uiPort
115
115
  ? { type: 'port', port: cliOpts.uiPort }
116
116
  : { type: 'path', path: path.join(appDataRootDir, 'apps', appId, 'ui') },
117
- singalingUrl: cliOpts.signalingUrl,
117
+ relayUrl: cliOpts.relayUrl,
118
118
  bootstrapUrl: cliOpts.bootstrapUrl,
119
119
  happOrWebhappPath: isHapp
120
120
  ? { type: 'happ', path: happOrWebhappPath }