Documentation
¶
Index ¶
- Constants
- func EnvNames(field EnvField) []string
- func FromCommand(command string) (registry.Harness, bool)
- func HookTimeoutSecondsFor(harness registry.Harness, event string) int
- func IntegrationVersionFor(id registry.Harness) int
- func Normalize(value string) (registry.Harness, error)
- func PayloadCompatibleWithHarness(harness registry.Harness, rawPayload json.RawMessage) bool
- func ProcessNames(harness registry.Harness) []string
- func RawStdinDefaultsReportHookCommand[T hookTransition](binary string, harness registry.Harness, transition T, event string, ...) string
- func ReportHookCommand[T hookTransition](binary string, harness registry.Harness, transition T, event string, ...) string
- func ResumeCommandFor(harness registry.Harness, sessionID string, sessionPath string) []string
- func ShellQuote(value string) string
- func SupportedNames() []string
- func WithResumeCommand(observation registry.Observation) registry.Observation
- type Adapter
- type Capabilities
- type CommandHookInstallSpec
- type CursorCommandHookInstallSpec
- type CursorJSONHookInstallPlan
- type CursorJSONHooksAction
- type Definition
- type EnvField
- type EnvKeys
- type HermesPluginRegistrationPlan
- type HookAdapter
- type HookInvocation
- type HookPayloadValidator
- type HookResult
- type HookTransition
- type ImportManifestInstallPlan
- type InstallAction
- type InstallPlan
- type Installable
- type JSONCommandHookInstallPlan
- type JSONCommandHooksAction
- type ManagedTextBlockAction
- type ManagedTextBlockInstallPlan
- type OpenClawPluginRegistrationPlan
- type PayloadAdapter
- type PayloadDefaults
- type PluginDirectoryAction
- type PluginDirectoryInstallPlan
- type PluginFileInstallSpec
- type RenderedFileAction
- type RenderedFileInstallPlan
- type RenderedFileInstallSpec
- type RenderedFilesAction
- type RenderedFilesInstallPlan
- type Resumable
- type ShimAction
Constants ¶
const ( ManagedMarker = "aht managed integration" HookTimeoutSeconds = 5 HookTypeCommand = "command" HookEventSessionStart = "SessionStart" HookEventSessionEnd = "SessionEnd" HookEventUserPromptSubmit = "UserPromptSubmit" HookEventPostToolUse = "PostToolUse" HookEventPostToolUseFailure = "PostToolUseFailure" HookEventPreToolUse = "PreToolUse" HookEventStop = "Stop" )
const (
IntegrationVersion = 7
)
Variables ¶
This section is empty.
Functions ¶
func HookTimeoutSecondsFor ¶
HookTimeoutSecondsFor returns the native command-hook timeout for an event.
func IntegrationVersionFor ¶
IntegrationVersionFor returns the managed artifact generation for a harness.
func PayloadCompatibleWithHarness ¶
func PayloadCompatibleWithHarness(harness registry.Harness, rawPayload json.RawMessage) bool
func ProcessNames ¶
ProcessNames returns executable names that identify a harness process.
func ReportHookCommand ¶
func ResumeCommandFor ¶
func ShellQuote ¶
func SupportedNames ¶
func SupportedNames() []string
func WithResumeCommand ¶
func WithResumeCommand(observation registry.Observation) registry.Observation
Types ¶
type Adapter ¶
type Adapter interface {
Definition() Definition
}
type Capabilities ¶
type CommandHookInstallSpec ¶
type CursorJSONHookInstallPlan ¶
type CursorJSONHookInstallPlan struct {
Path string
Source string
Label string
ConfigLabel string
Hooks []CursorCommandHookInstallSpec
}
type CursorJSONHooksAction ¶
type CursorJSONHooksAction struct {
Plan CursorJSONHookInstallPlan
}
type Definition ¶
type HermesPluginRegistrationPlan ¶
HermesPluginRegistrationPlan describes native Hermes plugin activation for a managed plugin installed in the documented user plugin directory.
type HookAdapter ¶
type HookAdapter interface {
HandleHook(invocation HookInvocation) HookResult
}
type HookInvocation ¶
type HookPayloadValidator ¶
type HookPayloadValidator func(json.RawMessage) bool
type HookResult ¶
type HookResult struct {
Report registry.Observation
ReportOK bool
Response map[string]any
}
func HandleHook ¶
func HandleHook( harness registry.Harness, explicitEvent string, rawPayload json.RawMessage, payload map[string]any, parentArgs []string, ) (HookResult, bool)
type HookTransition ¶
type HookTransition string
HookTransition is the closed, dimension-aware state used by generated hook specifications that need to store a transition before rendering it.
const ( HookActivityRunning HookTransition = "activity:running" HookActivityWaiting HookTransition = "activity:waiting" HookActivityIdle HookTransition = "activity:idle" HookActivityFailed HookTransition = "activity:failed" HookActivityInterrupted HookTransition = "activity:interrupted" HookPresenceGone HookTransition = "presence:gone" )
type InstallAction ¶
type InstallAction interface {
// contains filtered or unexported methods
}
type InstallPlan ¶
type InstallPlan struct {
Actions []InstallAction
}
type Installable ¶
type Installable interface {
InstallPlan(binary string) InstallPlan
}
type JSONCommandHooksAction ¶
type JSONCommandHooksAction struct {
Plan JSONCommandHookInstallPlan
}
type ManagedTextBlockAction ¶
type ManagedTextBlockAction struct {
Plan ManagedTextBlockInstallPlan
}
type OpenClawPluginRegistrationPlan ¶
type OpenClawPluginRegistrationPlan struct {
Command string
PluginID string
Version string
AllowConversationAccess bool
}
OpenClawPluginRegistrationPlan describes native OpenClaw CLI registration for a managed plugin source directory.
type PayloadAdapter ¶
type PayloadAdapter interface {
PayloadCompatible(rawPayload json.RawMessage) bool
PayloadDefaults(payload map[string]any) PayloadDefaults
}
type PayloadDefaults ¶
type PayloadDefaults struct {
SessionID string
SessionPath string
CWD string
ProjectRoot string
Event string
Attributes map[string]string
}
func DefaultsFromPayload ¶
func DefaultsFromPayload(harness registry.Harness, rawPayload json.RawMessage) PayloadDefaults
func DefaultsFromPayloadWithError ¶
func DefaultsFromPayloadWithError(harness registry.Harness, rawPayload json.RawMessage) (PayloadDefaults, error)
DefaultsFromPayloadWithError derives known harness fields while preserving failures from adapters that consult auxiliary native session metadata.
type PluginDirectoryAction ¶
type PluginDirectoryAction struct {
Plan PluginDirectoryInstallPlan
}
type PluginDirectoryInstallPlan ¶
type PluginDirectoryInstallPlan struct {
Dir string
Label string
Files []PluginFileInstallSpec
SnippetOrder []string
MarkerFile string
ObsoleteFiles []string
ImportManifest *ImportManifestInstallPlan
OpenClaw *OpenClawPluginRegistrationPlan
Hermes *HermesPluginRegistrationPlan
}
type PluginFileInstallSpec ¶
type RenderedFileAction ¶
type RenderedFileAction struct {
Plan RenderedFileInstallPlan
}
type RenderedFileInstallPlan ¶
type RenderedFileInstallSpec ¶
type RenderedFilesAction ¶
type RenderedFilesAction struct {
Plan RenderedFilesInstallPlan
}
type RenderedFilesInstallPlan ¶
type RenderedFilesInstallPlan struct {
Dir string
Label string
ConfigLabel string
Files []RenderedFileInstallSpec
SnippetOrder []string
}
type ShimAction ¶
type ShimAction struct{}