jobscout 1.3.0 → 1.4.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/bin/cli.mjs +44 -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
|
}
|
|
@@ -133,12 +133,48 @@ function setupClaude() {
|
|
|
133
133
|
function setupCodex() {
|
|
134
134
|
heading("Codex CLI");
|
|
135
135
|
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
const dotAgents = join(CWD, ".agents");
|
|
137
|
+
const agentsDest = join(dotAgents, "agents");
|
|
138
|
+
const commandsDest = join(dotAgents, "commands");
|
|
139
|
+
const skillsDest = join(dotAgents, "skills");
|
|
140
|
+
const schemasDest = join(dotAgents, "schemas");
|
|
141
|
+
|
|
142
|
+
[agentsDest, commandsDest, skillsDest, schemasDest].forEach(ensureDir);
|
|
143
|
+
|
|
144
|
+
// Schemas.
|
|
145
|
+
copyDir(join(PLUGIN_SRC, "schemas"), schemasDest);
|
|
146
|
+
ok("Copy .agents/schemas/ (profile, job, match)");
|
|
147
|
+
|
|
148
|
+
// Agents.
|
|
149
|
+
["job-collector", "job-matcher"].forEach((name) => {
|
|
150
|
+
copyFileRewrite(
|
|
151
|
+
join(PLUGIN_SRC, "agents", `${name}.md`),
|
|
152
|
+
join(agentsDest, `${name}.md`),
|
|
153
|
+
".agents/schemas/"
|
|
154
|
+
);
|
|
155
|
+
});
|
|
156
|
+
ok("Copy .agents/agents/ (job-collector, job-matcher)");
|
|
157
|
+
|
|
158
|
+
// Command.
|
|
159
|
+
copyFileRewrite(
|
|
160
|
+
join(PLUGIN_SRC, "commands", "find-jobs.md"),
|
|
161
|
+
join(commandsDest, "find-jobs.md"),
|
|
162
|
+
".agents/schemas/"
|
|
163
|
+
);
|
|
164
|
+
ok("Copy .agents/commands/find-jobs.md");
|
|
165
|
+
|
|
166
|
+
// Skills.
|
|
167
|
+
CLAUDE_SKILLS.forEach((name) => {
|
|
168
|
+
copyFileRewrite(
|
|
169
|
+
join(PLUGIN_SRC, "skills", name, "SKILL.md"),
|
|
170
|
+
join(skillsDest, name, "SKILL.md"),
|
|
171
|
+
".agents/schemas/"
|
|
172
|
+
);
|
|
173
|
+
});
|
|
174
|
+
ok(`Copy .agents/skills/ (${CLAUDE_SKILLS.length} skills)`);
|
|
139
175
|
|
|
140
176
|
log("");
|
|
141
|
-
info("Chạy Codex:");
|
|
177
|
+
info("Xong! Chạy Codex trong thư mục này:");
|
|
142
178
|
log(` ${CYAN}codex --search${RESET} ${DIM}# bật web search${RESET}`);
|
|
143
179
|
log(` Gọi skill ${CYAN}find-jobs${RESET} với đường dẫn CV.`);
|
|
144
180
|
}
|
package/package.json
CHANGED