Persistent, authorization-gated approval inspection and decisions.readonlyapprovals:HarnessApprovalLedger
inspect()
inspect(Parametersid):Promise<HarnessApproval>
Returns
Promise<HarnessApproval>
grant()
grant(Parametersid):Promise<HarnessApproval>
Returns
Promise<HarnessApproval>
deny()
deny(Parametersid):Promise<HarnessApproval>
Returns
Promise<HarnessApproval>
Required Actions
Each decision is checked against the authorization port, which must allow one action. Without the port, every decision fails closed.HarnessApproval
Properties argumentsauthorizationreadonlyarguments:JSONValue
createdAtreadonlyauthorization:AgentHarnessAuthorizationIdentity
expiresAtreadonlycreatedAt:number
idreadonlyexpiresAt:number
requiredActionreadonlyid:string
runIdreadonlyrequiredAction:string
statusreadonlyrunId:string
toolCallIdreadonlystatus:"pending"|"granted"|"denied"|"expired"|"consumed"
toolNamereadonlytoolCallId:string
updatedAtreadonlytoolName:string
readonlyupdatedAt:number
HarnessApprovalStatus
HarnessApprovalStatus = typeofHARNESS_APPROVAL_STATUSES[number]
HARNESS_APPROVAL_STATUSES
constHARNESS_APPROVAL_STATUSES: readonly ["pending","granted","denied","expired","consumed"]
HarnessAuthorizationError
Constructors Constructornew HarnessAuthorizationError(Parameterscode):HarnessAuthorizationError
Returns
HarnessAuthorizationError
Properties
cause?
codeoptionalcause?:unknown
messagereadonlycode:"identity_unavailable"|"unauthenticated"|"forbidden"|"policy_unavailable"
message: string
name
name: string
stack?
stackTraceLimitoptionalstack?:string
ThestaticstackTraceLimit:number
Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.
Methods
captureStackTrace()
Creates astaticcaptureStackTrace(targetObject,constructorOpt?):void
.stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
Returns
void
prepareStackTrace()
ParametersstaticprepareStackTrace(err,stackTraces):any
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
HarnessApprovalError
Constructors Constructornew HarnessApprovalError(Parameterscode):HarnessApprovalError
Returns
HarnessApprovalError
Properties
cause?
codeoptionalcause?:unknown
messagereadonlycode:"expired"|"replayed"|"conflicting"|"consumed"|"missing"
message: string
name
name: string
stack?
stackTraceLimitoptionalstack?:string
ThestaticstackTraceLimit:number
Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.
Methods
captureStackTrace()
Creates astaticcaptureStackTrace(targetObject,constructorOpt?):void
.stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
Returns
void
prepareStackTrace()
ParametersstaticprepareStackTrace(err,stackTraces):any
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces