@beeos-ai/bma-dsh-adapter 0.2.0 → 0.2.2

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/lib/model.js CHANGED
@@ -196,6 +196,7 @@ export class ChatCompletionsAdapter extends LlmAdapter {
196
196
  messages,
197
197
  ...(request.tools?.length ? { tools: request.tools.map((t) => ({ type: "function", function: { name: t.name, description: t.description, parameters: t.parameters } })) } : {}),
198
198
  max_tokens: maxTokens,
199
+ ...(route.reasoningEffort ? { reasoning_effort: route.reasoningEffort } : {}),
199
200
  ...(request.temperature !== undefined ? { temperature: request.temperature } : {}),
200
201
  ...(request.stop?.length ? { stop: request.stop } : {}),
201
202
  }),
package/lib/spi.d.ts CHANGED
@@ -38,7 +38,18 @@ export interface ModelRoute {
38
38
  /** Session-scoped bearer token; the platform attributes every request carrying it to the session. */
39
39
  readonly token: string;
40
40
  readonly model: string;
41
+ /**
42
+ * Sent as the Chat Completions `reasoning_effort` (one of REASONING_EFFORTS); omitted: the
43
+ * model's own default. The host checks that the model takes the level; the adapter passes it as is.
44
+ */
45
+ readonly reasoningEffort?: ReasoningEffort;
41
46
  }
47
+ /**
48
+ * Reasoning effort levels, the union of OpenAI's `reasoning_effort` (none, minimal, low, medium,
49
+ * high, xhigh, max) and Claude Code's effort levels (low, medium, high, xhigh, max), lowest first.
50
+ */
51
+ export declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
52
+ export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
42
53
  export interface ModelUsage {
43
54
  readonly inputTokens: number;
44
55
  readonly outputTokens: number;
package/lib/spi.js CHANGED
@@ -7,6 +7,11 @@
7
7
  //
8
8
  // Shape follows duyet/oma HarnessInterface/HarnessRuntime/HarnessContext and
9
9
  // BMA H0 driver.Harness (ADR 0001/0004).
10
+ /**
11
+ * Reasoning effort levels, the union of OpenAI's `reasoning_effort` (none, minimal, low, medium,
12
+ * high, xhigh, max) and Claude Code's effort levels (low, medium, high, xhigh, max), lowest first.
13
+ */
14
+ export const REASONING_EFFORTS = ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
10
15
  export class TurnStopError extends Error {
11
16
  name = "TurnStopError";
12
17
  code;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beeos-ai/bma-dsh-adapter",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "BMA's shared DSH adapter: kernel assembly, platform-tools-only catalog gate, event translation, approval ids, JSONL resume, typed stop reasons, plus a conformance suite for hosts.",
5
5
  "keywords": [
6
6
  "dsh",