@theokit/agents 12.0.0 → 12.1.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/CHANGELOG.md +27 -0
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +3 -1
- package/dist/tools.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @theokit/agents
|
|
2
2
|
|
|
3
|
+
## 12.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0f88b0e: `@theokit/agents/tools` now forwards the image tool, and the `@theokit/sdk-tools` floor moves to
|
|
8
|
+
`^0.27.1` to make that possible.
|
|
9
|
+
|
|
10
|
+
Three symbols reach the layer for the first time: `createViewImageTool`, `CreateViewImageToolOptions`
|
|
11
|
+
and `DEFAULT_MAX_IMAGE_BYTES`. `view_image` lets an agent LOOK at an image in the project — read the
|
|
12
|
+
bytes, confine the path, and hand the model an image block rather than a base64 blob it cannot see.
|
|
13
|
+
|
|
14
|
+
This is a gap closing rather than a feature arriving. `tools-entry.ts` states that the surface is
|
|
15
|
+
preserved WHOLE and that any deliberately withheld symbol carries its reason in writing; these three
|
|
16
|
+
were absent with no reason, because the pinned `^0.26.1` did not publish them. The layer was not
|
|
17
|
+
withholding anything — its dependency was short. The cost was measurable: `view_image` was the only
|
|
18
|
+
tool a consumer had to write by hand, in a registry where the other nine were built-ins, and an image
|
|
19
|
+
reader that honours any path is a file-exfiltration primitive with a friendly name — exactly the code
|
|
20
|
+
that should not be rewritten per product.
|
|
21
|
+
|
|
22
|
+
`tests/unit/tools-view-image-parity.test.ts` had been skipping loudly for this reason and turned
|
|
23
|
+
itself back on the moment the floor moved. Its two behavioural assertions were rewritten to observe
|
|
24
|
+
`handler` rather than `toModelOutput`: `Tool.create` consumes the shaping it is given, so the
|
|
25
|
+
returned tool carries `name`, `description`, `inputSchema` and `handler` and nothing else — which the
|
|
26
|
+
source states in its own header. The behaviour they pin is unchanged and now actually measured: a
|
|
27
|
+
readable image reaches the model as exactly ONE image block with no leading text, and a failed read
|
|
28
|
+
stays a text envelope so the model can read the error and retry.
|
|
29
|
+
|
|
3
30
|
## 12.0.0
|
|
4
31
|
|
|
5
32
|
### Major Changes
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CatastrophicCommandError, CommandPolicy, ContextMatchError, ContextMatchReason, CreateApplyPatchToolOptions, CreateBraveWebSearchAdapterOptions, CreateCurrentTimeToolOptions, CreateEditFileToolOptions, CreateGenericHttpSearchAdapterOptions, CreateGitDiffToolOptions, CreateGitStatusToolOptions, CreateGlobToolOptions, CreateInteractiveShellToolOptions, CreateListDirToolOptions, CreateReadFileToolOptions, CreateRunVitestToolOptions, CreateSearchTextToolOptions, CreateShellToolOptions, CreateWebFetchToolOptions, CreateWebSearchToolOptions, CreateWriteFileToolOptions, DEFAULT_TOOL_GUIDANCE, EnvContextOptions, PlanModeTool, PlanModeToolOptions, PlanModeToolWithStore, PlanNode, QuestionTool, QuestionToolOptions, ReadTracker, ReasoningTools, RedirectBlockedError, RepoMapOptions, ResolveAndScreenOptions, ScreenedFetchOptions, SessionArtifactStore, SessionArtifactStoreOptions, SsrfBlockedError, TodoItem, TodolistTool, ToolGuidanceMap, TruncationMode, TruncationOptions, TruncationResult, VitestSummary, WebSearchCallback, WebSearchResult, buildEnvContext, buildRepoMap, catastrophicShellReason, commandDenialReason, createApplyPatchTool, createBraveWebSearchAdapter, createCurrentTimeTool, createEditFileTool, createGenericHttpSearchAdapter, createGitDiffTool, createGitStatusTool, createGlobTool, createInteractiveShellTool, createListDirTool, createPlanModeTool, createQuestionTool, createReadFileTool, createRunVitestTool, createSearchTextTool, createSessionArtifactStore, createShellTool, createTodolistTool, createUpdatePlanTool, createWebFetchTool, createWebSearchTool, createWriteFileTool, createWriteStdinTool, denyCatastrophicCommands, formatCode, formatDiff, formatError, formatFileList, injectGuidance, isBlockedIp, isCommandAllowed, renderToolList, replaceUnique, resolveAndScreen, screenedFetch, todoItemsToPlanNodes, truncateOutput, withDefaultGuidance, withDescription, withName, withShellExitGuidance, withToolResultGuidance } from '@theokit/sdk-tools';
|
|
1
|
+
export { CatastrophicCommandError, CommandPolicy, ContextMatchError, ContextMatchReason, CreateApplyPatchToolOptions, CreateBraveWebSearchAdapterOptions, CreateCurrentTimeToolOptions, CreateEditFileToolOptions, CreateGenericHttpSearchAdapterOptions, CreateGitDiffToolOptions, CreateGitStatusToolOptions, CreateGlobToolOptions, CreateInteractiveShellToolOptions, CreateListDirToolOptions, CreateReadFileToolOptions, CreateRunVitestToolOptions, CreateSearchTextToolOptions, CreateShellToolOptions, CreateViewImageToolOptions, CreateWebFetchToolOptions, CreateWebSearchToolOptions, CreateWriteFileToolOptions, DEFAULT_MAX_IMAGE_BYTES, DEFAULT_TOOL_GUIDANCE, EnvContextOptions, PlanModeTool, PlanModeToolOptions, PlanModeToolWithStore, PlanNode, QuestionTool, QuestionToolOptions, ReadTracker, ReasoningTools, RedirectBlockedError, RepoMapOptions, ResolveAndScreenOptions, ScreenedFetchOptions, SessionArtifactStore, SessionArtifactStoreOptions, SsrfBlockedError, TodoItem, TodolistTool, ToolGuidanceMap, TruncationMode, TruncationOptions, TruncationResult, VitestSummary, WebSearchCallback, WebSearchResult, buildEnvContext, buildRepoMap, catastrophicShellReason, commandDenialReason, createApplyPatchTool, createBraveWebSearchAdapter, createCurrentTimeTool, createEditFileTool, createGenericHttpSearchAdapter, createGitDiffTool, createGitStatusTool, createGlobTool, createInteractiveShellTool, createListDirTool, createPlanModeTool, createQuestionTool, createReadFileTool, createRunVitestTool, createSearchTextTool, createSessionArtifactStore, createShellTool, createTodolistTool, createUpdatePlanTool, createViewImageTool, createWebFetchTool, createWebSearchTool, createWriteFileTool, createWriteStdinTool, denyCatastrophicCommands, formatCode, formatDiff, formatError, formatFileList, injectGuidance, isBlockedIp, isCommandAllowed, renderToolList, replaceUnique, resolveAndScreen, screenedFetch, todoItemsToPlanNodes, truncateOutput, withDefaultGuidance, withDescription, withName, withShellExitGuidance, withToolResultGuidance } from '@theokit/sdk-tools';
|
|
2
2
|
import * as _theokit_sdk from '@theokit/sdk';
|
|
3
3
|
import { TheokitAgentError } from '@theokit/sdk/errors';
|
|
4
4
|
import { D as DelegationTarget, a as DelegateOptions } from './delegation-scoring-CQtF2Zaf.js';
|
package/dist/tools.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-Z4QWC7IK.js";
|
|
14
14
|
|
|
15
15
|
// src/tools-entry.ts
|
|
16
|
-
import { buildEnvContext, buildRepoMap, CatastrophicCommandError, catastrophicShellReason, commandDenialReason, ContextMatchError, createApplyPatchTool, createBraveWebSearchAdapter, createCurrentTimeTool, createEditFileTool, createGenericHttpSearchAdapter, createGitDiffTool, createGitStatusTool, createGlobTool, createInteractiveShellTool, createListDirTool, createPlanModeTool, createQuestionTool, createReadFileTool, createRunVitestTool, createSearchTextTool, createSessionArtifactStore, createShellTool, createTodolistTool, createUpdatePlanTool, createWebFetchTool, createWebSearchTool, createWriteFileTool, createWriteStdinTool, DEFAULT_TOOL_GUIDANCE, denyCatastrophicCommands, formatCode, formatDiff, formatError, formatFileList, injectGuidance, isBlockedIp, isCommandAllowed, ReadTracker, ReasoningTools, RedirectBlockedError, renderToolList, replaceUnique, resolveAndScreen, screenedFetch, SsrfBlockedError, todoItemsToPlanNodes, truncateOutput, withDefaultGuidance, withDescription, withName, withShellExitGuidance, withToolResultGuidance } from "@theokit/sdk-tools";
|
|
16
|
+
import { buildEnvContext, buildRepoMap, CatastrophicCommandError, catastrophicShellReason, commandDenialReason, ContextMatchError, createApplyPatchTool, createBraveWebSearchAdapter, createCurrentTimeTool, createEditFileTool, createGenericHttpSearchAdapter, createGitDiffTool, createGitStatusTool, createGlobTool, createInteractiveShellTool, createListDirTool, createPlanModeTool, createQuestionTool, createReadFileTool, createRunVitestTool, createSearchTextTool, createSessionArtifactStore, createShellTool, createTodolistTool, createUpdatePlanTool, createViewImageTool, createWebFetchTool, createWebSearchTool, createWriteFileTool, createWriteStdinTool, DEFAULT_MAX_IMAGE_BYTES, DEFAULT_TOOL_GUIDANCE, denyCatastrophicCommands, formatCode, formatDiff, formatError, formatFileList, injectGuidance, isBlockedIp, isCommandAllowed, ReadTracker, ReasoningTools, RedirectBlockedError, renderToolList, replaceUnique, resolveAndScreen, screenedFetch, SsrfBlockedError, todoItemsToPlanNodes, truncateOutput, withDefaultGuidance, withDescription, withName, withShellExitGuidance, withToolResultGuidance } from "@theokit/sdk-tools";
|
|
17
17
|
|
|
18
18
|
// src/tools/delegate-tool.ts
|
|
19
19
|
import { Tool } from "@theokit/sdk";
|
|
@@ -103,6 +103,7 @@ __name(createDelegateTool, "createDelegateTool");
|
|
|
103
103
|
export {
|
|
104
104
|
CatastrophicCommandError,
|
|
105
105
|
ContextMatchError,
|
|
106
|
+
DEFAULT_MAX_IMAGE_BYTES,
|
|
106
107
|
DEFAULT_TOOL_GUIDANCE,
|
|
107
108
|
DelegateToolConfigError,
|
|
108
109
|
ReadTracker,
|
|
@@ -133,6 +134,7 @@ export {
|
|
|
133
134
|
createShellTool,
|
|
134
135
|
createTodolistTool,
|
|
135
136
|
createUpdatePlanTool,
|
|
137
|
+
createViewImageTool,
|
|
136
138
|
createWebFetchTool,
|
|
137
139
|
createWebSearchTool,
|
|
138
140
|
createWriteFileTool,
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tools-entry.ts","../src/tools/delegate-tool.ts"],"mappings":";;;;;;;;;;;;;;;AAuBA,SACEA,iBACAC,cACAC,0BACAC,yBACAC,qBACAC,mBACAC,sBACAC,6BACAC,uBACAC,oBACAC,gCACAC,mBACAC,qBACAC,gBACAC,4BACAC,mBACAC,oBACAC,oBACAC,oBACAC,qBACAC,sBACAC,4BACAC,iBACAC,oBACAC,sBACAC,oBACAC,qBACAC,qBACAC,sBACAC,uBACAC,0BACAC,YACAC,YACAC,aACAC,gBACAC,gBACAC,aACAC,kBACAC,aACAC,gBACAC,sBACAC,gBACAC,eACAC,kBACAC,eACAC,kBACAC,sBACAC,gBACAC,qBACAC,iBACAC,UACAC,uBACAC,8BACK;;;
|
|
1
|
+
{"version":3,"sources":["../src/tools-entry.ts","../src/tools/delegate-tool.ts"],"mappings":";;;;;;;;;;;;;;;AAuBA,SACEA,iBACAC,cACAC,0BACAC,yBACAC,qBACAC,mBACAC,sBACAC,6BACAC,uBACAC,oBACAC,gCACAC,mBACAC,qBACAC,gBACAC,4BACAC,mBACAC,oBACAC,oBACAC,oBACAC,qBACAC,sBACAC,4BACAC,iBACAC,oBACAC,sBACAC,qBACAC,oBACAC,qBACAC,qBACAC,sBACAC,yBACAC,uBACAC,0BACAC,YACAC,YACAC,aACAC,gBACAC,gBACAC,aACAC,kBACAC,aACAC,gBACAC,sBACAC,gBACAC,eACAC,kBACAC,eACAC,kBACAC,sBACAC,gBACAC,qBACAC,iBACAC,UACAC,uBACAC,8BACK;;;AC7DP,SAASC,YAAY;AACrB,SAASC,yBAAyB;AAClC,SAASC,SAAS;AAmBX,IAAMC,0BAAN,cAAsCC,kBAAAA;EAvC7C,OAuC6CA;;;;EACzBC,OAAO;EAEzB,YACEC,SACSC,MACT;AACA,UAAMD,OAAAA,GAAAA,KAFGC,OAAAA;EAGX;AACF;AAwBA,SAASC,mBACPC,QACAC,UAAqC;AAErC,MAAID,OAAOE,WAAW,GAAG;AACvB,UAAM,IAAIR,wBACR,6HACA,cAAA;EAEJ;AAEA,QAAMS,OAAO,oBAAIC,IAAAA;AACjB,aAAW,EAAER,KAAI,KAAMI,QAAQ;AAC7B,QAAIG,KAAKE,IAAIT,IAAAA,GAAO;AAGlB,YAAM,IAAIF,wBACR,6CAA6CY,KAAKC,UAAUX,IAAAA,CAAAA,qDAC5D,gBAAA;IAEJ;AACAO,SAAKK,IAAIZ,IAAAA;EACX;AAEA,QAAM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IAAInB,wBACR,2BAA2BY,KAAKC,UAAU0B,KAAAA,CAAAA,4BAA6BZ,eAAerB,MAAAA,CAAAA,KACtF,eAAA;MAEJ;AAEA,UAAI;AACF,cAAM6C,SAA2BjC,OAAOC,MAAAA,IACpC,MAAMA,OAAOiC,IAAIV,IAAAA,IACjB,MAAMW,SAASlC,QAAQuB,MAAMnC,YAAY,CAAC,CAAA;AAE9C,eAAOK,KAAKC,UAAU;UAAEyC,IAAI;UAAMC,UAAUJ,OAAOI;QAAS,CAAA;MAC9D,SAASjC,OAAO;AACd,cAAMlB,OAAOiB,YAAYC,KAAAA;AACzB,YAAIlB,SAASsB,QAAW;AAGtB,gBAAMJ;QACR;AAIA,eAAOV,KAAKC,UAAU;UACpByC,IAAI;UACJhC,OAAOlB;UACPD,SAASmB,iBAAiBkC,QAAQlC,MAAMnB,UAAUsD,OAAOnC,KAAAA;QAC3D,CAAA;MACF;IACF,GA7CS;EA8CX,CAAA;AACF;AA5EgBQ;","names":["buildEnvContext","buildRepoMap","CatastrophicCommandError","catastrophicShellReason","commandDenialReason","ContextMatchError","createApplyPatchTool","createBraveWebSearchAdapter","createCurrentTimeTool","createEditFileTool","createGenericHttpSearchAdapter","createGitDiffTool","createGitStatusTool","createGlobTool","createInteractiveShellTool","createListDirTool","createPlanModeTool","createQuestionTool","createReadFileTool","createRunVitestTool","createSearchTextTool","createSessionArtifactStore","createShellTool","createTodolistTool","createUpdatePlanTool","createViewImageTool","createWebFetchTool","createWebSearchTool","createWriteFileTool","createWriteStdinTool","DEFAULT_MAX_IMAGE_BYTES","DEFAULT_TOOL_GUIDANCE","denyCatastrophicCommands","formatCode","formatDiff","formatError","formatFileList","injectGuidance","isBlockedIp","isCommandAllowed","ReadTracker","ReasoningTools","RedirectBlockedError","renderToolList","replaceUnique","resolveAndScreen","screenedFetch","SsrfBlockedError","todoItemsToPlanNodes","truncateOutput","withDefaultGuidance","withDescription","withName","withShellExitGuidance","withToolResultGuidance","Tool","TheokitAgentError","z","DelegateToolConfigError","TheokitAgentError","name","message","code","assertUsableRoster","roster","defaults","length","seen","Set","has","JSON","stringify","add","needsCredential","some","entry","isPort","target","apiKey","errorCodeOf","error","DelegationBudgetExceededError","DelegationTimeoutError","DelegationError","undefined","describeRoster","map","join","createDelegateTool","options","description","byName","Map","names","inputSchema","z","object","agent","enum","describe","task","string","min","Tool","create","handler","raw","parse","get","result","run","delegate","ok","response","Error","String"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theokit/agents",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"description": "AI agents as first-class citizens of the TheoKit pipeline. The AgentBuilder.create() authoring chain compiles to the @theokit/sdk runtime.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@theokit/sdk": "^4.52.1",
|
|
130
|
-
"@theokit/sdk-tools": "^0.
|
|
130
|
+
"@theokit/sdk-tools": "^0.27.1",
|
|
131
131
|
"@theokit/presenter": "0.8.0"
|
|
132
132
|
},
|
|
133
133
|
"publishConfig": {
|