@workit-dev/pi 2.16.0 → 2.16.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.
Files changed (2) hide show
  1. package/dist/workit.js +7 -5
  2. package/package.json +1 -1
package/dist/workit.js CHANGED
@@ -30705,16 +30705,18 @@ var openLog = (env, args) => {
30705
30705
  return null;
30706
30706
  }
30707
30707
  };
30708
- function runCli(args, env, cwd) {
30708
+ function runCli(args, env) {
30709
30709
  let log = null;
30710
30710
  try {
30711
30711
  const cli = locateWorkitCli({ env });
30712
+ const cwd = teardownDir(env);
30713
+ fs32.mkdirSync(cwd, { recursive: true });
30712
30714
  log = openLog(env, args);
30713
30715
  const started = teardownDeps.spawn({
30714
30716
  command: cli.command,
30715
30717
  args: [...cli.args, ...args],
30716
30718
  env,
30717
- cwd: fs32.existsSync(cwd) ? cwd : teardownDir(env),
30719
+ cwd,
30718
30720
  log
30719
30721
  });
30720
30722
  if (!started && log !== null)
@@ -30740,7 +30742,7 @@ function endSession(end, env = process.env) {
30740
30742
  const child = { ...env, WORKIT_SESSION_ID: session, WORKIT_HOST: end.host };
30741
30743
  for (const key of HOST_SESSION_VARS2)
30742
30744
  delete child[key];
30743
- return runCli(["stop", "--session", session, "--reason", "session-end"], child, end.cwd);
30745
+ return runCli(["stop", "--session", session, "--reason", "session-end"], child);
30744
30746
  }
30745
30747
  var claim2 = (file, now) => {
30746
30748
  for (let attempt = 0;attempt < 2; attempt += 1)
@@ -30768,7 +30770,7 @@ var fresh = (stamp, now) => {
30768
30770
  return false;
30769
30771
  }
30770
30772
  };
30771
- function reapAtStart(cwd, env = process.env) {
30773
+ function reapAtStart(_cwd, env = process.env) {
30772
30774
  const stamp = reapStamp(env);
30773
30775
  const lock = `${stamp}.claim`;
30774
30776
  const now = teardownDeps.now();
@@ -30785,7 +30787,7 @@ function reapAtStart(cwd, env = process.env) {
30785
30787
  try {
30786
30788
  if (fresh(stamp, now))
30787
30789
  return false;
30788
- started = runCli(["stop", "--orphans", "--reason", "session-start"], env, cwd);
30790
+ started = runCli(["stop", "--orphans", "--reason", "session-start"], env);
30789
30791
  if (started) {
30790
30792
  const temp = `${stamp}.${process.pid}`;
30791
30793
  fs32.writeFileSync(temp, String(now), { mode: 384 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/pi",
3
- "version": "2.16.0",
3
+ "version": "2.16.1",
4
4
  "description": "Workit native extension for Pi — tools, method skills, and session continuity",
5
5
  "keywords": [
6
6
  "agentic-coding",