toolmark-monorepo / @toolmark/testing / CreateTestToolmarkOptions
Interface: CreateTestToolmarkOptions
Defined in: packages/testing/src/test-toolmark.ts:34
Options accepted by createTestToolmark.
Extends
Properties
abortGraceMs?
optionalabortGraceMs?:number
Defined in: packages/core/src/registry.ts:104
Grace period after abort before a call is abandoned, in ms (default 5000).
Inherited from
budget?
optionalbudget?:number
Defined in: packages/core/src/registry.ts:118
Visible-tool budget; exceeding it emits tool_budget_exceeded in dev (default 40).
Inherited from
callTimeoutMs?
optionalcallTimeoutMs?:number
Defined in: packages/core/src/registry.ts:116
Deadline in ms (default 120000) for every run that has no caller signal: a tm.call without signal, the run a Toolmark.confirmPending approval starts, and an Toolmark.undo restorer. When it passes, the run's ctx.signal aborts; a tool that still has not settled after abortGraceMs is abandoned with cancelled signal, which releases its scope queue (a later settle is dropped with a late_result event). Calls that pass a signal are bounded by it instead. Infinity disables the deadline. The deadline is paused while an inline ctx.confirm is open (that wait is bounded by confirmExpiryMs) and resumes with the time that was left once the confirmation settles, so an operator's answer never counts against the run.
Inherited from
confirm?
optionalconfirm?: (req) =>Promise<ConfirmOutcome>
Defined in: packages/core/src/registry.ts:88
Inline confirmation handler (used by inline-mode callers).
Parameters
req
Returns
Promise<ConfirmOutcome>
Inherited from
confirmExpiryMs?
optionalconfirmExpiryMs?:number
Defined in: packages/core/src/registry.ts:102
Pending/inline confirmation expiry in ms (default 600000).
Inherited from
ToolmarkOptions.confirmExpiryMs
confirmMode?
optionalconfirmMode?:object
Defined in: packages/core/src/registry.ts:90
Confirmation mode per caller; only inapp/test are configurable (default deferred).
inapp?
optionalinapp?:"deferred"|"inline"
mcp?
optionalmcp?:"inline"
test?
optionaltest?:"deferred"|"inline"
tour?
optionaltour?:"inline"
webmcp?
optionalwebmcp?:"inline"
Inherited from
dev?
optionaldev?:boolean
Defined in: packages/core/src/registry.ts:86
Development behaviour: misconfiguration throws instead of emitting error events.
Inherited from
files?
optionalfiles?:FilesOptions
Defined in: packages/core/src/registry.ts:123
File references (spec §8.4, D27): the { ref } resolver, URL origins (URL fetching is off unless allowOrigins is non-empty) and limits. Misconfiguration → files_misconfigured.
Inherited from
inline?
optionalinline?:"reject"|"approve"| ((req) =>Promise<ConfirmOutcome>)
Defined in: packages/testing/src/test-toolmark.ts:41
Scripts the installed inline confirmation handler for inline-mode callers (webmcp, mcp, tour, or inapp/test configured inline): 'approve' (default), 'reject', or a function given the full request. opts.confirm, when given, wins and runs instead (still recorded in .confirms).
jsonSchema?
optionaljsonSchema?:JsonSchemaConverter
Defined in: packages/core/src/registry.ts:100
Global JSON Schema converter for schemas without Standard JSON Schema.
Inherited from
onError?
optionalonError?: (e) =>void
Defined in: packages/core/src/registry.ts:125
Receives every error event (after events.on('error') listeners).
Parameters
e
Returns
void
Inherited from
policy?
optionalpolicy?:Partial<Record<"inapp"|"webmcp"|"mcp"|"test"|"tour",CallerPolicy>>
Defined in: packages/core/src/registry.ts:98
Per-caller policy (human is fixed).