epismo 1.28.1 → 1.29.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.
package/README.md CHANGED
@@ -52,7 +52,7 @@ Append `--help` to any command for its arguments and options.
52
52
 
53
53
  ## Scripts and agents
54
54
 
55
- Commands return JSON on stdout; errors and progress go to stderr. Output fields use `snake_case`. Use `--output table` for interactive reading, or `--input @file.json` and `--input -` for JSON input from a file or stdin.
55
+ Commands return JSON on stdout; errors and progress go to stderr. Output fields use `snake_case`. Use `--output table` for interactive reading, or `--request @file.json` and `--request -` for JSON input from a file or stdin. `--request` supplies all request parameters; `case start --input` supplies only the case input values.
56
56
 
57
57
  For automation, supply a workspace-scoped token through `EPISMO_TOKEN`. Set `EPISMO_WORKSPACE` or pass `--workspace` to select a workspace. Run `epismo doctor` to inspect your setup.
58
58
 
package/npm/launcher.js CHANGED
@@ -5,46 +5,78 @@ import { fileURLToPath } from "node:url";
5
5
 
6
6
  const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
7
7
 
8
- export function targetFor(platform = process.platform, architecture = process.arch) {
8
+ export function targetFor(
9
+ platform = process.platform,
10
+ architecture = process.arch,
11
+ ) {
9
12
  const os = { darwin: "darwin", linux: "linux", win32: "windows" }[platform];
10
13
  const arch = { x64: "amd64", arm64: "arm64" }[architecture];
11
14
  return os && arch ? `${os}-${arch}` : null;
12
15
  }
13
16
 
14
- export function binaryFor(platform = process.platform, architecture = process.arch, root = packageRoot) {
17
+ export function binaryFor(
18
+ platform = process.platform,
19
+ architecture = process.arch,
20
+ root = packageRoot,
21
+ ) {
15
22
  const target = targetFor(platform, architecture);
16
23
  if (!target) return null;
17
- return join(root, "npm", "vendor", target, platform === "win32" ? "epismo.exe" : "epismo");
24
+ return join(
25
+ root,
26
+ "npm",
27
+ "vendor",
28
+ target,
29
+ platform === "win32" ? "epismo.exe" : "epismo",
30
+ );
18
31
  }
19
32
 
20
33
  export function detectPackageManager({
21
34
  root = packageRoot,
22
35
  entrypoint = process.argv[1] || "",
23
36
  userAgent = process.env.npm_config_user_agent || "",
24
- execPath = process.env.npm_execpath || ""
37
+ execPath = process.env.npm_execpath || "",
25
38
  } = {}) {
26
- if (pnpmOwnsPackage(root, entrypoint)) return { name: "pnpm", version: versionFromUserAgent(userAgent, "pnpm") };
39
+ if (pnpmOwnsPackage(root, entrypoint))
40
+ return { name: "pnpm", version: versionFromUserAgent(userAgent, "pnpm") };
27
41
  const normalizedRoot = root.toLowerCase().replaceAll("\\", "/");
28
- if (/\bbun\//i.test(userAgent) || /(?:^|[\\/])bun(?:\.exe)?$/i.test(execPath) || normalizedRoot.includes("/.bun/install/global/")) {
42
+ if (
43
+ /\bbun\//i.test(userAgent) ||
44
+ /(?:^|[\\/])bun(?:\.exe)?$/i.test(execPath) ||
45
+ normalizedRoot.includes("/.bun/install/global/")
46
+ ) {
29
47
  return { name: "bun", version: versionFromUserAgent(userAgent, "bun") };
30
48
  }
31
- if (/\byarn\//i.test(userAgent) || /(?:^|[\\/])yarn(?:\.c?js|\.cmd)?$/i.test(execPath) || normalizedRoot.includes("/.config/yarn/global/")) {
32
- return { name: "yarn", version: versionFromUserAgent(userAgent, "yarn") || "1" };
49
+ if (
50
+ /\byarn\//i.test(userAgent) ||
51
+ /(?:^|[\\/])yarn(?:\.c?js|\.cmd)?$/i.test(execPath) ||
52
+ normalizedRoot.includes("/.config/yarn/global/")
53
+ ) {
54
+ return {
55
+ name: "yarn",
56
+ version: versionFromUserAgent(userAgent, "yarn") || "1",
57
+ };
33
58
  }
34
59
  return { name: "npm", version: versionFromUserAgent(userAgent, "npm") };
35
60
  }
36
61
 
37
62
  export function installationScope(environment = process.env) {
38
- return environment.npm_command === "exec" || environment.npm_lifecycle_event === "npx" ? "ephemeral" : "global";
63
+ return environment.npm_command === "exec" ||
64
+ environment.npm_lifecycle_event === "npx"
65
+ ? "ephemeral"
66
+ : "global";
39
67
  }
40
68
 
41
69
  export function launch() {
42
70
  const binary = binaryFor();
43
71
  if (!binary) {
44
- throw new Error(`Unsupported platform: ${process.platform}-${process.arch}`);
72
+ throw new Error(
73
+ `Unsupported platform: ${process.platform}-${process.arch}`,
74
+ );
45
75
  }
46
76
  if (!existsSync(binary)) {
47
- throw new Error(`Epismo native binary is missing for ${process.platform}-${process.arch}. Reinstall the epismo package.`);
77
+ throw new Error(
78
+ `Epismo native binary is missing for ${process.platform}-${process.arch}. Reinstall the epismo package.`,
79
+ );
48
80
  }
49
81
  const manager = detectPackageManager();
50
82
  const env = {
@@ -52,12 +84,13 @@ export function launch() {
52
84
  EPISMO_DISTRIBUTION: "node",
53
85
  EPISMO_NODE_MANAGER: manager.name,
54
86
  EPISMO_NODE_MANAGER_VERSION: manager.version || "",
55
- EPISMO_NODE_SCOPE: installationScope()
87
+ EPISMO_NODE_SCOPE: installationScope(),
56
88
  };
57
89
  const child = spawn(binary, process.argv.slice(2), { stdio: "inherit", env });
58
90
  const signalHandlers = new Map();
59
91
  const removeSignalHandlers = () => {
60
- for (const [signal, handler] of signalHandlers) process.off(signal, handler);
92
+ for (const [signal, handler] of signalHandlers)
93
+ process.off(signal, handler);
61
94
  };
62
95
  child.on("error", (error) => {
63
96
  removeSignalHandlers();
@@ -82,7 +115,9 @@ export function launch() {
82
115
  }
83
116
 
84
117
  function versionFromUserAgent(userAgent, manager) {
85
- return userAgent.match(new RegExp(`(?:^|\\s)${manager}/([^\\s]+)`, "i"))?.[1] || "";
118
+ return (
119
+ userAgent.match(new RegExp(`(?:^|\\s)${manager}/([^\\s]+)`, "i"))?.[1] || ""
120
+ );
86
121
  }
87
122
 
88
123
  function pnpmOwnsPackage(root, entrypoint) {
@@ -92,7 +127,8 @@ function pnpmOwnsPackage(root, entrypoint) {
92
127
  const nodeModules = join(current, "node_modules");
93
128
  if (existsSync(join(nodeModules, ".modules.yaml"))) {
94
129
  try {
95
- if (realpathSync(join(nodeModules, "epismo")) === realpathSync(root)) return true;
130
+ if (realpathSync(join(nodeModules, "epismo")) === realpathSync(root))
131
+ return true;
96
132
  } catch {
97
133
  // Keep looking for the owning pnpm node_modules directory.
98
134
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epismo",
3
- "version": "1.28.1",
3
+ "version": "1.29.0",
4
4
  "description": "Native CLI for Epismo. Continue work across people and AI agents; JSON for terminals, scripts, and workflows.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",