Skip to main content

StandardToolsConfig

@forge/monorepo


@forge/monorepo / backend/src / StandardToolsConfig

Type Alias: StandardToolsConfig

StandardToolsConfig = object

Defined in: backend/src/tools/library/index.ts:91

Properties

clock?

readonly optional clock?: () => Date

Defined in: backend/src/tools/library/index.ts:142

Injected so a test can pin now.

Returns

Date


deps

readonly deps: DelegatingToolDeps

Defined in: backend/src/tools/library/index.ts:93

Authorisation, the approval gate, idempotency and the shadow recorder.


documents?

readonly optional documents?: ExtractionService

Defined in: backend/src/tools/library/index.ts:119

Enables read_document.


exclude?

readonly optional exclude?: readonly StandardToolName[]

Defined in: backend/src/tools/library/index.ts:143


files?

readonly optional files?: FileService

Defined in: backend/src/tools/library/index.ts:117

Enables read_attachment and, where the context has a conversation, list_attachments.


filesystem?

readonly optional filesystem?: FileScope | { reader: FileReader; writable: boolean; }

Defined in: backend/src/tools/library/index.ts:127

A path-scoped filesystem — REQ-047 (#206), task #215.

Supplying a root enables fs_read, fs_list and fs_search. fs_write needs a writableRoot as well, and it must be a different directory: pointing both at the same place lets a model edit the material it also reads, which is how a corpus a model cites becomes a corpus a model wrote.


http?

readonly optional http?: HttpClientConfig & object

Defined in: backend/src/tools/library/index.ts:100

Outbound HTTP. Supplying this enables fetch_url, fetch_json, http_request and http_write.

Pass a client to share one with the rest of an application — the egress policy is then decided in exactly one place, which is the point of the type.

Type Declaration

client?

readonly optional client?: HttpClient


knowledge?

readonly optional knowledge?: object

Defined in: backend/src/tools/library/index.ts:111

authSubjects

readonly authSubjects: (context) => readonly string[] | Promise<readonly string[]>

Parameters
context

ExecutionContext

Returns

readonly string[] | Promise<readonly string[]>

mode?

readonly optional mode?: RetrievalMode

retriever

readonly retriever: KnowledgeRetriever


providerId?

readonly optional providerId?: string

Defined in: backend/src/tools/library/index.ts:144


sandbox?

readonly optional sandbox?: Sandbox

Defined in: backend/src/tools/library/index.ts:139

A sandbox, which is what makes shell_exec exist — task #215.

Two switches, deliberately, and the only tool in the library with two: a sandbox wired and the shell capability declared. Everywhere else wiring is the toggle, because a second switch is usually how a deployment ends up with something switched on and wired to nothing. Here the failure mode runs the other way — "somebody wired a sandbox for a test and forgot" must not silently mean the agent can run commands on a machine.

shellEnabled is a function, so the declaration is read at the call rather than captured at construction.


readonly optional search?: SearchProvider

Defined in: backend/src/tools/library/index.ts:102

A search provider. Without one there is no web_search at all, rather than one that always refuses.


shellEnabled?

readonly optional shellEnabled?: () => boolean

Defined in: backend/src/tools/library/index.ts:140

Returns

boolean


sql?

readonly optional sql?: object

Defined in: backend/src/tools/library/index.ts:110

A read-only database connection, and the schemas the model may see.

readOnly: true has to be typed out. Nothing here can make a connection read-only; the acknowledgement exists so that wiring a read-write one into a model-driven tool is a decision somebody made and a reviewer can see. schemas enables sql_schema; without it the model is guessing table names.

maxRows?

readonly optional maxRows?: number

query

readonly query: ReadOnlyQuery

readOnly

readonly readOnly: true

schemas?

readonly optional schemas?: readonly string[]