@mcoda/shared 0.1.129 → 0.1.130
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/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./qa/QaTechStack.js";
|
|
|
8
8
|
export * from "./metadata/CommandMetadata.js";
|
|
9
9
|
export * from "./llm/LocalRunnerConfig.js";
|
|
10
10
|
export * from "./llm/GenerativeOperation.js";
|
|
11
|
+
export * from "./llm/CodexReasoningEffort.js";
|
|
11
12
|
export * from "./mswarm/GenericJobContract.js";
|
|
12
13
|
export * from "./mswarm/CapabilityContract.js";
|
|
13
14
|
export * from "./mswarm/ArtifactSandboxContract.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,mBAAmB,GACpB,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,mBAAmB,GACpB,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./qa/QaTechStack.js";
|
|
|
8
8
|
export * from "./metadata/CommandMetadata.js";
|
|
9
9
|
export * from "./llm/LocalRunnerConfig.js";
|
|
10
10
|
export * from "./llm/GenerativeOperation.js";
|
|
11
|
+
export * from "./llm/CodexReasoningEffort.js";
|
|
11
12
|
export * from "./mswarm/GenericJobContract.js";
|
|
12
13
|
export * from "./mswarm/CapabilityContract.js";
|
|
13
14
|
export * from "./mswarm/ArtifactSandboxContract.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning efforts codex-cli accepts for `model_reasoning_effort`.
|
|
3
|
+
*
|
|
4
|
+
* Ordered weakest to strongest. The order is load-bearing: callers that need to
|
|
5
|
+
* cap an effort at a model's ceiling compare ranks rather than enumerate the
|
|
6
|
+
* values above it.
|
|
7
|
+
*
|
|
8
|
+
* This mirrors codex-cli's own ReasoningEffort enum
|
|
9
|
+
* (Minimal|Low|Medium|High|XHigh|Max|Ultra). Verified against codex-cli 0.147.0:
|
|
10
|
+
* `codex exec -m gpt-5.6-sol -c model_reasoning_effort=ultra` reports
|
|
11
|
+
* `reasoning effort: ultra` in the session header and completes normally, and
|
|
12
|
+
* a value outside the enum is rejected upstream with
|
|
13
|
+
* "[reasoning.effort] [invalid_enum_value]".
|
|
14
|
+
*/
|
|
15
|
+
export declare const CODEX_REASONING_EFFORTS: readonly ["minimal", "low", "medium", "high", "xhigh", "max", "ultra"];
|
|
16
|
+
export type CodexReasoningEffort = (typeof CODEX_REASONING_EFFORTS)[number];
|
|
17
|
+
export declare const isCodexReasoningEffort: (value: string) => value is CodexReasoningEffort;
|
|
18
|
+
/** Returns the canonical effort, or undefined when the value is not one codex accepts. */
|
|
19
|
+
export declare const normalizeCodexReasoningEffort: (raw: string | undefined) => CodexReasoningEffort | undefined;
|
|
20
|
+
/** Position in CODEX_REASONING_EFFORTS; higher means more reasoning. */
|
|
21
|
+
export declare const codexReasoningEffortRank: (effort: CodexReasoningEffort) => number;
|
|
22
|
+
//# sourceMappingURL=CodexReasoningEffort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodexReasoningEffort.d.ts","sourceRoot":"","sources":["../../src/llm/CodexReasoningEffort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,wEAQ1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,KAAG,KAAK,IAAI,oBACA,CAAC;AAEjE,0FAA0F;AAC1F,eAAO,MAAM,6BAA6B,GACxC,KAAK,MAAM,GAAG,SAAS,KACtB,oBAAoB,GAAG,SAKzB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,QAAQ,oBAAoB,KAAG,MAC/B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning efforts codex-cli accepts for `model_reasoning_effort`.
|
|
3
|
+
*
|
|
4
|
+
* Ordered weakest to strongest. The order is load-bearing: callers that need to
|
|
5
|
+
* cap an effort at a model's ceiling compare ranks rather than enumerate the
|
|
6
|
+
* values above it.
|
|
7
|
+
*
|
|
8
|
+
* This mirrors codex-cli's own ReasoningEffort enum
|
|
9
|
+
* (Minimal|Low|Medium|High|XHigh|Max|Ultra). Verified against codex-cli 0.147.0:
|
|
10
|
+
* `codex exec -m gpt-5.6-sol -c model_reasoning_effort=ultra` reports
|
|
11
|
+
* `reasoning effort: ultra` in the session header and completes normally, and
|
|
12
|
+
* a value outside the enum is rejected upstream with
|
|
13
|
+
* "[reasoning.effort] [invalid_enum_value]".
|
|
14
|
+
*/
|
|
15
|
+
export const CODEX_REASONING_EFFORTS = [
|
|
16
|
+
"minimal",
|
|
17
|
+
"low",
|
|
18
|
+
"medium",
|
|
19
|
+
"high",
|
|
20
|
+
"xhigh",
|
|
21
|
+
"max",
|
|
22
|
+
"ultra",
|
|
23
|
+
];
|
|
24
|
+
export const isCodexReasoningEffort = (value) => CODEX_REASONING_EFFORTS.includes(value);
|
|
25
|
+
/** Returns the canonical effort, or undefined when the value is not one codex accepts. */
|
|
26
|
+
export const normalizeCodexReasoningEffort = (raw) => {
|
|
27
|
+
if (typeof raw !== "string")
|
|
28
|
+
return undefined;
|
|
29
|
+
const normalized = raw.trim().toLowerCase();
|
|
30
|
+
if (!normalized)
|
|
31
|
+
return undefined;
|
|
32
|
+
return isCodexReasoningEffort(normalized) ? normalized : undefined;
|
|
33
|
+
};
|
|
34
|
+
/** Position in CODEX_REASONING_EFFORTS; higher means more reasoning. */
|
|
35
|
+
export const codexReasoningEffortRank = (effort) => CODEX_REASONING_EFFORTS.indexOf(effort);
|