Call Signature
op<Defined in: src/op.ts:392T>(fn,options?):Op<T>
Type Parameters
T
T extends (…args) => any
Parameters
fn
T
options?
attributes?
Record<string, any>
Default attributes applied to every call this op creates. Integrations set
this to stamp attributes.integration provenance. Merged beneath kind/
color, which take precedence on key collision.
bindThis?
WeaveObject
callDisplayName?
(…args) => string
isDecorator?
boolean
name?
string
opColor?
string
Custom color for the operation in the UI
opKind?
string
The kind of operation (e.g., ‘llm’, ‘agent’, ‘tool’, ‘search’) for UI categorization
originalFunction?
T
parameterNames?
"useParam0Object" | string[]
shouldAdoptThis?
boolean
streamReducer?
{finalizeFn: (state) => void; initialStateFn: () => any; reduceFn: (state, chunk) => any; }
streamReducer.finalizeFn
(state) => void
streamReducer.initialStateFn
() =>any
streamReducer.reduceFn
(state, chunk) => any
summarize?
(result) => Record<string, any>
Returns
Op<T>
Call Signature
op<Defined in: src/op.ts:397T>(thisArg,fn,options?):Op<T>
Type Parameters
T
T extends (…args) => any
Parameters
thisArg
any
fn
T
options?
attributes?
Record<string, any>
Default attributes applied to every call this op creates. Integrations set
this to stamp attributes.integration provenance. Merged beneath kind/
color, which take precedence on key collision.
bindThis?
WeaveObject
callDisplayName?
(…args) => string
isDecorator?
boolean
name?
string
opColor?
string
Custom color for the operation in the UI
opKind?
string
The kind of operation (e.g., ‘llm’, ‘agent’, ‘tool’, ‘search’) for UI categorization
originalFunction?
T
parameterNames?
"useParam0Object" | string[]
shouldAdoptThis?
boolean
streamReducer?
{finalizeFn: (state) => void; initialStateFn: () => any; reduceFn: (state, chunk) => any; }
streamReducer.finalizeFn
(state) => void
streamReducer.initialStateFn
() =>any
streamReducer.reduceFn
(state, chunk) => any
summarize?
(result) => Record<string, any>
Returns
Op<T>
Call Signature
op(Defined in: src/op.ts:403target,propertyKey,descriptor):TypedPropertyDescriptor<any>
Parameters
target
object
propertyKey
string | symbol
descriptor
TypedPropertyDescriptor<any>
Returns
TypedPropertyDescriptor<any>
Call Signature
op<Defined in: src/op.ts:409T>(value,context):Op<T>
Type Parameters
T
T extends (…args) => any
Parameters
value
T
context
access?
{get: Function; has: boolean; }
access.get
access.has
class?
Function
kind
"method"
metadata?
any
name
string | symbol
private?
boolean
static?
boolean
addInitializer?
Returns
Op<T>
Call Signature
op(Defined in: src/op.ts:414options):MethodDecorator
Parameters
options
Partial<OpOptions<any>>
Returns
MethodDecorator