@khanhcan148/mk 0.1.28 → 0.1.29
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
|
@@ -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
|
|
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
|
package/src/lib/codex-rewrite.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
|
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
|
}
|
package/src/lib/runtime-codex.js
CHANGED
|
@@ -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
|
|
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
|
|
69
|
-
* haiku = "gpt-
|
|
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}>}
|