ActionEntry.tool
property · packages/agent-native/src/actions.ts:33
readonly tool: {
readonly description: string
readonly parameters: NonNullable<ActionTool['parameters']>
}Agent / foldkit-agent-native
interface · packages/agent-native/src/actions.ts:32
interface ActionEntry {
readonly tool: {
readonly description: string
readonly parameters: NonNullable<ActionTool['parameters']>
}
readonly run: (
args: unknown,
context?: ActionRunContext,
) => Promise<ActionResult>
readonly schema: StandardSchemaV1<unknown, unknown> &
StandardJSONSchemaV1<unknown, unknown>
readonly http: {
readonly method: 'POST'
}
readonly requiresAuth: boolean
readonly readOnly: false
}One entry of the record registerPackageActions takes.
ActionEntry.toolproperty · packages/agent-native/src/actions.ts:33
readonly tool: {
readonly description: string
readonly parameters: NonNullable<ActionTool['parameters']>
}ActionEntry.runproperty · packages/agent-native/src/actions.ts:37
readonly run: (
args: unknown,
context?: ActionRunContext,
) => Promise<ActionResult>ActionEntry.schemaproperty · packages/agent-native/src/actions.ts:39
readonly schema: StandardSchemaV1<unknown, unknown> &
StandardJSONSchemaV1<unknown, unknown>Validates input and carries the JSON Schema its parameters are advertised from.
ActionEntry.httpproperty · packages/agent-native/src/actions.ts:40
readonly http: {
readonly method: 'POST'
}ActionEntry.requiresAuthproperty · packages/agent-native/src/actions.ts:42
readonly requiresAuth: booleanDefaults to true in the framework; stated so it is not left to a default.
ActionEntry.readOnlyproperty · packages/agent-native/src/actions.ts:51
readonly readOnly: falseAlways false. A capability dispatches a Message into update, so it is a
write however little it changes.
This feeds plan-mode classification, where the dangerous direction is claiming read-only: plan mode would then run it for real. A resource read would be the read-only case, and resources are not exposed as actions yet.