@theokit/sdk 3.5.0 → 3.6.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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Custom-tool assembly for the real local run (extracted from `real-local-run.ts`
3
+ * for the G8 LoC budget — SRP: everything that builds the effective tool catalog
4
+ * for a run lives here).
5
+ *
6
+ * Merges, in order: caller/agent `tools`, declarative subagent delegation tools
7
+ * (file-based + inline), plugin tools, and — SE37 — the internal `think` tool when
8
+ * `reasoning: true` (guarded against a native reasoning model). Binds parent
9
+ * credentials onto delegation tools and applies the personality whitelist.
10
+ *
11
+ * @internal
12
+ */
13
+ import type { AgentDefinition, AgentOptions, CustomTool, ModelSelection } from "../../../types/agent.js";
14
+ import type { CustomToolSpec } from "../../agent-loop/loop-types.js";
15
+ export declare function buildCustomToolsInput(agentOptions: AgentOptions, sendOptions: {
16
+ tools?: CustomTool[];
17
+ } | undefined, pluginManager: import("../../plugins/manager.js").PluginManager | undefined, personalityToolWhitelist: ReadonlyArray<string> | undefined, agentId: string, personalityName: string | undefined, subagents: Record<string, AgentDefinition> | undefined, effectiveModel: ModelSelection | undefined): {
18
+ customTools: ReadonlyArray<CustomToolSpec>;
19
+ } | Record<string, never>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * SE37 — `reasoning: true` support internals: the CoT preamble + the
3
+ * double-reasoning guard.
4
+ *
5
+ * A native reasoning model (configured with `model.params: [{ id: "thinking" }]`)
6
+ * already reasons internally, so layering the prompt-based `reasoning: true`
7
+ * preamble + think tool on top wastes tokens and can degrade output. When a
8
+ * native reasoning param is detected, `reasoning: true` is INERT (with a
9
+ * one-time warn) — native reasoning wins.
10
+ *
11
+ * @internal
12
+ */
13
+ import type { ModelSelection } from "../../../types/agent-prims.js";
14
+ /**
15
+ * The CoT preamble prepended to the system prompt when `reasoning: true` is
16
+ * active. Steers a non-reasoning model into a reason -> act -> observe loop and
17
+ * self-validation via the `think` tool. Kept terse (bundle budget).
18
+ */
19
+ export declare const REASONING_PREAMBLE: string;
20
+ /**
21
+ * True when the selected model is a native reasoning model — i.e. its `params`
22
+ * carry a thinking/reasoning id. A bare-string model or one without such a param
23
+ * is NOT native (returns false), so `reasoning: true` applies to it.
24
+ */
25
+ export declare function isNativeReasoning(model: ModelSelection | string | undefined): boolean;
@@ -425,6 +425,16 @@ export interface AgentOptions {
425
425
  * See {@link CustomTool}.
426
426
  */
427
427
  tools?: CustomTool[];
428
+ /**
429
+ * SE37 — opt-in reasoning. When `true`, the agent gets a chain-of-thought
430
+ * preamble prepended to its system prompt AND the `think` reasoning tool
431
+ * auto-attached, turning a non-reasoning model into a reason -> act ->
432
+ * observe loop (same model; reuses the existing tool loop). Default `false` —
433
+ * byte-identical behaviour when unset. Inert (with a one-time warn) when a
434
+ * native reasoning model is configured (`model.params: [{ id: "thinking" }]`),
435
+ * so native and prompt-based reasoning never stack. See `ReasoningTools` in `@theokit/sdk-tools`.
436
+ */
437
+ reasoning?: boolean;
428
438
  /**
429
439
  * Telemetry (OpenTelemetry) configuration. Default disabled. See
430
440
  * {@link TelemetrySettings} and ADR D34.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theokit/sdk",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "TypeScript SDK for the Theo agent harness — same surface, local or cloud.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/usetheo/theokit-sdk#readme",