HarnessSessionImpl
Generated by TypeDoc. Do not edit this page directly.
Class: HarnessSessionImpl
Section titled “Class: HarnessSessionImpl”Defined in: packages/core/src/session/session.ts:60
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HarnessSessionImpl(config, input): HarnessSessionImpl;Defined in: packages/core/src/session/session.ts:78
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
config | HarnessAppConfig |
input | { agent: AgentDefinition; restoredSession?: HarnessSessionSummary; sessionId?: string; } |
input.agent | AgentDefinition |
input.restoredSession? | HarnessSessionSummary |
input.sessionId? | string |
Returns
Section titled “Returns”HarnessSessionImpl
Properties
Section titled “Properties”| Property | Modifier | Type | Defined in |
|---|---|---|---|
id | readonly | string | packages/core/src/session/session.ts:61 |
snapshots | readonly | HarnessSnapshotSession | packages/core/src/session/session.ts:63 |
transcript | readonly | HarnessTranscriptSession | packages/core/src/session/session.ts:62 |
Methods
Section titled “Methods”approveTool()
Section titled “approveTool()”approveTool(approvalId): Promise<void>;Defined in: packages/core/src/session/session.ts:306
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
approvalId | string |
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”clearModelOverride()
Section titled “clearModelOverride()”clearModelOverride(): void;Defined in: packages/core/src/session/session.ts:265
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”HarnessSession.clearModelOverride
close()
Section titled “close()”close(): Promise<void>;Defined in: packages/core/src/session/session.ts:332
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”denyTool()
Section titled “denyTool()”denyTool(approvalId, _reason?): Promise<void>;Defined in: packages/core/src/session/session.ts:310
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
approvalId | string |
_reason? | string |
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”getAgentManifest()
Section titled “getAgentManifest()”getAgentManifest(): HarnessAgentManifest;Defined in: packages/core/src/session/session.ts:298
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”HarnessSession.getAgentManifest
getContextSnapshot()
Section titled “getContextSnapshot()”getContextSnapshot(): ContextSnapshot | undefined;Defined in: packages/core/src/session/session.ts:294
Returns
Section titled “Returns”ContextSnapshot | undefined
Implementation of
Section titled “Implementation of”HarnessSession.getContextSnapshot
getEvents()
Section titled “getEvents()”getEvents(filter?): HarnessEventRecord<unknown>[];Defined in: packages/core/src/session/session.ts:290
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
filter? | HarnessEventQuery<unknown> |
Returns
Section titled “Returns”HarnessEventRecord<unknown>[]
Implementation of
Section titled “Implementation of”getMode()
Section titled “getMode()”getMode(): string;Defined in: packages/core/src/session/session.ts:251
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”getModel()
Section titled “getModel()”getModel(): string;Defined in: packages/core/src/session/session.ts:255
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”getPendingApprovals()
Section titled “getPendingApprovals()”getPendingApprovals(): ToolApprovalHandle[];Defined in: packages/core/src/session/session.ts:302
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”HarnessSession.getPendingApprovals
getState()
Section titled “getState()”getState(): AgentSharedState;Defined in: packages/core/src/session/session.ts:276
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”getStatus()
Section titled “getStatus()”getStatus(): HarnessSessionStatus;Defined in: packages/core/src/session/session.ts:226
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”hydrate()
Section titled “hydrate()”hydrate(): Promise<void>;Defined in: packages/core/src/session/session.ts:344
Returns
Section titled “Returns”Promise<void>
on(listener): () => void;Defined in: packages/core/src/session/session.ts:314
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
listener | HarnessSessionListener |
Returns
Section titled “Returns”() => void
Implementation of
Section titled “Implementation of”onEvent()
Section titled “onEvent()”onEvent<TPayload, TEvent>(eventClass, listener): () => void;Defined in: packages/core/src/session/session.ts:318
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TPayload |
TEvent extends HarnessEvent<TPayload> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
eventClass | HarnessEventClass<TPayload, TEvent> |
listener | HarnessSessionEventListener<TEvent> |
Returns
Section titled “Returns”() => void
Implementation of
Section titled “Implementation of”replaceState()
Section titled “replaceState()”replaceState(next): void;Defined in: packages/core/src/session/session.ts:285
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
next | AgentSharedState |
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”send()
Section titled “send()”send(input, options?): Promise<SendResult>;Defined in: packages/core/src/session/session.ts:139
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | string | HarnessUserInput |
options? | SendOptions |
Returns
Section titled “Returns”Promise<SendResult>
Implementation of
Section titled “Implementation of”setModel()
Section titled “setModel()”setModel(model): void;Defined in: packages/core/src/session/session.ts:259
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
model | string |
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”stream()
Section titled “stream()”stream(input, options?): HarnessRunStream;Defined in: packages/core/src/session/session.ts:147
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | string | HarnessUserInput |
options | StreamOptions |
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”switchMode()
Section titled “switchMode()”switchMode(mode, input?): Promise<void>;Defined in: packages/core/src/session/session.ts:271
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
mode | | string | HarnessModeSelector |
input? | unknown |
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”updateState()
Section titled “updateState()”updateState(patch): void;Defined in: packages/core/src/session/session.ts:280
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
patch | unknown |
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”waitForEvent()
Section titled “waitForEvent()”waitForEvent<TPayload, TEvent>(eventClass, options?): Promise<TEvent>;Defined in: packages/core/src/session/session.ts:325
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TPayload |
TEvent extends HarnessEvent<TPayload> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
eventClass | HarnessEventClass<TPayload, TEvent> |
options | WaitForEventOptions |
Returns
Section titled “Returns”Promise<TEvent>