jobscout 1.3.0 → 1.4.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.
- package/bin/cli.mjs +33 -8
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -52,12 +52,12 @@ function ensureDir(dir) {
|
|
|
52
52
|
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
// Copy a file, rewriting plugin-relative schema paths to the
|
|
56
|
-
function copyFileRewrite(src, dest) {
|
|
55
|
+
// Copy a file, rewriting plugin-relative schema paths to the target layout.
|
|
56
|
+
function copyFileRewrite(src, dest, schemaPath = ".claude/schemas/") {
|
|
57
57
|
let text = readFileSync(src, "utf8");
|
|
58
58
|
text = text
|
|
59
|
-
.replace(/\$\{CLAUDE_PLUGIN_ROOT\}\/schemas\//g,
|
|
60
|
-
.replace(/\.\/schemas\//g,
|
|
59
|
+
.replace(/\$\{CLAUDE_PLUGIN_ROOT\}\/schemas\//g, schemaPath)
|
|
60
|
+
.replace(/\.\/schemas\//g, schemaPath);
|
|
61
61
|
ensureDir(dirname(dest));
|
|
62
62
|
writeFileSync(dest, text);
|
|
63
63
|
}
|
|
@@ -130,15 +130,40 @@ function setupClaude() {
|
|
|
130
130
|
log(` ${DIM}Không cần /plugin install — Claude Code tự nhận .claude/${RESET}`);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
// Codex chỉ auto-discover skills trong skills/ — nên flatten mọi thứ (kể cả
|
|
134
|
+
// orchestrator find-jobs và 2 "agent" job-collector/job-matcher) thành skills.
|
|
135
|
+
const CODEX_SKILLS = [
|
|
136
|
+
"find-jobs",
|
|
137
|
+
"job-collector",
|
|
138
|
+
"job-matcher",
|
|
139
|
+
...CLAUDE_SKILLS
|
|
140
|
+
];
|
|
141
|
+
|
|
133
142
|
function setupCodex() {
|
|
134
143
|
heading("Codex CLI");
|
|
135
144
|
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
const dotAgents = join(CWD, ".agents");
|
|
146
|
+
const skillsDest = join(dotAgents, "skills");
|
|
147
|
+
const schemasDest = join(dotAgents, "schemas");
|
|
148
|
+
|
|
149
|
+
[skillsDest, schemasDest].forEach(ensureDir);
|
|
150
|
+
|
|
151
|
+
// Schemas — file path để skill đọc runtime (Codex không auto-discover, chỉ đọc).
|
|
152
|
+
copyDir(join(PLUGIN_SRC, "schemas"), schemasDest);
|
|
153
|
+
ok("Copy .agents/schemas/ (profile, job, match)");
|
|
154
|
+
|
|
155
|
+
// Toàn bộ skills (gồm orchestrator + collector + matcher).
|
|
156
|
+
CODEX_SKILLS.forEach((name) => {
|
|
157
|
+
copyFileRewrite(
|
|
158
|
+
join(PLUGIN_SRC, "skills", name, "SKILL.md"),
|
|
159
|
+
join(skillsDest, name, "SKILL.md"),
|
|
160
|
+
".agents/schemas/"
|
|
161
|
+
);
|
|
162
|
+
});
|
|
163
|
+
ok(`Copy .agents/skills/ (${CODEX_SKILLS.length} skills)`);
|
|
139
164
|
|
|
140
165
|
log("");
|
|
141
|
-
info("Chạy Codex:");
|
|
166
|
+
info("Xong! Chạy Codex trong thư mục này:");
|
|
142
167
|
log(` ${CYAN}codex --search${RESET} ${DIM}# bật web search${RESET}`);
|
|
143
168
|
log(` Gọi skill ${CYAN}find-jobs${RESET} với đường dẫn CV.`);
|
|
144
169
|
}
|
package/package.json
CHANGED