@khanhcan148/mk 0.1.28 → 0.1.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanhcan148/mk",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "CLI to install and manage MyClaudeKit (.claude/) in your projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -285,9 +285,9 @@ function buildToml(projectRoot = PACKAGE_ROOT) {
285
285
  const hookBlocks = buildHookBlocks(projectRoot);
286
286
 
287
287
  const parts = [
288
- '# codex >=0.129.0 <0.140.0',
288
+ '# codex >=0.130.0 <0.140.0',
289
289
  '',
290
- emitTable('features', { codex_hooks: true }),
290
+ emitTable('features', { hooks: true }),
291
291
  '',
292
292
  emitHookGroups('hooks.PreToolUse', hookBlocks['hooks.PreToolUse'].items),
293
293
  emitHookGroups('hooks.PostToolUse', hookBlocks['hooks.PostToolUse'].items),
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * Compliance
16
16
  * ----------
17
- * SKL-1: model: value is mapped via MODEL_MAP (opus→gpt-5, sonnet→gpt-5-mini); effort and
17
+ * SKL-1: model: value is mapped via MODEL_MAP (opus→gpt-5.5, sonnet→gpt-5.4); effort and
18
18
  * argument-hint are stripped (no Codex skill-level equivalent).
19
19
  * SKL-2: Round-trip determinism — two consecutive runs produce byte-identical output
20
20
  * SKL-3: Body bytes pass through unchanged; only frontmatter is rewritten
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * codex-rewrite.js — Shared kit-path rewriter for Codex conversion pipeline.
3
3
  *
4
- * Rewrites kit-relative `.claude/<subdir>/` references to `.codex/<subdir>/`
4
+ * Rewrites kit-relative `.claude/<subdir>` references to `.codex/<subdir>`
5
5
  * so that Codex-runtime skill/workflow/agent prose resolves correctly under
6
6
  * `.codex/` rather than the source `.claude/` tree.
7
7
  *
@@ -23,14 +23,18 @@
23
23
  // Substring match is intentional: `~/.claude/skills/X` becomes
24
24
  // `~/.codex/skills/X`. No prefix anchor (handles backtick, quote, space,
25
25
  // start-of-string, and ~/ uniformly).
26
- const _KIT_PATH_RE = /\.claude\/(workflows|skills|agents|commands|hooks)\//g;
26
+ //
27
+ // The lookahead permits both directory refs (`.claude/skills`) and child refs
28
+ // (`.claude/skills/foo.md`) while blocking prefix false positives such as
29
+ // `.claude/skills-old`.
30
+ const _KIT_PATH_RE = /\.claude\/(workflows|skills|agents|commands|hooks)(?=\/|[`'"<>\s).,;:]|$)/g;
27
31
 
28
32
  /**
29
- * Rewrite `.claude/<subdir>/` references to `.codex/<subdir>/` in `text`.
33
+ * Rewrite `.claude/<subdir>` references to `.codex/<subdir>` in `text`.
30
34
  *
31
35
  * @param {string} text - Input text (may contain multiple refs across multiple lines).
32
36
  * @returns {string} - Text with all kit-internal path references rewritten.
33
37
  */
34
38
  export function rewriteKitPaths(text) {
35
- return text.replace(_KIT_PATH_RE, '.codex/$1/');
39
+ return text.replace(_KIT_PATH_RE, '.codex/$1');
36
40
  }
@@ -53,8 +53,8 @@ function parseModelMapToml(raw) {
53
53
  * @type {Readonly<{[claudeModel: string]: string}>}
54
54
  */
55
55
  export const MODEL_MAP = Object.freeze({
56
- opus: 'gpt-5',
57
- sonnet: 'gpt-5-mini',
56
+ opus: 'gpt-5.5',
57
+ sonnet: 'gpt-5.4',
58
58
  });
59
59
 
60
60
  /**
@@ -64,9 +64,9 @@ export const MODEL_MAP = Object.freeze({
64
64
  * contains a `[model_map]` table, e.g.:
65
65
  * ```toml
66
66
  * [model_map]
67
- * opus = "gpt-5"
68
- * sonnet = "gpt-5-mini"
69
- * haiku = "gpt-4o-mini"
67
+ * opus = "gpt-5.5"
68
+ * sonnet = "gpt-5.4"
69
+ * haiku = "gpt-5.4-mini"
70
70
  * ```
71
71
  * When `undefined`, returns the frozen default MODEL_MAP.
72
72
  * @returns {Readonly<{[claudeModel: string]: string}>}