pipe-kan 0.29.0 → 0.29.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.
Files changed (2) hide show
  1. package/dist/pipe-kan.js +18 -10
  2. package/package.json +1 -1
package/dist/pipe-kan.js CHANGED
@@ -11832,11 +11832,13 @@ function permissionOptionForDecision(options, decision) {
11832
11832
  import { existsSync as existsSync3, readFileSync as readFileSync4, readdirSync } from "node:fs";
11833
11833
  import { homedir as homedir4 } from "node:os";
11834
11834
  import { join as join6 } from "node:path";
11835
- function createSkillRegistry(bundledDir = join6(import.meta.dirname, "..", "..", "..", ".agents", "skills")) {
11835
+ import { fileURLToPath } from "node:url";
11836
+ function createSkillRegistry(bundledDir) {
11837
+ const dir = bundledDir ?? join6(fileURLToPath(new URL(".", import.meta.url)), "..", "..", "..", ".agents", "skills");
11836
11838
  const userDir = join6(homedir4(), ".pi", "agent", "skills");
11837
11839
  return {
11838
11840
  list() {
11839
- const bundled = listSkills(bundledDir);
11841
+ const bundled = listSkills(dir);
11840
11842
  const user = existsSync3(userDir) ? listSkills(userDir) : [];
11841
11843
  const map = new Map;
11842
11844
  for (const skill of bundled)
@@ -11849,7 +11851,7 @@ function createSkillRegistry(bundledDir = join6(import.meta.dirname, "..", "..",
11849
11851
  const userPath = skillPath(userDir, id);
11850
11852
  if (existsSync3(userPath))
11851
11853
  return readSkill(userPath, id);
11852
- const bundledPath = skillPath(bundledDir, id);
11854
+ const bundledPath = skillPath(dir, id);
11853
11855
  if (existsSync3(bundledPath))
11854
11856
  return readSkill(bundledPath, id);
11855
11857
  return;
@@ -11982,7 +11984,10 @@ var TOOLS = [
11982
11984
  mutates: true
11983
11985
  }
11984
11986
  ];
11985
- var skills = createSkillRegistry();
11987
+ var skills;
11988
+ function skillRegistry() {
11989
+ return skills ??= createSkillRegistry();
11990
+ }
11986
11991
  var EXECUTORS = {
11987
11992
  board_state(_, app) {
11988
11993
  const board = app.board();
@@ -12005,7 +12010,7 @@ var EXECUTORS = {
12005
12010
  const skillId = String(args.skillId ?? "");
12006
12011
  if (!skillId)
12007
12012
  return { ok: false, error: "Missing skillId" };
12008
- const skill = skills.load(skillId);
12013
+ const skill = skillRegistry().load(skillId);
12009
12014
  if (!skill)
12010
12015
  return { ok: false, error: `Skill not found: ${skillId}` };
12011
12016
  const block = skillContextBlock(skill);
@@ -12153,7 +12158,10 @@ function createToolRegistry() {
12153
12158
  var sessions = new Map;
12154
12159
  var connecting = null;
12155
12160
  var startEpoch = 0;
12156
- var skills2 = createSkillRegistry();
12161
+ var skills2;
12162
+ function skillRegistry2() {
12163
+ return skills2 ??= createSkillRegistry();
12164
+ }
12157
12165
  var tools = createToolRegistry();
12158
12166
  function json2(res, status, body) {
12159
12167
  res.statusCode = status;
@@ -12213,7 +12221,7 @@ function handleAgentApi(req, res, app) {
12213
12221
  return true;
12214
12222
  }
12215
12223
  if (url.pathname === "/api/agent/skills" && method === "GET") {
12216
- json2(res, 200, skills2.list().map((s) => ({ id: s.id, name: s.name, description: s.description })));
12224
+ json2(res, 200, skillRegistry2().list().map((s) => ({ id: s.id, name: s.name, description: s.description })));
12217
12225
  return true;
12218
12226
  }
12219
12227
  if (url.pathname === "/api/agent/session" && method === "POST") {
@@ -12291,7 +12299,7 @@ function handleAgentApi(req, res, app) {
12291
12299
  }
12292
12300
  const context = [tools.systemBlock(), ...withPipedBoardContext(app.board(), body.context ?? [])];
12293
12301
  if (body.skillId) {
12294
- const skill = skills2.load(body.skillId);
12302
+ const skill = skillRegistry2().load(body.skillId);
12295
12303
  if (skill)
12296
12304
  context.push(skillContextBlock(skill));
12297
12305
  }
@@ -12620,7 +12628,7 @@ function stdinStat() {
12620
12628
  // src/ui.ts
12621
12629
  import { createReadStream, existsSync as existsSync4, statSync } from "node:fs";
12622
12630
  import { dirname as dirname3, extname, join as join9, resolve as resolve2, sep } from "node:path";
12623
- import { fileURLToPath } from "node:url";
12631
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
12624
12632
  var types = {
12625
12633
  ".css": "text/css; charset=utf-8",
12626
12634
  ".html": "text/html; charset=utf-8",
@@ -12633,7 +12641,7 @@ var types = {
12633
12641
  ".woff2": "font/woff2"
12634
12642
  };
12635
12643
  function packageRoot(from = import.meta.url) {
12636
- return resolve2(dirname3(fileURLToPath(from)), "..");
12644
+ return resolve2(dirname3(fileURLToPath2(from)), "..");
12637
12645
  }
12638
12646
  function uiDir(root) {
12639
12647
  return join9(root, "dist", "ui");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipe-kan",
3
- "version": "0.29.0",
3
+ "version": "0.29.2",
4
4
  "description": "Local Kanban for jira-cli",
5
5
  "license": "MIT",
6
6
  "type": "module",