Documentation
¶
Overview ¶
Package pluginkitai exposes the public root SDK for building plugin-kit-ai runtime binaries with typed Claude, Codex, and Gemini registrars.
Index ¶
Examples ¶
Constants ¶
const MaxPayloadBytes = runtime.MaxPayloadBytes
MaxPayloadBytes is the single wire limit for stdin and argv JSON payloads accepted by runtime decoders. Consumers should reference this constant instead of duplicating the number.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App owns middleware, handler registration, and invocation dispatch.
func (*App) Claude ¶
Claude returns a registrar for Claude-specific hook handlers.
Example ¶
package main
import (
pluginkitai "github.com/777genius/plugin-kit-ai/sdk"
"github.com/777genius/plugin-kit-ai/sdk/claude"
)
func main() {
app := pluginkitai.New(pluginkitai.Config{Name: "demo"})
app.Claude().OnStop(func(*claude.StopEvent) *claude.Response {
return claude.Allow()
})
_ = app
}
Output:
func (*App) Codex ¶
Codex returns a registrar for Codex-specific event handlers.
Example ¶
package main
import (
pluginkitai "github.com/777genius/plugin-kit-ai/sdk"
"github.com/777genius/plugin-kit-ai/sdk/codex"
)
func main() {
app := pluginkitai.New(pluginkitai.Config{Name: "demo"})
app.Codex().OnNotify(func(*codex.NotifyEvent) *codex.Response {
return codex.Continue()
})
_ = app
}
Output:
func (*App) Gemini ¶ added in v1.1.0
Gemini returns a registrar for Gemini-specific hook handlers.
Example ¶
package main
import (
pluginkitai "github.com/777genius/plugin-kit-ai/sdk"
"github.com/777genius/plugin-kit-ai/sdk/gemini"
)
func main() {
app := pluginkitai.New(pluginkitai.Config{Name: "demo"})
app.Gemini().OnBeforeTool(func(*gemini.BeforeToolEvent) *gemini.BeforeToolResponse {
return gemini.BeforeToolContinue()
})
_ = app
}
Output:
func (*App) RunContext ¶
RunContext dispatches the current process invocation using the supplied context.
func (*App) Use ¶
func (a *App) Use(mw Middleware)
Use appends middleware that wraps all subsequent handler dispatch.
type CapabilityID ¶
type CapabilityID = runtime.CapabilityID
CapabilityID aliases the normalized cross-platform capability identifier.
type Config ¶
type Config struct {
// Name is the human-readable app label used in diagnostics and examples.
Name string
// Args overrides the process argv used to resolve the current invocation.
Args []string
// IO overrides the stdin/stdout/stderr implementation used by Run.
IO IO
// Env overrides environment lookups used during invocation resolution.
Env Env
// Logger overrides structured logging emitted by the runtime engine.
Logger Logger
}
Config configures a root SDK app instance before handlers are registered.
type InvocationContext ¶
type InvocationContext = runtime.InvocationContext
InvocationContext aliases the metadata that accompanies a decoded invocation.
type MaturityLevel ¶
type MaturityLevel = runtime.MaturityLevel
MaturityLevel aliases the API maturity enum exposed by support metadata.
type Middleware ¶
type Middleware = runtime.Middleware
Middleware aliases the SDK middleware function signature.
type SupportEntry ¶
type SupportEntry = runtime.SupportEntry
SupportEntry aliases a generated public support-matrix row.
func Supported ¶
func Supported() []SupportEntry
Supported returns a copy of the generated public support matrix entries.
type SupportStatus ¶
type SupportStatus = runtime.SupportStatus
SupportStatus aliases the support-level enum used by generated support entries.
type TransportMode ¶
type TransportMode = runtime.TransportMode
TransportMode aliases the runtime transport mode enum for supported hooks.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package claude exposes typed public hook inputs, responses, and registrars for Claude plugin runtime integrations.
|
Package claude exposes typed public hook inputs, responses, and registrars for Claude plugin runtime integrations. |
|
cmd
|
|
|
plugin-kit-ai-e2e
command
|
|
|
plugin-kit-ai-smoke
command
|
|
|
Package codex exposes typed public event inputs, responses, and registrars for Codex runtime integrations.
|
Package codex exposes typed public event inputs, responses, and registrars for Codex runtime integrations. |
|
Package gemini exposes typed public Gemini hook inputs, responses, and registrars for the production-ready Gemini Go runtime lane, including the current 9-hook runtime surface.
|
Package gemini exposes typed public Gemini hook inputs, responses, and registrars for the production-ready Gemini Go runtime lane, including the current 9-hook runtime surface. |
|
Package hostdetect identifies which supported host product invoked the current hook process.
|
Package hostdetect identifies which supported host product invoked the current hook process. |
|
internal
|
|
|
platforms/cursor
Package cursor reserves the Cursor target identity in the internal platform tree.
|
Package cursor reserves the Cursor target identity in the internal platform tree. |
|
platforms/gemini
Package gemini implements the internal Gemini CLI hook runtime adapter for the dedicated Gemini Go runtime lane.
|
Package gemini implements the internal Gemini CLI hook runtime adapter for the dedicated Gemini Go runtime lane. |
|
platforms/opencode
Package opencode reserves the OpenCode target identity in the internal platform tree.
|
Package opencode reserves the OpenCode target identity in the internal platform tree. |
|
Package opencode decodes the neutral OpenCode observer wire.
|
Package opencode decodes the neutral OpenCode observer wire. |
|
Package platformmeta exposes generated public metadata about supported target platforms, scaffolds, validation rules, and managed surfaces.
|
Package platformmeta exposes generated public metadata about supported target platforms, scaffolds, validation rules, and managed surfaces. |