codespread 0.0.0-stage → 0.1.0

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.
Files changed (4) hide show
  1. package/LICENSE +52 -0
  2. package/main.js +39 -0
  3. package/package.json +26 -4
  4. package/README.md +0 -3
package/LICENSE ADDED
@@ -0,0 +1,52 @@
1
+ CodeSpread Licence
2
+
3
+ Copyright (c) 2026 Daniel Armyr. All rights reserved.
4
+
5
+ CodeSpread is proprietary software. It is licensed, not sold. By installing, copying or using it you accept this
6
+ licence; if you do not accept it, do not install or use the software.
7
+
8
+ 1. Grant
9
+
10
+ The licensor grants you a free, non-exclusive, non-transferable and revocable licence to install and run the
11
+ unmodified software, for any purpose including commercial use, on machines and in continuous-integration systems you
12
+ control, to analyse source code you are entitled to analyse.
13
+
14
+ 2. Restrictions
15
+
16
+ You may not, and may not allow others to:
17
+
18
+ a. copy, distribute, publish, sell, rent, lend, sublicense or otherwise make the software available to anyone,
19
+ including as part of another package, container image, installer or product. Others may obtain it from the
20
+ licensor's own channels;
21
+ b. modify, adapt, translate or create derivative works of the software;
22
+ c. reverse engineer, decompile or disassemble the software, or otherwise try to derive its source code or methods,
23
+ except to the extent that applicable law expressly permits this despite this restriction;
24
+ d. offer the software, or its analysis, to third parties as a hosted or managed service;
25
+ e. remove or alter any copyright, licence or other notice in the software.
26
+
27
+ 3. Ownership
28
+
29
+ The software, including all copies and all intellectual property rights in it, remains the property of the
30
+ licensor. All rights not expressly granted in this licence are reserved. The reports and Snapshots the software
31
+ produces from your code are yours.
32
+
33
+ 4. No warranty
34
+
35
+ The software is provided "as is", without warranty of any kind, express or implied, including warranties of
36
+ merchantability, fitness for a particular purpose and non-infringement.
37
+
38
+ 5. Limitation of liability
39
+
40
+ To the extent permitted by applicable law, the licensor is not liable for any direct, indirect, incidental, special
41
+ or consequential damages, or for any loss of data, profits or business, arising out of or in connection with the
42
+ software or this licence, however caused.
43
+
44
+ 6. Termination
45
+
46
+ This licence ends automatically if you break any of its terms. On termination you must stop using the software and
47
+ delete every copy of it in your possession.
48
+
49
+ 7. Governing law
50
+
51
+ This licence is governed by the laws of Sweden. Any dispute arising out of or in connection with it shall be settled
52
+ by the courts of Sweden.
package/main.js ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ // Runs the CodeSpread engine for this platform, with every adapter this machine can run, passing the arguments,
3
+ // stdin, stdout and the exit code through: `codespread mcp` serves an agent over them.
4
+ import { spawnSync } from "node:child_process";
5
+ import { createRequire } from "node:module";
6
+ import { dirname, join } from "node:path";
7
+
8
+ const require = createRequire(import.meta.url);
9
+ const bin = join(dirname(manifestOf(`@armyantsec/codespread-${process.platform}-${process.arch}`)), "bin");
10
+ const adapters = [
11
+ join(bin, "codespread-adapter-rust"),
12
+ executableOf("@armyantsec/codespread-adapter-typescript"),
13
+ ...(hasPython() ? [executableOf("@armyantsec/codespread-adapter-python")] : []),
14
+ ];
15
+ process.env.CODESPREAD_ADAPTERS ??= adapters.join(":");
16
+
17
+ const run = spawnSync(join(bin, "codespread"), process.argv.slice(2), { stdio: "inherit" });
18
+ if (run.error) process.stderr.write(`Could not run CodeSpread: ${run.error.message}\n`);
19
+ process.exit(run.status ?? 1);
20
+
21
+ function manifestOf(name) {
22
+ try {
23
+ return require.resolve(`${name}/package.json`);
24
+ } catch {
25
+ process.stderr.write(`CodeSpread has no build for ${process.platform} on ${process.arch}.\n`);
26
+ process.exit(1);
27
+ }
28
+ }
29
+
30
+ function executableOf(name) {
31
+ const manifest = manifestOf(name);
32
+ return join(dirname(manifest), Object.values(require(manifest).bin)[0]);
33
+ }
34
+
35
+ function hasPython() {
36
+ const check = spawnSync("python3", ["-c", "import sys; sys.exit(sys.version_info < (3, 12))"]);
37
+ if (check.status !== 0) process.stderr.write("Python files are not analysed: they need python3 3.12 or later.\n");
38
+ return check.status === 0;
39
+ }
package/package.json CHANGED
@@ -1,6 +1,28 @@
1
1
  {
2
2
  "name": "codespread",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "How far work spreads across a codebase's folders, as an MCP server or a report",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "author": "Daniel Armyr",
7
+ "type": "module",
8
+ "engines": {
9
+ "node": ">=24"
10
+ },
11
+ "bin": {
12
+ "codespread": "./main.js"
13
+ },
14
+ "files": [
15
+ "main.js",
16
+ "LICENSE"
17
+ ],
18
+ "dependencies": {
19
+ "@armyantsec/codespread-adapter-python": "0.1.0",
20
+ "@armyantsec/codespread-adapter-typescript": "0.1.0"
21
+ },
22
+ "optionalDependencies": {
23
+ "@armyantsec/codespread-darwin-arm64": "0.1.0",
24
+ "@armyantsec/codespread-darwin-x64": "0.1.0",
25
+ "@armyantsec/codespread-linux-arm64": "0.1.0",
26
+ "@armyantsec/codespread-linux-x64": "0.1.0"
27
+ }
28
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.