Documentation
¶
Index ¶
- Constants
- Variables
- func AtExit()
- func CommandCatalog(ctx context.Context, scope func(context.Context) (context.Context, error)) (tuigateway.CommandsCatalogResult, error)
- func ConsumeTypedStopPhrase(ctx context.Context, text, sessionID string) (bool, error)
- func DecodeAttachBase64(raw, mimePrefix string, maxBytes int) ([]byte, error)
- func Dispatch(ctx context.Context, req any, transport tuihost.Transport) map[string]any
- func GatewayToolsets(ctx context.Context, platform string) (enabled, disabled []string)
- func HandleWS(ctx context.Context, ws ServedSocket, authIdentity map[string]any, ...) error
- func PathCompletionItems(ctx context.Context, word, root, sessionKey string, local bool) ([]tuigateway.CompletionItem, error)
- func ProfileRuntimeScope(ctx context.Context, profileHome string) context.Context
- func ProjectInfoForCwd(ctx context.Context, cwd string) any
- func SessionSteerAuthority(ctx context.Context, sessionID string) (any, any)
- func SettleWorktree(ctx context.Context, tree map[string]string, choice string, echo func(string))
- func SlashCompletions(ctx context.Context, text string, ...) (tuigateway.CompleteSlashResult, error)
- func SniffImageExt(data []byte, filename string) string
- func StageImageBytes(directory string, data []byte, ext, prefix string) (string, error)
- type CatalogCommand
- type Handler
- type ProfileUnavailableError
- type ServedSocket
- type SlashCompletion
- type SnapshotLines
- type SocketDisconnect
- type SocketPeer
- type StoreUnavailableError
Constants ¶
const AttachBytesMaxBytes = attachBytesMaxBytes
Byte cap of an attached payload the owner's image staging enforces
Variables ¶
var ( SlashCompleter func(ctx context.Context, skillCommands, skillBundles skills.SkillCommands) func(text string) []SlashCompletion GatewayKnownCommands func() map[string]bool )
Hooks into pkg/commands assigned in cmd/icebath/wiring.go, the slash completer and the gateway command names
var Banner struct { ReleaseDate string AvailableSkills func(ctx context.Context) *jsonutil.Object UpdateResult func(timeout time.Duration) *int64 }
CLI banner facts the session info reports, assigned by the command wiring from the app package
var CLICommandTree func(ctx context.Context) tuigateway.CommandsTreeResult
CLI command tree of this binary with the plugin commands the process loaded for the scoped profile, assigned in cmd/icebath/wiring.go
var CatalogRegistry func(ctx context.Context) ([]CatalogCommand, map[string][]string)
Builtin registry rows in registry order and the subcommand table of pkg/commands, assigned in cmd/icebath/wiring.go
var ChatAppCommands struct { // Runs icebath webhook with the fields of the webhook form Webhook func(ctx context.Context, w io.Writer, p tuigateway.ChatAppsWebhookParams) (int, error) // Runs icebath send with its parsed words Send func(ctx context.Context, h string, ns map[string]any, w, errw io.Writer) (int, error) }
Chat app commands of the gateway command line, wired by the binary so this package does not import it
var QuickSnapshots func(home string, t func(key string, kwargs map[string]any) string) SnapshotLines
Shared /snapshot command over a profile home and a catalog lookup, set by the wiring
var RegistryPluginCommands func(ctx context.Context) ([]CatalogCommand, map[string][]string)
Plugin owned registry commands sorted by name with their subcommand table, assigned in cmd/icebath/wiring.go
Persists one dot separated key into the active home config, the cli save_config_value assigned in cmd/icebath/wiring.go
Functions ¶
func AtExit ¶
func AtExit()
Runs and clears the queued exit functions newest first, a panicking one not stopping the rest
func CommandCatalog ¶
func CommandCatalog(ctx context.Context, scope func(context.Context) (context.Context, error)) (tuigateway.CommandsCatalogResult, error)
Registry backed slash metadata by category, each discovery source degrading into the warning on failure
func ConsumeTypedStopPhrase ¶
Typed stop check of the canonical prompt submit, the submitter answered in the reply instead of an event
func DecodeAttachBase64 ¶
Decoded data URL or bare base64 payload under the cap, nil when invalid
func Dispatch ¶
Routes one inbound RPC, a long handler to the pool returning nil and every other inline with its response
func GatewayToolsets ¶
Enabled and configured disabled toolsets a TUI session of the platform is built with
func HandleWS ¶
func HandleWS(ctx context.Context, ws ServedSocket, authIdentity map[string]any, subprotocol *string, operator bool) error
Runs one WebSocket connection of a client, its requests answered by the session authority under the identity the upgrade verified
func PathCompletionItems ¶
func PathCompletionItems(ctx context.Context, word, root, sessionKey string, local bool) ([]tuigateway.CompletionItem, error)
Path and context ref rows for a word rooted in a folder, an empty root meaning the terminal workspace
func ProfileRuntimeScope ¶
Context bound to the home, hydrated secrets and terminal policy of a profile home, empty meaning the launch profile
func ProjectInfoForCwd ¶
Project of a working directory with its id, slug, name and primary path, nil when none
func SessionSteerAuthority ¶
Steer authority of the bound request as untyped values, both nil when the transport holds none
func SettleWorktree ¶
Carries out an exit choice, else removes a clean tree and its branch or echoes why the tree is kept
func SlashCompletions ¶
func SlashCompletions(ctx context.Context, text string, scope func(context.Context) (context.Context, error)) (tuigateway.CompleteSlashResult, error)
Slash popup rows for the text, skills and bundles read inside the scope of the calling session, for both routes
func SniffImageExt ¶
Image extension from the filename hint, else magic bytes, else png
Types ¶
type CatalogCommand ¶
One builtin registry command as the palette catalog reads it
type ProfileUnavailableError ¶
Explicit profile param naming no live profile on this host, answered as JSON RPC 4064
func (*ProfileUnavailableError) Error ¶
func (e *ProfileUnavailableError) Error() string
func (*ProfileUnavailableError) ErrorKind ¶
func (e *ProfileUnavailableError) ErrorKind() string
Python exception class name the error stands for
type ServedSocket ¶
type ServedSocket interface {
tuihost.WSConn
Accept(ctx context.Context, subprotocol *string) error
// Next text frame, a SocketDisconnect once the peer leaves
ReceiveText(ctx context.Context) (string, error)
// Peer address, nil when the server reports none
Client() *SocketPeer
// Raw stream socket under the connection, nil when the server exposes none
RawConn() net.Conn
// Session authority of the route scope, else of the app state, nil when the backend has none
SessionAuthority() *gateway.SessionAuthority
}
Accepted WebSocket one session connection runs over, as the gateway session route hands it in
type SlashCompletion ¶
type SlashCompletion struct {
Text, Display, Meta string
}
One completion of the prompt slash completer, display and meta already plain text
type SnapshotLines ¶
type SnapshotLines interface {
List() ([]string, error)
Create(parts []string) ([]string, error)
Prune(parts []string) ([]string, error)
RestoreTarget(parts []string) (string, []string, error)
}
Lines of the shared /snapshot subcommands
type SocketDisconnect ¶
Peer close a socket read reports, with its code and reason
func (*SocketDisconnect) Error ¶
func (e *SocketDisconnect) Error() string
type SocketPeer ¶
Host and port of a socket peer, the port nil when unknown
type StoreUnavailableError ¶
type StoreUnavailableError = state.StoreUnavailableError
Session store that would not open, shared with the messaging gateway so both name the cause alike
Source Files
¶
- agent_factory.go
- atexit.go
- browser_hooks.go
- change_watcher.go
- change_watcher_pet.go
- change_watcher_skin.go
- client_capabilities.go
- command_catalog.go
- command_discovery.go
- entry.go
- env.go
- float_value.go
- inline_image.go
- log.go
- method_ctx.go
- methods_browser.go
- methods_commands_tree.go
- methods_complete.go
- methods_complete_helpers.go
- methods_config.go
- methods_config_setup.go
- methods_display.go
- methods_display_desktop.go
- methods_display_observe.go
- methods_display_watch.go
- methods_hub_approvals.go
- methods_hub_chatapps.go
- methods_hub_config_files.go
- methods_hub_cron.go
- methods_hub_fallback.go
- methods_hub_hooks.go
- methods_hub_kanban.go
- methods_hub_memory.go
- methods_hub_mixes.go
- methods_hub_plugins.go
- methods_hub_profiles.go
- methods_hub_projects.go
- methods_hub_secrets.go
- methods_hub_setup.go
- methods_hub_skills.go
- methods_hub_vault.go
- methods_i18n.go
- methods_images.go
- methods_learning_graph.go
- methods_logins.go
- methods_plugins_manage.go
- methods_profiles.go
- methods_profiles_create.go
- methods_prompt_attach.go
- methods_prompt_respond.go
- methods_prompt_side.go
- methods_prompt_typed_stop.go
- methods_session.go
- methods_session_delegation.go
- methods_session_interrupt.go
- methods_session_list.go
- methods_session_meta.go
- methods_session_model_guard.go
- methods_session_pets.go
- methods_session_usage.go
- methods_settings.go
- methods_setup_action.go
- methods_skills_manage.go
- methods_subagents.go
- methods_tools_config.go
- methods_tools_dispatch.go
- methods_tools_home_scope.go
- methods_tools_learning.go
- methods_tools_mcp.go
- methods_tools_mcp_enable.go
- methods_tools_plugin_servers.go
- methods_tools_rollback.go
- methods_tools_rpc.go
- methods_ui_host.go
- methods_voice.go
- methods_voice_liveness.go
- methods_voice_rpc.go
- methods_voice_turn.go
- methods_voice_turn_base.go
- model_switch.go
- path_completion_export.go
- pet_hooks.go
- pet_sheet.go
- prompt_attachments.go
- prompt_attachments_export.go
- prompt_turn_helpers.go
- prompt_turn_run.go
- rpc_dispatch.go
- server.go
- server_config_write.go
- server_crash.go
- server_long_handlers.go
- server_mcp_reload.go
- server_pet.go
- server_pet_gen.go
- server_profile_db.go
- server_project_export.go
- server_requests.go
- server_session_processes.go
- server_spawn_trees.go
- server_steer.go
- service_verbs.go
- session_auto_continue_snapshots.go
- session_history.go
- session_reaper.go
- session_registry_checkpoints.go
- session_registry_hydration.go
- session_workdir.go
- session_workdir_set.go
- setup_section_sources.go
- setup_section_terminal.go
- setup_section_tts.go
- slash_fuzzy.go
- tool_progress.go
- voice_methods.go
- voice_mode_hooks.go
- voice_session.go
- ws.go