@kaydash9999/banker-plugins 0.24.0 → 0.25.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 (58) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +49 -0
  4. package/README.md +5 -4
  5. package/bin/lib/codex-hooks.mjs +5 -1
  6. package/codex/hooks.json +4 -4
  7. package/codex/manifest.json +2 -1
  8. package/codex/skills/teamwork/scripts/teamwork.mjs +21 -11
  9. package/codex/transform-matrix.md +1 -0
  10. package/hooks/telemetry-count-codex.mjs +3 -2
  11. package/package.json +1 -1
  12. package/skills/anti-drm/SKILL.md +2 -2
  13. package/skills/anti-drm/scripts/anti-drm.mjs +8 -5
  14. package/skills/anti-drm/scripts/instruction-toggle.mjs +6 -3
  15. package/skills/build-testbox/scripts/browser-cell.mjs +10 -2
  16. package/skills/build-testbox/scripts/containers.mjs +8 -3
  17. package/skills/build-testbox/scripts/proc.mjs +32 -8
  18. package/skills/build-testbox/scripts/testbox.mjs +10 -2
  19. package/skills/git-init/scripts/git-init.mjs +53 -5
  20. package/skills/git-init/scripts/marker-block.mjs +144 -22
  21. package/skills/init-dir/SKILL.md +1 -1
  22. package/skills/init-dir/scripts/init-dir.mjs +29 -2
  23. package/skills/init-dir/scripts/marker-block.mjs +144 -22
  24. package/skills/init-dir/templates/scripts/README.md +4 -1
  25. package/skills/init-dir/templates/scripts/lib/service.mjs +140 -33
  26. package/skills/lineage/SKILL.md +1 -1
  27. package/skills/lineage/lineage.py +11 -11
  28. package/skills/motion-sites/SKILL.md +79 -0
  29. package/skills/motion-sites/scripts/motion-sites.mjs +331 -0
  30. package/skills/omc-patch/scripts/omc-patch.mjs +2 -1
  31. package/skills/payload-mon/scripts/payload-mon.mjs +2 -1
  32. package/skills/payload-mon/scripts/payload-size.mjs +2 -2
  33. package/skills/progress-mon/README.md +4 -3
  34. package/skills/progress-mon/SKILL.md +1 -1
  35. package/skills/progress-mon/references/adr.md +7 -0
  36. package/skills/progress-mon/scripts/pm-adr-view.mjs +101 -0
  37. package/skills/progress-mon/scripts/pm-adr.mjs +38 -105
  38. package/skills/progress-mon/scripts/pm-check.mjs +16 -7
  39. package/skills/progress-mon/scripts/pm-config.mjs +133 -7
  40. package/skills/progress-mon/scripts/pm-data.mjs +35 -29
  41. package/skills/progress-mon/scripts/pm-memory.mjs +14 -7
  42. package/skills/progress-mon/scripts/pm-render.mjs +1 -1
  43. package/skills/progress-mon/scripts/pm-server.mjs +3 -3
  44. package/skills/progress-mon/scripts/pm-sources.mjs +12 -2
  45. package/skills/remains/SKILL.md +30 -3
  46. package/skills/remains/scripts/boxes.mjs +14 -4
  47. package/skills/setup-bypass-permissions/scripts/bypass-permissions.mjs +2 -1
  48. package/skills/setup-bypass-permissions/scripts/codex-config.mjs +12 -7
  49. package/skills/setup-omc-hud/assets/apply-hud.mjs +2 -1
  50. package/skills/setup-omc-hud/assets/codex-config.mjs +12 -7
  51. package/skills/setup-omc-hud/scripts/claude-update-last.mjs +2 -1
  52. package/skills/smart-compact/scripts/codex-gate.mjs +25 -4
  53. package/skills/tone-compact/scripts/instruction-toggle.mjs +6 -3
  54. package/skills/tune-tmux/scripts/marker-block.mjs +144 -22
  55. package/skills/tune-tmux/scripts/tmux-config.mjs +35 -3
  56. package/skills/tune-tmux/scripts/tune-tmux.mjs +15 -9
  57. package/skills/ultra-chain/references/chain-ledger.mjs +8 -1
  58. package/skills/vertical-pptx/verify_a4p.mjs +11 -4
@@ -6,9 +6,9 @@
6
6
  * Every function that runs a program takes `exec(cmd, args)` returning { status, stdout, stderr, error }, so the
7
7
  * tests can stand in for tmux on every OS. No network is used.
8
8
  */
9
- import { accessSync, constants, lstatSync, readFileSync, rmSync, statSync } from "node:fs";
9
+ import { accessSync, constants, lstatSync, readFileSync, realpathSync, rmSync, statSync } from "node:fs";
10
10
  import { devNull, homedir } from "node:os";
11
- import { basename, delimiter, join, resolve } from "node:path";
11
+ import { basename, delimiter, dirname, join, resolve } from "node:path";
12
12
 
13
13
  /** The tool and version in `tmux -V` output. psmux says "tmux 3.3.8" on line 1 and "psmux" on line 2. */
14
14
  export function parseVersion(text) {
@@ -76,13 +76,45 @@ export function pickClipboard({ platform, env, has }) {
76
76
 
77
77
  const exists = (p) => lstatSync(p, { throwIfNoEntry: false }) !== undefined;
78
78
 
79
+ // The path as the file system spells it (native first: the long name and the case on disk), a missing tail joined to
80
+ // its nearest existing folder so spelled.
81
+ function spelled(p) {
82
+ try {
83
+ return realpathSync.native(p);
84
+ } catch {
85
+ try {
86
+ return realpathSync(p);
87
+ } catch {
88
+ const up = dirname(p);
89
+ return up === p ? p : join(spelled(up), basename(p));
90
+ }
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Whether a and b name one file: device and inode (bigint) when both are there, else the spelled paths, case folded on
96
+ * Windows and macOS. A string compare took a --conf in another case, through a linked XDG_CONFIG_HOME or an 8.3 name
97
+ * for another file and warned wrongly.
98
+ */
99
+ export function sameFile(a, b) {
100
+ try {
101
+ const x = statSync(a, { bigint: true });
102
+ const y = statSync(b, { bigint: true });
103
+ if (x.ino !== 0n && y.ino !== 0n) return x.dev === y.dev && x.ino === y.ino;
104
+ } catch {
105
+ // one is not there (yet): the spellings decide
106
+ }
107
+ const fold = (p) => (process.platform === "win32" || process.platform === "darwin" ? p.toLowerCase() : p);
108
+ return fold(spelled(resolve(a))) === fold(spelled(resolve(b)));
109
+ }
110
+
79
111
  /** The config files tmux reads by itself, in order. Measured: 3.6a reads every one there; 2.7 only ~/.tmux.conf. */
80
112
  export function tmuxReads(v, env, home) {
81
113
  const files = [join(home, ".tmux.conf")];
82
114
  if (v && !atLeast(v, 3, 1)) return files;
83
115
  if (env.XDG_CONFIG_HOME) files.push(join(env.XDG_CONFIG_HOME, "tmux", "tmux.conf"));
84
116
  files.push(join(home, ".config", "tmux", "tmux.conf"));
85
- return [...new Set(files.map((f) => resolve(f)))];
117
+ return files.map((f) => resolve(f)).filter((f, i, all) => !all.slice(0, i).some((g) => sameFile(g, f)));
86
118
  }
87
119
 
88
120
  /** The tmux file for the block: --conf, else the first of tmuxReads that is there, else ~/.tmux.conf. */
@@ -19,15 +19,19 @@
19
19
  * Exit status: 0 done (nothing to change included), 1 refused, write or reload failed, 2 usage error,
20
20
  * 3 environment (on or off with neither tmux nor psmux). No network is used.
21
21
  */
22
- import { mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
22
+ import { existsSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
23
23
  import { spawnSync } from "node:child_process";
24
- import { tmpdir } from "node:os";
24
+ import { homedir, tmpdir } from "node:os";
25
25
  import { join, resolve } from "node:path";
26
26
  import { pathToFileURL } from "node:url";
27
27
  import { HASH, commitBlock, markers, planBlock } from "./marker-block.mjs";
28
28
  import * as tc from "./tmux-config.mjs";
29
29
  import { appRows } from "./app-notes.mjs";
30
30
 
31
+ // The folder programs start in: the home folder (Windows looks for a program in the working folder first, so a
32
+ // program planted in the folder worked on never runs), or the temp folder when there is no home folder.
33
+ const runDir = () => (existsSync(homedir()) ? homedir() : tmpdir());
34
+
31
35
  const USAGE = [
32
36
  "tune-tmux: tmux, psmux 설정에 표지 블록을 넣고 빼서 마우스 드래그 복사와 PageUp/PageDown 스크롤을 맞춤",
33
37
  "사용법: node tune-tmux.mjs [status|on|off] [--target auto|tmux|psmux] [--conf <경로>] [--follow-symlink] [--force-drag] [--reload] [--socket <이름>] [--dry-run] [--json]",
@@ -68,7 +72,8 @@ const loadCaps = () => JSON.parse(readFileSync(new URL("./psmux-caps.json", impo
68
72
 
69
73
  function defaults(deps) {
70
74
  const env = deps.env ?? process.env;
71
- const exec = (cmd, args) => spawnSync(cmd, args, { encoding: "utf8", env, timeout: 15000, windowsHide: true });
75
+ // from the home folder: Windows looks for tmux or psmux in the working folder first
76
+ const exec = (cmd, args) => spawnSync(cmd, args, { cwd: runDir(), encoding: "utf8", env, timeout: 15000, windowsHide: true });
72
77
  return { env, platform: process.platform, exec, caps: null, ...deps };
73
78
  }
74
79
 
@@ -109,8 +114,8 @@ function context(o, d) {
109
114
  }
110
115
  const conf = tc.chooseTmuxConf(t.tool, d.env, home, o.conf);
111
116
  const reads = tc.tmuxReads(t.tool, d.env, home);
112
- if (o.conf && !reads.includes(conf)) ctx.warnings.push(`경고: tmux 가 스스로 읽지 않는 파일: ${conf}. tmux -f 나 source-file 로 불러야 적용됨`);
113
- ctx.warnings.push(...tc.conflictsIn(reads.filter((f) => f !== conf)));
117
+ if (o.conf && !reads.some((f) => tc.sameFile(f, conf))) ctx.warnings.push(`경고: tmux 가 스스로 읽지 않는 파일: ${conf}. tmux -f 나 source-file 로 불러야 적용됨`);
118
+ ctx.warnings.push(...tc.conflictsIn(reads.filter((f) => !tc.sameFile(f, conf))));
114
119
  const body = t.tool ? tmuxWanted(t.tool, o, d) : { lines: [], omitted: [], clipboard: null };
115
120
  return { ...ctx, conf, ...body };
116
121
  }
@@ -155,7 +160,9 @@ function change(ctx, o, d) {
155
160
  const plan = planOf(ctx, o.cmd === "off" || none ? null : ctx.lines.join("\n"), o);
156
161
  if (!plan.ok) return fail(1, `${plan.message}. 아무것도 바꾸지 않음`);
157
162
  if (none && !plan.changed) return { code: 0, report: { ...reportOf(ctx, o.cmd, o), changed: false, ...noLines(ctx) } };
158
- return reloaded(ctx, plan, o, d, none ? removedOld(written(ctx, o, plan), ctx) : written(ctx, o, plan));
163
+ const done = o.dryRun ? plan : commitBlock(plan, SKILL);
164
+ if (!done.ok) return fail(1, `${done.message}. 아무것도 바꾸지 않음`);
165
+ return reloaded(ctx, plan, o, d, none ? removedOld(written(ctx, o, plan, done), ctx) : written(ctx, o, plan, done));
159
166
  }
160
167
 
161
168
  // The written report, applied to a running server when --reload asks (not on a dry run).
@@ -166,9 +173,8 @@ function reloaded(ctx, plan, o, d, out) {
166
173
  return { code: 0, report: { ...out, reload } };
167
174
  }
168
175
 
169
- // Writes the plan unless dry-run and says what happened.
170
- function written(ctx, o, plan) {
171
- const done = o.dryRun ? plan : commitBlock(plan, SKILL);
176
+ // What the write (or the dry-run plan) did, as the report says it.
177
+ function written(ctx, o, plan, done) {
172
178
  const empty = (o.cmd === "off" || ctx.lines.length === 0) && plan.changed && plan.after?.length === 0;
173
179
  const note = empty ? "블록만 있던 파일이라 빈 파일로 남김" : null;
174
180
  return { ...reportOf(ctx, o.cmd, o), changed: plan.changed, created: done.created === true, backup: done.backup ?? null, note };
@@ -18,8 +18,13 @@ import { spawnSync } from "node:child_process";
18
18
  import { createHash, randomBytes } from "node:crypto";
19
19
  import { appendFileSync, existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
20
20
  import { dirname, isAbsolute, join, relative, resolve } from "node:path";
21
+ import { homedir, tmpdir } from "node:os";
21
22
  import { fileURLToPath } from "node:url";
22
23
 
24
+ // The folder programs start in: the home folder (Windows looks for a program in the working folder first, so a
25
+ // program planted in the folder worked on never runs), or the temp folder when there is no home folder.
26
+ const startDir = () => (existsSync(homedir()) ? homedir() : tmpdir());
27
+
23
28
  export const STAGES = [
24
29
  { id: "preflight", label: "사전 점검" },
25
30
  { id: "research", label: "자료 조사" },
@@ -219,8 +224,10 @@ function checkQuorum(event, meta) {
219
224
 
220
225
  // ── run folder ───────────────────────────────────────────────────────────────
221
226
 
227
+ // Started from the home folder with git -C: Windows looks for a program in the working folder first, so a git.exe
228
+ // inside the folder worked on never runs.
222
229
  function git(cwd, args) {
223
- const r = spawnSync("git", args, { cwd, encoding: "utf8" });
230
+ const r = spawnSync("git", ["-C", resolve(cwd), ...args], { cwd: startDir(), encoding: "utf8" });
224
231
  return r.status === 0 ? r.stdout.trim() : null;
225
232
  }
226
233
 
@@ -41,6 +41,7 @@
41
41
  * Usage: node verify_a4p.mjs <file.pptx> [--json] [--strict] [--font-file <path>] [--deck <deck.json>]
42
42
  */
43
43
  import { spawnSync } from 'node:child_process';
44
+ import { randomBytes } from 'node:crypto';
44
45
  import fs from 'node:fs';
45
46
  import { createRequire } from 'node:module';
46
47
  import os from 'node:os';
@@ -2101,10 +2102,16 @@ export function main(argv) {
2101
2102
  console.error(`verify_a4p: 재압축 산출물이 자기 무결성 검사를 통과하지 못해 쓰지 않았다:\n ${integrity.problems.join('\n ')}`);
2102
2103
  return EXIT.FAIL;
2103
2104
  }
2104
- // Stage then rename, so an interrupted --in-place cannot leave a half-written deck.
2105
- const tmp = `${target}.a4p-tmp`;
2106
- fs.writeFileSync(tmp, rep.out);
2107
- fs.renameSync(tmp, target);
2105
+ // Stage then rename, so an interrupted --in-place cannot leave a half-written deck. The stage name is random
2106
+ // and made exclusively, so a link someone left at a fixed name is never written through.
2107
+ const tmp = `${target}.${randomBytes(6).toString('hex')}.a4p-tmp`;
2108
+ try {
2109
+ fs.writeFileSync(tmp, rep.out, { flag: 'wx' });
2110
+ fs.renameSync(tmp, target);
2111
+ } catch (e) {
2112
+ fs.rmSync(tmp, { force: true });
2113
+ throw e;
2114
+ }
2108
2115
 
2109
2116
  report.write = {
2110
2117
  mode: opts.convert ? 'convert-a4p' : 'repair',