Documentation
¶
Index ¶
- Constants
- type Provider
- func (p *Provider) AnnouncePromptSubmit(reminder string) error
- func (p *Provider) AnnounceSessionStart(msg trace.SessionStartMessage) error
- func (p *Provider) AnnounceToUser(msg string) error
- func (p *Provider) CaptureFileSnapshot(store *state.Store, input *trace.HookInput) error
- func (p *Provider) CleanupAfterEdit(store *state.Store, input *trace.HookInput)
- func (p *Provider) CopySessionData(store *state.Store, loc trace.SessionLocation) error
- func (p *Provider) DeduplicatesSessionStartInstruction() bool
- func (p *Provider) HooksInstalled(repoRoot string) (bool, error)
- func (p *Provider) InstallHooks(repoRoot string) error
- func (p *Provider) InstallHooksForTraceRun(repoRoot string) error
- func (p *Provider) IsCommandTool(toolName string) bool
- func (p *Provider) IsFileWritingTool(toolName string) bool
- func (p *Provider) Name() string
- func (p *Provider) ParseSession(_ context.Context, opts *trace.ParseOpts) (*aicodingsession.Evidence, error)
- func (p *Provider) ReadHookInput(r io.Reader) (*trace.HookInput, error)
- func (p *Provider) ResolveBeforeContent(store *state.Store, input *trace.HookInput, _ []byte) []byte
- func (p *Provider) SettingsFile(repoRoot string) string
- func (p *Provider) SupportsPromptReminder() bool
- func (p *Provider) SupportsSessionStartBanner() bool
- func (p *Provider) SupportsSessionStartInstruction() bool
- func (p *Provider) UninstallHooks(repoRoot string) error
Constants ¶
const Name = "pi"
Name is the provider identifier stored in session records and evidence.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct{}
Provider captures and parses Pi sessions.
func (*Provider) AnnouncePromptSubmit ¶ added in v1.128.0
AnnouncePromptSubmit writes the per-turn reminder response.
func (*Provider) AnnounceSessionStart ¶ added in v1.128.0
func (p *Provider) AnnounceSessionStart(msg trace.SessionStartMessage) error
AnnounceSessionStart writes the response consumed by the Pi extension.
func (*Provider) AnnounceToUser ¶ added in v1.128.0
AnnounceToUser writes a message for Pi's UI or headless stderr channel.
func (*Provider) CaptureFileSnapshot ¶ added in v1.128.0
CaptureFileSnapshot saves the file content for one Pi tool call.
func (*Provider) CleanupAfterEdit ¶ added in v1.128.0
CleanupAfterEdit removes the snapshot for one Pi tool call.
func (*Provider) CopySessionData ¶
CopySessionData refreshes the store's private copy of a persisted Pi JSONL session. Pi reports the authoritative path through its extension; there is no cwd-derived fallback because --no-session has no transcript to discover.
A successful refresh becomes visible only after its temporary file is closed and atomically renamed. A failed refresh leaves the previous copy in place so the push can send the best version available.
func (*Provider) DeduplicatesSessionStartInstruction ¶ added in v1.128.0
DeduplicatesSessionStartInstruction reports that the extension persists a marker carrying Pi's session ID and owns exactly-once delivery.
func (*Provider) HooksInstalled ¶ added in v1.128.0
HooksInstalled reports whether the Pi extension is Chainloop-managed.
func (*Provider) InstallHooks ¶ added in v1.128.0
InstallHooks writes the permanent extension, including session shutdown.
func (*Provider) InstallHooksForTraceRun ¶ added in v1.128.0
InstallHooksForTraceRun writes the temporary extension without session end; trace run owns final attestation and restores the previous file.
func (*Provider) IsCommandTool ¶ added in v1.128.0
IsCommandTool reports whether Pi's tool can mutate the working tree broadly.
func (*Provider) IsFileWritingTool ¶ added in v1.128.0
IsFileWritingTool reports whether Pi's tool writes one named file.
func (*Provider) ParseSession ¶
func (p *Provider) ParseSession(_ context.Context, opts *trace.ParseOpts) (*aicodingsession.Evidence, error)
ParseSession reads the copied Pi JSONL and maps its selected branch to AI coding-session evidence. The live Pi transcript is never parsed in place.
func (*Provider) ReadHookInput ¶ added in v1.128.0
ReadHookInput decodes payloads emitted by the generated Pi extension.
func (*Provider) ResolveBeforeContent ¶ added in v1.128.0
func (p *Provider) ResolveBeforeContent(store *state.Store, input *trace.HookInput, _ []byte) []byte
ResolveBeforeContent returns the snapshot paired by Pi's tool-call ID.
func (*Provider) SettingsFile ¶ added in v1.128.0
SettingsFile returns the generated project-local Pi extension path.
func (*Provider) SupportsPromptReminder ¶ added in v1.128.0
SupportsPromptReminder reports that before_agent_start runs for every user turn.
func (*Provider) SupportsSessionStartBanner ¶ added in v1.128.0
SupportsSessionStartBanner reports that the extension can notify Pi's UI.
func (*Provider) SupportsSessionStartInstruction ¶ added in v1.128.0
SupportsSessionStartInstruction reports that before_agent_start can inject context.
func (*Provider) UninstallHooks ¶ added in v1.128.0
UninstallHooks removes only an extension carrying Chainloop's ownership marker.