toolmark-monorepo / @toolmark/core / FormToolOptions
Interface: FormToolOptions<V>
Defined in: packages/core/src/forms/types.ts:67
Options for createFormTools.
Type Parameters
V
V
Properties
description
description:
string
Defined in: packages/core/src/forms/types.ts:71
LLM-facing description of the form.
files?
optionalfiles?:Record<string,FileFieldSpec>
Defined in: packages/core/src/forms/types.ts:111
File fields (spec §8.4, D27). Keys are dot paths; [] stands for any array index (attachments[].file). The agent fills them with a FileRef ({ ref } / { url }, an array of them when multiple); each is resolved through the registry's files options, checked against the field limits (narrowed by files.maxBytes), and the resolved File (File[]) is written through adapter.setValues. Any failure refuses the whole fill file_rejected with nothing set. changes report files as { file: { name, size, type } }. The form's JSON Schema is derived with unrepresentable: 'any' (so z.instanceof(File) converts) and each file path is advertised as fileFieldSchema(spec). An invalid spec is files_misconfigured (dev throw; production: event, no tools registered).
input
input:
StandardSchemaV1<unknown,V>
Defined in: packages/core/src/forms/types.ts:75
Schema of the full form values.
jsonSchema?
optionaljsonSchema?:JsonSchema
Defined in: packages/core/src/forms/types.ts:77
JSON Schema override for the form values.
name
name:
string
Defined in: packages/core/src/forms/types.ts:69
Tool name prefix: registers <name>.fill and <name>.submit.
options?
optionaloptions?:Record<string,OptionsProvider>
Defined in: packages/core/src/forms/types.ts:99
Async option lookups by field (spec §8.3). Keys are dot paths; [] stands for any array index (sponsors[].memberId). When non-empty, <name>.options({ field, query? }) is registered (readOnly, untrustedContent) and the fill schema tells the agent to use it.
sensitive?
optionalsensitive?:string[]
Defined in: packages/core/src/forms/types.ts:93
Dot paths whose values are always redacted (spec §14): in fill changes, confirmation payloads and state(). Together with FieldInfo.sensitive and password / cc-* elements it forms the tools' sensitivePaths (tm.info(name).sensitivePaths). [] stands for any array index (cards[].cvc); such a pattern is published as given plus its current concrete paths (cards.0.cvc, …). A field seen sensitive by its element stays sensitive for the tools' lifetime (a "show password" toggle never exposes it), but a field is only known to be sensitive once an element has reported it: adapters without elements (e.g. rhfAdapter without root/elementFor) need their secret paths declared here.
Issue messages in state() are not redacted: schemas must not echo sensitive values in their messages.
submitSummary?
optionalsubmitSummary?: (values) =>string
Defined in: packages/core/src/forms/types.ts:79
User-facing submit confirmation summary.
Parameters
values
V
Returns
string
title?
optionaltitle?:string
Defined in: packages/core/src/forms/types.ts:73
User-facing title (used in the submit confirmation summary).