node

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2026 License: Apache-2.0, Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DirectoryRole = store.DirectoryRole
	DirectoryTeam = store.DirectoryTeam
)
View Source
const (
	ConnectorHTTPDefaultTimeout   = moduleapi.ConnectorHTTPDefaultTimeout
	ConnectorHTTPMaxTimeout       = moduleapi.ConnectorHTTPMaxTimeout
	ConnectorHTTPMaxRequestBytes  = moduleapi.ConnectorHTTPMaxRequestBytes
	ConnectorHTTPMaxResponseBytes = moduleapi.ConnectorHTTPMaxResponseBytes
)
View Source
const (
	EventTurnCompleted      = moduleapi.EventTurnCompleted
	EventChannelWSStatus    = moduleapi.EventChannelWSStatus
	EventWorkDeliveryQueued = moduleapi.EventWorkDeliveryQueued
)
View Source
const (
	WorkspaceLockEffect = moduleapi.WorkspaceLockEffect
	WorkspaceLockLocal  = moduleapi.WorkspaceLockLocal
	WorkspaceLockChange = moduleapi.WorkspaceLockChange
)
View Source
const (
	WakeMissedSkip     = moduleapi.WakeMissedSkip
	WakeMissedCoalesce = moduleapi.WakeMissedCoalesce
)
View Source
const MaxProjectSessions = moduleapi.MaxProjectSessions

MaxProjectSessions bounds one Host.ListProjectSessions call.

Variables

View Source
var (
	NewEventBus  = moduleapi.NewEventBus
	ListenerName = moduleapi.ListenerName
	Priority     = moduleapi.Priority
	Isolate      = moduleapi.Isolate
)

Functions

func AuthorizeCommand

func AuthorizeCommand(ctx context.Context, host Host, caller protocol.NodeID, request protocol.Request) error

AuthorizeCommand runs canonical Node authorization for an unwrapped module command inside a ProfileModuleService Call handler.

func FileReadMetadata

func FileReadMetadata(worktree protocol.WorktreeID, revisions map[string]string) *map[string]json.RawMessage

FileReadMetadata records the revisions of files whose source a native tool returned. Later edits can reuse those reads in the same worktree.

func IsLocalProcessOwner

func IsLocalProcessOwner(ctx context.Context) bool

IsLocalProcessOwner reports whether the verified execution principal owns this Node. A retained operation keeps the identity under which it was admitted.

func ManagedWorktreePath

func ManagedWorktreePath(projectRoot string, id protocol.WorktreeID) string

func VerifyWorktreeMembership

func VerifyWorktreeMembership(ctx context.Context, root, path string) error

func WorkspaceDirectory

func WorkspaceDirectory(path string) (string, error)

Types

type AgentInvocation

type AgentInvocation = store.AgentInvocation

type ApprovalPendingEvent

type ApprovalPendingEvent = moduleapi.ApprovalPendingEvent

type ApprovalPendingObserver

type ApprovalPendingObserver = moduleapi.ApprovalPendingObserver

type Assembly

type Assembly = moduleapi.Assembly

func HarnessAssembly

func HarnessAssembly() Assembly

type AttachmentHost

type AttachmentHost interface {
	ReadTurnAttachment(ctx context.Context, invocation *AgentInvocation, id string, maxBytes uint64) (displayName string, data []byte, err error)
}

AttachmentHost reads a published attachment from the agent invocation supplied by ToolsForTurn. The caller's byte limit is enforced before loading its data.

type BuiltInSkill

type BuiltInSkill = moduleapi.BuiltInSkill

func LoadBuiltInSkill

func LoadBuiltInSkill(tree fs.FS, pkg, name string) (BuiltInSkill, error)

LoadBuiltInSkill parses the skill document in a native module's embedded tree.

type CapabilityMediaHost

type CapabilityMediaHost interface {
	MediaHost
	ResolveMediaCapability(ctx context.Context, capability, ref string) (string, error)
	// An inpainting mask matches the source dimensions and uses white for areas to edit,
	// black for areas to preserve, and gray for partial coverage.
	CreateImageWithInputs(ctx context.Context, ref, capability, prompt, pose string, inputs map[string]string) ([]byte, error)
	SubmitVideoWithFrames(ctx context.Context, ref, prompt, key, ratio string, durationMS int, startPath, endPath string) (string, error)
}

CapabilityMediaHost is the optional input-aware native media API. Resolve checks support for the exact capability; it never falls back to a text route or account authorization. Input paths name validated local assets owned by the native caller, never paths supplied by a tool/client.

type CatalogSpec

type CatalogSpec = moduleapi.CatalogSpec

func LoadCatalog

func LoadCatalog(raw []byte) (CatalogSpec, error)

type ChannelAdapter

type ChannelAdapter = moduleapi.ChannelAdapter

type CommandHandler

type CommandHandler = moduleapi.CommandHandler

type CommandObserver

type CommandObserver = moduleapi.CommandObserver

type CommandPolicies

type CommandPolicies = moduleapi.CommandPolicies

type CommandPolicy

type CommandPolicy = moduleapi.CommandPolicy

type ConfigurationReader

type ConfigurationReader = moduleapi.ConfigurationReader

type ConfigurationSyncParticipant

type ConfigurationSyncParticipant = moduleapi.ConfigurationSyncParticipant

type ConfigurationValue

type ConfigurationValue = moduleapi.ConfigurationValue

type ConfigurationWriter

type ConfigurationWriter = moduleapi.ConfigurationWriter

type ConnectionToolConfig

type ConnectionToolConfig = moduleapi.ConnectionToolConfig

type ConnectorAccountSummary

type ConnectorAccountSummary = moduleapi.ConnectorAccountSummary

Connector HTTP contract aliases for native Node modules.

Modules discover user-configured accounts via Host.ListConnectorAccounts (which returns secret-free ConnectorAccountSummary entries) and make authenticated outbound HTTPS calls via Host.ConnectorHTTP without ever receiving credentials or tokens.

type ConnectorHost

type ConnectorHost = moduleapi.ConnectorHost

type ConversationHistoryProvider

type ConversationHistoryProvider = moduleapi.ConversationHistoryProvider

type ConversationModeHost

type ConversationModeHost = moduleapi.ConversationModeHost

type ConversationModeInfo

type ConversationModeInfo = moduleapi.ConversationModeInfo

type DatabaseOperation

type DatabaseOperation = store.DatabaseOperation

type DefaultPlugin

type DefaultPlugin = plugins.DefaultPackage

type DirectoryDiscussion

type DirectoryDiscussion = store.DirectoryDiscussion

type DirectoryDiscussionProvider

type DirectoryDiscussionProvider = moduleapi.DirectoryDiscussionProvider

type DiscussionToolProvider

type DiscussionToolProvider = moduleapi.DiscussionToolProvider

type DispatchProvider

type DispatchProvider = moduleapi.DispatchProvider

type EventBus

type EventBus = moduleapi.EventBus

type EventModuleService

type EventModuleService = moduleapi.EventModuleService

type EventOption

type EventOption = moduleapi.EventOption

type GitCommandResult

type GitCommandResult = moduleapi.GitCommandResult

type GitOptions

type GitOptions = moduleapi.GitOptions

type GitRunner

type GitRunner = moduleapi.GitRunner

type GroupTaskAssignment

type GroupTaskAssignment = store.GroupTaskAssignment

type HTTPRequest

type HTTPRequest = moduleapi.HTTPRequest

Connector HTTP contract aliases for native Node modules.

Modules discover user-configured accounts via Host.ListConnectorAccounts (which returns secret-free ConnectorAccountSummary entries) and make authenticated outbound HTTPS calls via Host.ConnectorHTTP without ever receiving credentials or tokens.

type HTTPResponse

type HTTPResponse = moduleapi.HTTPResponse

Connector HTTP contract aliases for native Node modules.

Modules discover user-configured accounts via Host.ListConnectorAccounts (which returns secret-free ConnectorAccountSummary entries) and make authenticated outbound HTTPS calls via Host.ConnectorHTTP without ever receiving credentials or tokens.

type Host

type Host = moduleapi.Host

func ModuleCallEnvironment

func ModuleCallEnvironment(ctx context.Context) (Host, string, bool)

ModuleCallEnvironment returns the execution Host during OpenModuleService and Call. During a controller Call the path is the authorized project directory; during OpenModuleService the path is empty. Agent tools receive their host and worktree through ToolsForTurn.

type HostInstallations

type HostInstallations = host.Installations

type IsolatedProjectTaskFollowUpHost

type IsolatedProjectTaskFollowUpHost = moduleapi.IsolatedProjectTaskFollowUpHost
type Link = link.Link

type MediaHost

type MediaHost interface {
	ResolveMedia(ctx context.Context, kind, ref string) (string, error)
	CreateImage(ctx context.Context, ref, prompt string) ([]byte, error)
	SubmitVideo(ctx context.Context, ref, prompt, key string) (string, error)
	ReadVideo(ctx context.Context, ref, job string) (string, error)
	DownloadVideo(ctx context.Context, ref, job string) ([]byte, error)
}

MediaHost is available on live native module hosts. ResolveMedia returns a provider-qualified model reference that a task can persist across restarts. Provider credentials and transport configuration remain inside the Node.

type ModelContextProvider

type ModelContextProvider = moduleapi.ModelContextProvider

ModelContextProvider supplies data exclusively to the executing model.

type Module

type Module = moduleapi.Module

type ModuleDB

type ModuleDB = moduleapi.ModuleDB

type ModuleService

type ModuleService = moduleapi.ModuleService

func ServiceFor

func ServiceFor(host Host, module string) (ModuleService, bool)

type ModuleServiceProvider

type ModuleServiceProvider = moduleapi.ModuleServiceProvider

type ModuleSessionStart

type ModuleSessionStart = moduleapi.ModuleSessionStart

type ModuleTurn

type ModuleTurn = moduleapi.ModuleTurn

ModuleTurn configures Host.QueueModuleTurn.

Error-code contract for Host.QueueModuleTurn:

  • The ONLY error codes that mean "this session can no longer take turns" are protocol.ErrorCodeNotFound (missing or removed session) and protocol.ErrorCodeExpired (archived session).
  • protocol.ErrorCodeBusy indicates same-session re-entrancy or transient queue contention and is NOT terminal.
  • protocol.ErrorCodeConflict is never terminal and must never be treated as "session archived or gone".

type Node

type Node = node.Node

func StartWithOptions

func StartWithOptions(ctx context.Context, path string, options Options) (*Node, error)

type OCRHost

type OCRHost interface {
	RecognizePage(ctx context.Context, name string, data []byte, page int) (string, error)
}

OCRHost recognizes an authorized in-memory image or one page of a PDF with the Node's selected local OCR model. Use page zero for an image.

type Options

type Options = node.Options

type PackageSourceProvider

type PackageSourceProvider = moduleapi.PackageSourceProvider

type PendingSessionApproval

type PendingSessionApproval = moduleapi.PendingSessionApproval

type PluginWebSocketSpec

type PluginWebSocketSpec = moduleapi.PluginWebSocketSpec

type PluginWebSocketStatus

type PluginWebSocketStatus = moduleapi.PluginWebSocketStatus

type PreparedWorktree

type PreparedWorktree = moduleapi.PreparedWorktree

type ProcessCommandBinding

type ProcessCommandBinding = process.CommandBinding

type ProcessCredential

type ProcessCredential = moduleapi.ProcessCredential

type ProcessCredentialLookup

type ProcessCredentialLookup = moduleapi.ProcessCredentialLookup

type ProfileModuleService

type ProfileModuleService = moduleapi.ProfileModuleService

type ProjectRemoval

type ProjectRemoval = store.ProjectRemoval

type ProjectRemovalHook

type ProjectRemovalHook = moduleapi.ProjectRemovalHook

type ProjectSession

type ProjectSession = moduleapi.ProjectSession

ProjectSession is one project conversation returned by Host.ListProjectSessions.

type ProjectSourcePreparer

type ProjectSourcePreparer = moduleapi.ProjectSourcePreparer

type ProjectTaskBoard

type ProjectTaskBoard = moduleapi.ProjectTaskBoard

type ProjectTaskBoardItemRecorder

type ProjectTaskBoardItemRecorder = moduleapi.ProjectTaskBoardItemRecorder

type ProjectTaskBoardRecorder

type ProjectTaskBoardRecorder = moduleapi.ProjectTaskBoardRecorder

type ProjectTaskBoardScope

type ProjectTaskBoardScope = moduleapi.ProjectTaskBoardScope

type ProjectTaskBoardStartGuard

type ProjectTaskBoardStartGuard = moduleapi.ProjectTaskBoardStartGuard

type ProjectTaskBoardStarter

type ProjectTaskBoardStarter = moduleapi.ProjectTaskBoardStarter

type ProjectTaskFollowUpHost

type ProjectTaskFollowUpHost = moduleapi.ProjectTaskFollowUpHost

type ProjectTaskOwnerChoice

type ProjectTaskOwnerChoice = moduleapi.ProjectTaskOwnerChoice

type ProjectTaskProposalReader

type ProjectTaskProposalReader = moduleapi.ProjectTaskProposalReader

type ProjectTaskStopHost

type ProjectTaskStopHost = moduleapi.ProjectTaskStopHost

type ProjectTaskTranscriptHost

type ProjectTaskTranscriptHost = moduleapi.ProjectTaskTranscriptHost

type ProjectTaskWorkObserver

type ProjectTaskWorkObserver = moduleapi.ProjectTaskWorkObserver

type ProjectTaskWorkPublisher

type ProjectTaskWorkPublisher = moduleapi.ProjectTaskWorkPublisher

type ProjectWorkDefaultsProvider

type ProjectWorkDefaultsProvider = moduleapi.ProjectWorkDefaultsProvider

type ProjectWorktree

type ProjectWorktree = store.ProjectWorktree

type PromptPart

type PromptPart = prompt.Part

type RawEvent

type RawEvent = moduleapi.RawEvent

type RepositoryWatch

type RepositoryWatch = moduleapi.RepositoryWatch

type RepositoryWatchFilter

type RepositoryWatchFilter = moduleapi.RepositoryWatchFilter

type RosterHost

type RosterHost = moduleapi.RosterHost

type RuntimeHost

type RuntimeHost = moduleapi.RuntimeHost

type SchemaExtension

type SchemaExtension = moduleapi.SchemaExtension

type ScopedToolConfig

type ScopedToolConfig = moduleapi.ScopedToolConfig

type SessionApprovalHost

type SessionApprovalHost = moduleapi.SessionApprovalHost

type SessionArtifactHost

type SessionArtifactHost = moduleapi.SessionArtifactHost

type SessionBotSwitch

type SessionBotSwitch = moduleapi.SessionBotSwitch

type SessionContextStats

type SessionContextStats = moduleapi.SessionContextStats

type SessionHandoffHost

type SessionHandoffHost = moduleapi.SessionHandoffHost

type SessionTranscriptEntry

type SessionTranscriptEntry = moduleapi.SessionTranscriptEntry

type SessionTranscriptHost

type SessionTranscriptHost = moduleapi.SessionTranscriptHost

type SkillProvider

type SkillProvider = moduleapi.SkillProvider

type SpeechHost

type SpeechHost interface {
	Speak(ctx context.Context, text, voice string) (modelRef, mediaType string, data []byte, err error)
	Transcribe(ctx context.Context, samples []float32) (modelRef, text string, err error)
}

SpeechHost synthesizes text and recognizes 16 kHz mono PCM with the Node's configured speech models. Each result identifies the model actually used.

type StandingApproval

type StandingApproval = protocol.StandingApproval

Read-only standing approval aliases for native Node modules.

Modules inspect active user-created grants scoped to their own module ID via Host.ListStandingApprovals(ctx, project). Modules can never create or revoke standing approval grants.

type StandingApprovalID

type StandingApprovalID = protocol.StandingApprovalID

Read-only standing approval aliases for native Node modules.

Modules inspect active user-created grants scoped to their own module ID via Host.ListStandingApprovals(ctx, project). Modules can never create or revoke standing approval grants.

type StandingApprovalScope

type StandingApprovalScope = protocol.StandingApprovalScope

Read-only standing approval aliases for native Node modules.

Modules inspect active user-created grants scoped to their own module ID via Host.ListStandingApprovals(ctx, project). Modules can never create or revoke standing approval grants.

type StorageHost

type StorageHost = moduleapi.StorageHost

type Subscription

type Subscription = link.Subscription

type TaskDeliveryPost

type TaskDeliveryPost = moduleapi.TaskDeliveryPost

type TaskEventSink

type TaskEventSink = moduleapi.TaskEventSink

type TaskTurnGuidanceHost

type TaskTurnGuidanceHost = moduleapi.TaskTurnGuidanceHost

type TaskTurnPermissionHost

type TaskTurnPermissionHost = moduleapi.TaskTurnPermissionHost

type Tool

type Tool = engine.Tool

func BuildCustomTool

func BuildCustomTool(spec ToolSpec, instruction string, execute func(context.Context, ToolRequest) ToolResult) (Tool, error)

type ToolHost

type ToolHost = moduleapi.ToolHost

type ToolMeta

type ToolMeta = moduleapi.ToolMeta

type ToolRequest

type ToolRequest = canonical.ToolRequest

type ToolResult

type ToolResult = engine.ToolResult

type ToolSpec

type ToolSpec = moduleapi.ToolSpec

type TopicHandler

type TopicHandler = moduleapi.TopicHandler

type Transfers

type Transfers = files.Transfers

type TurnCompletionEvent

type TurnCompletionEvent = moduleapi.TurnCompletionEvent

type TurnCompletionObserver

type TurnCompletionObserver = moduleapi.TurnCompletionObserver

type TurnHost

type TurnHost = moduleapi.TurnHost

type TurnOrigin

type TurnOrigin = moduleapi.TurnOrigin

type WakeEvent

type WakeEvent = moduleapi.WakeEvent

type WakeHost

type WakeHost = moduleapi.WakeHost

type WakeMissedPolicy

type WakeMissedPolicy = moduleapi.WakeMissedPolicy

type WakeProvider

type WakeProvider = moduleapi.WakeProvider

type WakeSchedule

type WakeSchedule = moduleapi.WakeSchedule

type WorkDeliveryEvent

type WorkDeliveryEvent = moduleapi.WorkDeliveryEvent

type WorkSourcePlugin

type WorkSourcePlugin = moduleapi.WorkSourcePlugin

type WorkSourcePluginHost

type WorkSourcePluginHost = moduleapi.WorkSourcePluginHost

type WorkspaceBinder

type WorkspaceBinder = moduleapi.WorkspaceBinder

type WorkspaceBindings

type WorkspaceBindings = moduleapi.WorkspaceBindings

type WorkspaceCommand

type WorkspaceCommand = moduleapi.WorkspaceCommand

type WorkspaceCommandHost

type WorkspaceCommandHost = moduleapi.WorkspaceCommandHost

type WorkspaceCommandScope

type WorkspaceCommandScope = moduleapi.WorkspaceCommandScope

type WorkspaceExtension

type WorkspaceExtension = moduleapi.WorkspaceExtension

type WorkspaceFactory

type WorkspaceFactory[T any] = moduleapi.WorkspaceFactory[T]

type WorkspaceLock

type WorkspaceLock = moduleapi.WorkspaceLock

type WorkspaceOptions

type WorkspaceOptions = moduleapi.WorkspaceOptions

type WorkspaceRequestHost

type WorkspaceRequestHost = moduleapi.WorkspaceRequestHost

type WorkspaceRuntime

type WorkspaceRuntime = moduleapi.WorkspaceRuntime

type WorkspaceToolConfig

type WorkspaceToolConfig = moduleapi.WorkspaceToolConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL