@usine/agents/pi
Classes
Section titled “Classes”Opens a Pi session with the selected model and its repository tools.
Extends
Section titled “Extends”Context.ServiceClass
Properties
Section titled “Properties”Service
Section titled “Service”
readonlyService:object
The service’s operations: what yield* PiSdk returns.
readonlystart: (options) =>Promise<PiStartResult>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
PiStartOptions |
Returns
Section titled “Returns”Promise<PiStartResult>
Interfaces
Section titled “Interfaces”PiSession
Section titled “PiSession”The subset of an in-process Pi session that the adapter uses.
Properties
Section titled “Properties”
readonlyabort: () =>Promise<void>
Returns
Section titled “Returns”Promise<void>
dispose
Section titled “dispose”
readonlydispose: () =>void
Returns
Section titled “Returns”void
messages
Section titled “messages”
readonlymessages: readonlyAgentMessage[]
prompt
Section titled “prompt”
readonlyprompt: (prompt) =>Promise<void>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
prompt |
string |
Returns
Section titled “Returns”Promise<void>
readonlysteer: (message) =>Promise<void|"handled"|"queued">
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
message |
string |
Returns
Section titled “Returns”Promise<void | "handled" | "queued">
subscribe
Section titled “subscribe”
readonlysubscribe: (listener) => () =>void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
listener |
(event) => void |
Returns
Section titled “Returns”() => void
PiStartOptions
Section titled “PiStartOptions”Properties
Section titled “Properties”
readonlycwd:string
environment
Section titled “environment”
readonlyenvironment:Option<Readonly<Record<string,string>>>
The complete environment of every command the session’s bash tool runs. None inherits this process’s environment, which suits preflight because it runs no repository command.
extensions
Section titled “extensions”
readonlyextensions: readonlyInlineExtension[]
readonlymodel:string&Brand<"ModelId">
signal
Section titled “signal”
readonlysignal:AbortSignal
thinkingLevel
Section titled “thinkingLevel”
readonlythinkingLevel:"off"|"minimal"|"low"|"medium"|"high"|"xhigh"|"max"
Type Aliases
Section titled “Type Aliases”PiSessionEvent
Section titled “PiSessionEvent”PiSessionEvent =
AgentSessionEvent
PiStartResult
Section titled “PiStartResult”PiStartResult = {
_tag:"AuthenticationUnavailable";model:ModelId; } | {_tag:"UnsupportedAuthentication";authentication:Extract<PiAuthentication, {_tag:"OAuth"; }>;model:ModelId; } | {_tag:"UnknownModel"; } | {_tag:"UnsupportedEffort";effort:Effort;model:ModelId;supported:ReadonlyArray<Effort>; } | {_tag:"Started";model:ModelId;pool:PiPool;session:PiSession; }
Variables
Section titled “Variables”piChildBackendLayer
Section titled “piChildBackendLayer”
constpiChildBackendLayer:Layer.Layer<PiChildBackend,never,PiSdk>
Provides Pi coding sessions for tasks delegated by a parent.
piSdkLive
Section titled “piSdkLive”
constpiSdkLive:Layer.Layer<PiSdk,never,never>