@theokit/agents 0.25.1 → 0.27.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.
- package/LICENSE +201 -0
- package/dist/{bridge-entry-DfwOnvUB.d.ts → bridge-entry-QmUEnkn7.d.ts} +61 -3
- package/dist/bridge.d.ts +3 -2
- package/dist/bridge.js +5 -1
- package/dist/{chunk-FP7VPNFW.js → chunk-QR5PFBYT.js} +81 -4
- package/dist/chunk-QR5PFBYT.js.map +1 -0
- package/dist/decorators.d.ts +2 -2
- package/dist/index.d.ts +13 -4
- package/dist/index.js +5 -1
- package/dist/{skills-CLymniNy.d.ts → skills-FcUdNDbn.d.ts} +11 -0
- package/package.json +16 -11
- package/dist/chunk-FP7VPNFW.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
isApprovalRequired,
|
|
56
56
|
isDone,
|
|
57
57
|
isError,
|
|
58
|
+
isPartialToolCall,
|
|
58
59
|
isTextDelta,
|
|
59
60
|
isToolCall,
|
|
60
61
|
isToolResult,
|
|
@@ -68,9 +69,10 @@ import {
|
|
|
68
69
|
streamAgentResponse,
|
|
69
70
|
tokenBudgetCompactionStrategy,
|
|
70
71
|
translateSdkEvent,
|
|
72
|
+
translateToUIMessageStream,
|
|
71
73
|
validateUniqueRoutes,
|
|
72
74
|
walkAgentMetadata
|
|
73
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-QR5PFBYT.js";
|
|
74
76
|
import {
|
|
75
77
|
Agent,
|
|
76
78
|
Audit,
|
|
@@ -181,6 +183,7 @@ export {
|
|
|
181
183
|
isCommandAllowed,
|
|
182
184
|
isDone,
|
|
183
185
|
isError,
|
|
186
|
+
isPartialToolCall,
|
|
184
187
|
isPathAllowed,
|
|
185
188
|
isTextDelta,
|
|
186
189
|
isToolCall,
|
|
@@ -196,6 +199,7 @@ export {
|
|
|
196
199
|
streamAgentResponse,
|
|
197
200
|
tokenBudgetCompactionStrategy,
|
|
198
201
|
translateSdkEvent,
|
|
202
|
+
translateToUIMessageStream,
|
|
199
203
|
validateUniqueRoutes,
|
|
200
204
|
walkAgentMetadata
|
|
201
205
|
};
|
|
@@ -31,6 +31,17 @@ interface AgentOptions {
|
|
|
31
31
|
* `<function=` in answer/code text. Sibling of {@link parseThinkTags}.
|
|
32
32
|
*/
|
|
33
33
|
stripToolDialect?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Opt-in (default false): recover a leaked Hermes `<function=…></tool_call>` tool-call dialect so the
|
|
36
|
+
* call actually EXECUTES (theokit#58 follow-up). Where {@link stripToolDialect} only hides the leaked
|
|
37
|
+
* block from the visible text, this enables the SDK's `extractToolCallsFromContent` on the chat route,
|
|
38
|
+
* so a `chat_completions` finish with ZERO native `tool_calls` has its text scanned for the dialect and
|
|
39
|
+
* any recovered calls are dispatched by the loop. For models (qwen/qwen3-coder via OpenRouter) that
|
|
40
|
+
* leak tool calls as text. Off by default (a code assistant may print a literal `<function=`); fail-open.
|
|
41
|
+
* Has effect only when {@link AgentOptions} routes a provider via `providers.routes`. Sibling of
|
|
42
|
+
* {@link stripToolDialect} — typically enabled together.
|
|
43
|
+
*/
|
|
44
|
+
recoverLeakedToolCalls?: boolean;
|
|
34
45
|
/** Enable SSE streaming (default: true). */
|
|
35
46
|
stream?: boolean;
|
|
36
47
|
/** Maximum loop iterations before forcing a terminal response. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theokit/agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Unified decorator runtime — AI agents as first-class citizens of the TheoKit pipeline. @Agent() compiles to SDK Agent.create(), @Tool() compiles to defineTool().",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,34 +29,39 @@
|
|
|
29
29
|
"README.md",
|
|
30
30
|
"LICENSE"
|
|
31
31
|
],
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "tsup",
|
|
34
|
-
"test": "vitest run",
|
|
35
|
-
"test:watch": "vitest"
|
|
36
|
-
},
|
|
37
32
|
"peerDependencies": {
|
|
38
33
|
"@theokit/http": ">=0.1.0-alpha.0",
|
|
39
|
-
"@theokit/sdk": ">=2.
|
|
34
|
+
"@theokit/sdk": ">=2.13.0",
|
|
40
35
|
"@theokit/sdk-tools": ">=0.2.0",
|
|
36
|
+
"ai": ">=7.0.0",
|
|
41
37
|
"reflect-metadata": ">=0.2.0",
|
|
42
38
|
"zod": "^4.0.0"
|
|
43
39
|
},
|
|
44
40
|
"peerDependenciesMeta": {
|
|
45
41
|
"@theokit/sdk-tools": {
|
|
46
42
|
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"ai": {
|
|
45
|
+
"optional": true
|
|
47
46
|
}
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@theokit/
|
|
51
|
-
"@theokit/sdk": "^2.11.2",
|
|
49
|
+
"@theokit/sdk": "^2.13.0",
|
|
52
50
|
"@theokit/sdk-tools": "^0.2.0",
|
|
51
|
+
"ai": "^7.0.14",
|
|
53
52
|
"reflect-metadata": "^0.2.2",
|
|
54
53
|
"tsup": "^8.5.1",
|
|
55
54
|
"typescript": "^5.9.3",
|
|
56
55
|
"vitest": "^3.2.6",
|
|
57
|
-
"zod": "^4.4.3"
|
|
56
|
+
"zod": "^4.4.3",
|
|
57
|
+
"@theokit/http": "0.5.4"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=22.12.0"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsup",
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"test:watch": "vitest"
|
|
61
66
|
}
|
|
62
|
-
}
|
|
67
|
+
}
|