overhand 0.0.0-stage → 0.0.2

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/LICENSE.md ADDED
@@ -0,0 +1,105 @@
1
+ # Functional Source License, Version 1.1, ALv2 Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-ALv2
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 Craftly Oy
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,13 @@
1
- # Temporary Holding Version
1
+ # overhand
2
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.
3
+ Mission control for your AI coding agents, on your own machine.
4
+
5
+ ```sh
6
+ npx overhand start # or: bunx overhand start
7
+ ```
8
+
9
+ The first run downloads the Overhand release package for your machine from GitHub, checks its SHA-256 and keeps it in
10
+ `~/.overhand/npm/<version>`; every run after that starts it directly. Other ways to install, and the full docs:
11
+ <https://github.com/craftly-io/overhand>.
12
+
13
+ This package is only the launcher; the version on npm matches the GitHub release it runs.
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+ // `npx overhand` / `bunx overhand`: on first run downloads this version's release package for the machine (the same file
3
+ // the curl installer gets), checks its SHA-256 against the release's SHA256SUMS, unpacks it into
4
+ // ~/.overhand/npm/<version>, then runs it with the given arguments. It downloads here rather than in a postinstall
5
+ // script because bunx skips those. OVERHAND_DOWNLOAD points at another copy of the release files.
6
+ // ~/.overhand/npm/current links to the newest version fetched; the login service runs it from there.
7
+ // ponytail: older versions stay in ~/.overhand/npm; prune if anyone asks.
8
+ import { spawnSync } from "node:child_process";
9
+ import { createHash } from "node:crypto";
10
+ import { existsSync, mkdirSync, readFileSync, readlinkSync, renameSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
11
+ import { homedir } from "node:os";
12
+ import { join } from "node:path";
13
+
14
+ const { version } = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
15
+ const os = { darwin: "darwin", linux: "linux" }[process.platform];
16
+ const arch = { arm64: "arm64", x64: "x64" }[process.arch];
17
+ const home = join(homedir(), ".overhand");
18
+ const dir = join(home, "npm", version);
19
+ const bin = join(dir, "overhand");
20
+
21
+ /** Prints why and exits non-zero. */
22
+ function fail(message) {
23
+ console.error(`overhand: ${message}`);
24
+ process.exit(1);
25
+ }
26
+
27
+ /** Fetches one release file, failing with its URL when it doesn't answer 200. */
28
+ async function get(url) {
29
+ const r = await fetch(url).catch(() => undefined);
30
+ if (!r?.ok) fail(`download failed: ${url}${r ? ` (${r.status})` : ""}`);
31
+ return Buffer.from(await r.arrayBuffer());
32
+ }
33
+
34
+ if (!os || !arch) fail(`there's no Overhand build for ${process.platform}/${process.arch}; it runs on macOS and Linux.`);
35
+ if (!existsSync(bin)) {
36
+ const pkg = `overhand-${os}-${arch}.tar.gz`;
37
+ const base = process.env.OVERHAND_DOWNLOAD ?? `https://get.overhand.dev/download/v${version}`;
38
+ console.error(`overhand: downloading ${pkg} (v${version}), once`);
39
+ const [tar, sums] = await Promise.all([get(`${base}/${pkg}`), get(`${base}/SHA256SUMS`)]);
40
+ const want = sums
41
+ .toString()
42
+ .split("\n")
43
+ .find((l) => l.endsWith(` ${pkg}`))
44
+ ?.split(" ")[0];
45
+ if (!want || want !== createHash("sha256").update(tar).digest("hex")) fail(`checksum mismatch for ${pkg}; not installing.`);
46
+ // unpack beside the target and rename, so a half-written folder never looks installed
47
+ const tmp = `${dir}.${process.pid}`;
48
+ mkdirSync(tmp, { recursive: true });
49
+ writeFileSync(join(tmp, pkg), tar);
50
+ const x = spawnSync("tar", ["-xzf", pkg], { cwd: tmp, stdio: "inherit" });
51
+ rmSync(join(tmp, pkg));
52
+ if (x.status !== 0) fail("couldn't unpack the package (is tar installed?)");
53
+ if (existsSync(bin)) rmSync(tmp, { recursive: true });
54
+ else renameSync(tmp, dir);
55
+ }
56
+ // the login service runs npm/current/overhand, so it moves on to the newest version any run fetched (and never back
57
+ // to an older one run by name); the daemon notices and restarts on it
58
+ const current = join(home, "npm", "current");
59
+ let at = "";
60
+ try {
61
+ at = readlinkSync(current);
62
+ } catch {}
63
+ if (!at || version.localeCompare(at, undefined, { numeric: true }) > 0) {
64
+ const link = `${current}.${process.pid}`;
65
+ symlinkSync(version, link);
66
+ renameSync(link, current); // replaces the old link in one step
67
+ }
68
+ const run = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
69
+ process.exit(run.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,30 @@
1
1
  {
2
2
  "name": "overhand",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.2",
4
+ "description": "Mission control for your AI coding agents, on your own machine",
5
+ "license": "FSL-1.1-ALv2",
6
+ "homepage": "https://overhand.dev",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/craftly-io/overhand.git",
10
+ "directory": "release/npm"
11
+ },
12
+ "type": "module",
13
+ "bin": {
14
+ "overhand": "bin/overhand.js"
15
+ },
16
+ "files": [
17
+ "bin"
18
+ ],
19
+ "os": [
20
+ "darwin",
21
+ "linux"
22
+ ],
23
+ "cpu": [
24
+ "arm64",
25
+ "x64"
26
+ ],
27
+ "engines": {
28
+ "node": ">=18"
29
+ }
30
+ }