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.
Files changed (2) hide show
  1. package/bin/cli.mjs +44 -8
  2. 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 .claude/ layout.
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, ".claude/schemas/")
60
- .replace(/\.\/schemas\//g, ".claude/schemas/");
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 pluginDest = join(CWD, "job-matching-plugin");
137
- copyDir(PLUGIN_SRC, pluginDest);
138
- ok("Copy job-matching-plugin/ (skills, schemas, .codex-plugin)");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jobscout",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "AI job matching — tìm và xếp hạng việc làm phù hợp CV, song ngữ Việt–Anh. Chạy trên Claude Code, Codex CLI và ChatGPT.",
5
5
  "bin": {
6
6
  "jobscout": "bin/cli.mjs"