@workit-dev/codex 0.0.0-stage → 1.0.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/.codex-plugin/plugin.json +32 -0
- package/.mcp.json +9 -0
- package/README.md +29 -2
- package/agents/workit-implementer.toml +52 -0
- package/agents/workit-reviewer.toml +32 -0
- package/agents/workit-verifier.toml +38 -0
- package/bin/launch-mcp.mjs +42 -0
- package/bin/node-resolve.mjs +249 -0
- package/bin/workit-paths.mjs +242 -0
- package/dist/launch-mcp.js +31422 -0
- package/dist/workit-hook-2hj7pbaj.js +23598 -0
- package/dist/workit-hook-3g6cv3hd.js +10 -0
- package/dist/workit-hook-3qaf6adn.js +10 -0
- package/dist/workit-hook-6n3h8wh7.js +104 -0
- package/dist/workit-hook-am9gge2k.js +583 -0
- package/dist/workit-hook-avy6vsn6.js +88 -0
- package/dist/workit-hook-b8nrcfzr.js +151 -0
- package/dist/workit-hook-ehy7rps6.js +200 -0
- package/dist/workit-hook-jy7y0gdx.js +70 -0
- package/dist/workit-hook-mk64s4fk.js +19 -0
- package/dist/workit-hook-y0ga088a.js +9 -0
- package/dist/workit-hook-zyzsv436.js +43 -0
- package/dist/workit-hook.js +94 -0
- package/hooks/hooks.json +46 -0
- package/package.json +48 -4
- package/skills/workit-architecture/SKILL.md +72 -0
- package/skills/workit-architecture/agents/openai.yaml +3 -0
- package/skills/workit-architecture/references/instruction-files.md +52 -0
- package/skills/workit-architecture/references/vocabulary.md +53 -0
- package/skills/workit-bdd/SKILL.md +53 -0
- package/skills/workit-continue/SKILL.md +54 -0
- package/skills/workit-debug/SKILL.md +45 -0
- package/skills/workit-deslop/SKILL.md +58 -0
- package/skills/workit-fanout/SKILL.md +71 -0
- package/skills/workit-fanout/references/brief.md +141 -0
- package/skills/workit-fanout/references/orchestration.md +169 -0
- package/skills/workit-implement/SKILL.md +71 -0
- package/skills/workit-retro/SKILL.md +72 -0
- package/skills/workit-retro/agents/openai.yaml +3 -0
- package/skills/workit-retro/references/sources.md +35 -0
- package/skills/workit-retro/references/steering.md +39 -0
- package/skills/workit-review/SKILL.md +66 -0
- package/skills/workit-review/references/impact.md +24 -0
- package/skills/workit-shape/SKILL.md +71 -0
- package/skills/workit-shape/references/diagrams.md +17 -0
- package/skills/workit-shape/references/knowledge.md +61 -0
- package/skills/workit-shape/references/mockups.md +15 -0
- package/skills/workit-shape/references/slicing.md +44 -0
- package/skills/workit-ship/SKILL.md +71 -0
- package/skills/workit-ship/references/changelog.md +44 -0
- package/skills/workit-ship/references/pr-body.md +32 -0
- package/skills/workit-ship/references/release.md +39 -0
- package/skills/workit-test-audit/SKILL.md +54 -0
- package/skills/workit-verify-app/SKILL.md +68 -0
- package/skills/workit-verify-app/references/template.md +51 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// packages/workit-core/src/core/workit-paths.mjs
|
|
4
|
+
import { existsSync, lstatSync, mkdirSync, renameSync, writeFileSync } from "node:fs";
|
|
5
|
+
import os from "node:os";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
var WORKIT_DIR_OVERRIDES = {
|
|
8
|
+
config: ["WORKIT_CONFIG", "WORKIT_CONFIG_DIR"],
|
|
9
|
+
state: ["WORKIT_STATE_DIR"],
|
|
10
|
+
data: [],
|
|
11
|
+
cache: [],
|
|
12
|
+
runtime: []
|
|
13
|
+
};
|
|
14
|
+
var WORKIT_DIR_XDG = {
|
|
15
|
+
config: "XDG_CONFIG_HOME",
|
|
16
|
+
state: "XDG_STATE_HOME",
|
|
17
|
+
data: "XDG_DATA_HOME",
|
|
18
|
+
cache: "XDG_CACHE_HOME",
|
|
19
|
+
runtime: "XDG_RUNTIME_DIR"
|
|
20
|
+
};
|
|
21
|
+
var XDG_DEFAULTS = {
|
|
22
|
+
config: [".config"],
|
|
23
|
+
state: [".local", "state"],
|
|
24
|
+
data: [".local", "share"],
|
|
25
|
+
cache: [".cache"]
|
|
26
|
+
};
|
|
27
|
+
var userHome = (env) => env.HOME || env.USERPROFILE || os.homedir();
|
|
28
|
+
var xdgBase = (kind, env) => {
|
|
29
|
+
const base = env[WORKIT_DIR_XDG[kind]];
|
|
30
|
+
return base && path.isAbsolute(base) ? base : "";
|
|
31
|
+
};
|
|
32
|
+
var workitDir = (kind, env = process.env, platform = process.platform) => {
|
|
33
|
+
for (const name of WORKIT_DIR_OVERRIDES[kind])
|
|
34
|
+
if (env[name])
|
|
35
|
+
return String(env[name]);
|
|
36
|
+
const base = xdgBase(kind, env);
|
|
37
|
+
if (base)
|
|
38
|
+
return path.join(base, "workit");
|
|
39
|
+
if (kind === "runtime") {
|
|
40
|
+
if (platform === "win32")
|
|
41
|
+
return path.join(env.TEMP || env.TMP || os.tmpdir(), "workit");
|
|
42
|
+
const uid = typeof process.getuid === "function" ? process.getuid() : os.userInfo().username;
|
|
43
|
+
return path.join(env.TMPDIR || os.tmpdir(), `workit-${uid}`);
|
|
44
|
+
}
|
|
45
|
+
const home = userHome(env);
|
|
46
|
+
if (platform !== "win32")
|
|
47
|
+
return path.join(home, ...XDG_DEFAULTS[kind], "workit");
|
|
48
|
+
if (kind === "config")
|
|
49
|
+
return path.join(env.APPDATA || path.join(home, "AppData", "Roaming"), "workit");
|
|
50
|
+
const local = path.join(env.LOCALAPPDATA || path.join(home, "AppData", "Local"), "workit");
|
|
51
|
+
return kind === "cache" ? path.join(local, "cache") : local;
|
|
52
|
+
};
|
|
53
|
+
var configDir = (env, platform) => workitDir("config", env, platform);
|
|
54
|
+
var stateDir3 = (env, platform) => workitDir("state", env, platform);
|
|
55
|
+
var dataDir = (env, platform) => workitDir("data", env, platform);
|
|
56
|
+
var legacyDirs = (env = process.env, platform = process.platform) => {
|
|
57
|
+
const home = userHome(env);
|
|
58
|
+
const old = [];
|
|
59
|
+
if (platform === "darwin")
|
|
60
|
+
old.push({
|
|
61
|
+
kind: "state",
|
|
62
|
+
legacy: path.join(home, "Library", "Application Support", "workit")
|
|
63
|
+
});
|
|
64
|
+
if (platform === "win32")
|
|
65
|
+
old.push({ kind: "config", legacy: path.join(home, ".config", "workit") });
|
|
66
|
+
return old.filter((entry) => !WORKIT_DIR_OVERRIDES[entry.kind].some((name) => env[name]) && !xdgBase(entry.kind, env)).map((entry) => ({
|
|
67
|
+
kind: entry.kind,
|
|
68
|
+
legacy: entry.legacy,
|
|
69
|
+
target: workitDir(entry.kind, env, platform)
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
var LEGACY_MARKER_INFIX = ".moved-";
|
|
73
|
+
var isRealDir = (file) => {
|
|
74
|
+
try {
|
|
75
|
+
return lstatSync(file).isDirectory();
|
|
76
|
+
} catch {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var migrateLegacyDirs = (options = {}) => {
|
|
81
|
+
const env = options.env || process.env;
|
|
82
|
+
const platform = options.platform || process.platform;
|
|
83
|
+
const stamp = (options.now || new Date).toISOString().replace(/[-:]/g, "").replace(/\..*$/, "Z");
|
|
84
|
+
const moved = [];
|
|
85
|
+
for (const entry of legacyDirs(env, platform)) {
|
|
86
|
+
if (!isRealDir(entry.legacy) || existsSync(entry.target))
|
|
87
|
+
continue;
|
|
88
|
+
const marker = `${entry.legacy}${LEGACY_MARKER_INFIX}${stamp}`;
|
|
89
|
+
try {
|
|
90
|
+
mkdirSync(path.dirname(entry.target), { recursive: true });
|
|
91
|
+
renameSync(entry.legacy, entry.target);
|
|
92
|
+
} catch {
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
writeFileSync(marker, `Workit moved this ${entry.kind} directory to ${entry.target} at ${stamp}.
|
|
97
|
+
`);
|
|
98
|
+
} catch {}
|
|
99
|
+
moved.push({ kind: entry.kind, legacy: entry.legacy, target: entry.target, marker });
|
|
100
|
+
}
|
|
101
|
+
return moved;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export { configDir, stateDir3, dataDir, migrateLegacyDirs };
|