@dosu/seshi 0.0.0-stage → 0.11.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 +21 -0
  2. package/README.md +15 -2
  3. package/bin/seshi.js +130 -0
  4. package/package.json +37 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dosu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,16 @@
1
- # Temporary Holding Version
1
+ <img src="https://raw.githubusercontent.com/dosu-ai/seshi/v0.11.0/brand/glyph/seshi-glyph-badge.svg" alt="" width="64" height="64">
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
+ # @dosu/seshi
4
+
5
+ *Every session has a thread.*
6
+
7
+ Capture, ingest, redact, store and search coding-agent sessions: one binary for the CLI, the agent hooks and the server.
8
+
9
+ ```sh
10
+ npm i -g @dosu/seshi
11
+ seshi --help
12
+ ```
13
+
14
+ npm installs the binary for your platform through one of the optional `@dosu/seshi-<os>-<cpu>` packages; Node only starts it. Other ways in: the install scripts and the binaries on GitHub releases.
15
+
16
+ Docs: https://github.com/dosu-ai/seshi#readme
package/bin/seshi.js ADDED
@@ -0,0 +1,130 @@
1
+ #!/usr/bin/env node
2
+ // scripts/release/launcher.ts
3
+ var import_node_child_process = require("node:child_process");
4
+ var import_node_fs = require("node:fs");
5
+ var import_node_path = require("node:path");
6
+
7
+ // scripts/release/targets.ts
8
+ function target(os, cpu) {
9
+ const id = `${os}-${cpu}`;
10
+ const windows = os === "windows";
11
+ return {
12
+ id,
13
+ os,
14
+ cpu,
15
+ bun: `bun-${id}${cpu === "x64" ? "-baseline" : ""}`,
16
+ nodePlatform: windows ? "win32" : os,
17
+ binary: windows ? "seshi.exe" : "seshi",
18
+ asset: `seshi-${id}.${windows ? "zip" : "tar.gz"}`,
19
+ npm: `@dosu/seshi-${id}`,
20
+ ...os === "linux" ? { libc: "glibc" } : {}
21
+ };
22
+ }
23
+ var TARGETS = [
24
+ target("darwin", "arm64"),
25
+ target("darwin", "x64"),
26
+ target("linux", "x64"),
27
+ target("linux", "arm64"),
28
+ target("windows", "x64"),
29
+ target("windows", "arm64")
30
+ ];
31
+
32
+ // scripts/release/launcher.ts
33
+ function detectLibc(report) {
34
+ return report?.header?.glibcVersionRuntime ? "glibc" : "musl";
35
+ }
36
+ function chooseTarget(platform, arch, libc) {
37
+ const target = TARGETS.find((t) => t.nodePlatform === platform && t.cpu === arch);
38
+ const supported = TARGETS.map((t) => t.id).join(", ");
39
+ if (!target) {
40
+ return { error: `seshi has no binary for ${platform}-${arch} (there are: ${supported})` };
41
+ }
42
+ if (target.libc && libc && libc !== target.libc) {
43
+ return {
44
+ error: `seshi's Linux binaries need glibc, and this system uses ${libc} (Alpine, for example); run seshi in a glibc-based image, or use the Docker image`
45
+ };
46
+ }
47
+ return { target };
48
+ }
49
+ function binaryPath(target, resolve) {
50
+ try {
51
+ const manifest = resolve(`${target.npm}/package.json`);
52
+ return { path: import_node_path.join(import_node_path.dirname(manifest), "bin", target.binary) };
53
+ } catch {
54
+ return {
55
+ error: `the package ${target.npm}, which holds seshi's binary for this machine, is not installed. npm skips it when optional dependencies are omitted (--omit=optional, --no-optional) or when the lock file was made on another platform. Reinstall seshi with optional dependencies, or install the binary with the install script (docs/install.md).`
56
+ };
57
+ }
58
+ }
59
+ function locate(env) {
60
+ const choice = chooseTarget(env.platform, env.arch, env.libc);
61
+ if ("error" in choice)
62
+ return choice;
63
+ return binaryPath(choice.target, env.resolve);
64
+ }
65
+ var FORWARDED = ["SIGINT", "SIGTERM", "SIGHUP", "SIGQUIT", "SIGBREAK"];
66
+ function launch(path, args) {
67
+ const child = import_node_child_process.spawn(path, args, { stdio: "inherit", windowsHide: false });
68
+ const handlers = new Map;
69
+ for (const signal of FORWARDED) {
70
+ const handler = () => {
71
+ if (child.exitCode === null && child.signalCode === null)
72
+ child.kill(signal);
73
+ };
74
+ try {
75
+ process.on(signal, handler);
76
+ handlers.set(signal, handler);
77
+ } catch {}
78
+ }
79
+ child.on("error", (err) => {
80
+ console.error(`seshi: could not run ${path}: ${err.message}`);
81
+ process.exit(1);
82
+ });
83
+ child.on("exit", (code, signal) => {
84
+ for (const [name, handler] of handlers)
85
+ process.off(name, handler);
86
+ if (signal) {
87
+ process.kill(process.pid, signal);
88
+ setTimeout(() => process.exit(1), 100).unref();
89
+ return;
90
+ }
91
+ process.exit(code ?? 1);
92
+ });
93
+ }
94
+ function ensureExecutable(path, platform = process.platform) {
95
+ if (platform === "win32")
96
+ return;
97
+ try {
98
+ import_node_fs.accessSync(path, import_node_fs.constants.X_OK);
99
+ } catch {
100
+ tryChmod(path, 493);
101
+ }
102
+ }
103
+ function tryChmod(path, mode) {
104
+ try {
105
+ import_node_fs.chmodSync(path, mode);
106
+ return true;
107
+ } catch {
108
+ return false;
109
+ }
110
+ }
111
+ function main() {
112
+ if (process.platform === "linux" && process.report) {
113
+ process.report.excludeNetwork = true;
114
+ }
115
+ const located = locate({
116
+ platform: process.platform,
117
+ arch: process.arch,
118
+ ...process.platform === "linux" ? { libc: detectLibc(process.report?.getReport()) } : {},
119
+ resolve: (request) => require.resolve(request)
120
+ });
121
+ if ("error" in located) {
122
+ console.error(`seshi: ${located.error}`);
123
+ process.exit(1);
124
+ }
125
+ ensureExecutable(located.path);
126
+ launch(located.path, process.argv.slice(2));
127
+ }
128
+
129
+ // scripts/release/launcher-entry.ts
130
+ main();
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "@dosu/seshi",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.11.0",
4
+ "license": "MIT",
5
+ "homepage": "https://github.com/dosu-ai/seshi#readme",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/dosu-ai/seshi.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/dosu-ai/seshi/issues"
12
+ },
13
+ "description": "seshi: capture, ingest, redact, store and search coding-agent sessions. The one seshi binary for this platform.",
14
+ "keywords": [
15
+ "coding-agents",
16
+ "sessions",
17
+ "claude-code",
18
+ "codex",
19
+ "cursor",
20
+ "cli"
21
+ ],
22
+ "bin": {
23
+ "seshi": "bin/seshi.js"
24
+ },
25
+ "files": [
26
+ "bin/"
27
+ ],
28
+ "engines": {
29
+ "node": ">=18"
30
+ },
31
+ "optionalDependencies": {
32
+ "@dosu/seshi-darwin-arm64": "0.11.0",
33
+ "@dosu/seshi-darwin-x64": "0.11.0",
34
+ "@dosu/seshi-linux-x64": "0.11.0",
35
+ "@dosu/seshi-linux-arm64": "0.11.0",
36
+ "@dosu/seshi-windows-x64": "0.11.0",
37
+ "@dosu/seshi-windows-arm64": "0.11.0"
38
+ }
39
+ }