extensions

package
v1.5.152 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 54 Imported by: 0 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

Overview

Package extensions owns the host-side extension boundary. Discovery does not execute code; approved sources are connected only explicitly or after a tool gate.

Index

Constants

This section is empty.

Variables

View Source
var ErrSourceCommitted = errors.New("source saved but live update failed")

ErrSourceCommitted reports that disk configuration was saved but the live manager could not adopt it; callers must retain any newly referenced secret.

View Source
var LarkSourceRef = SourceRef{Kind: "mcp", ID: "lark"}

LarkSourceRef is the fixed first-party Lark source identity shared by the GUI, the TUI and the CLI extension commands.

Functions

func ConfigPath

func ConfigPath() string

func DisplayText

func DisplayText(s string, limit int) string

DisplayText is for terminal-facing data, not for rewriting executable input.

func LarkActiveHelperVersion added in v1.5.136

func LarkActiveHelperVersion(m *Manager) (string, bool)

LarkActiveHelperVersion reports the managed helper version the configured Lark source runs. ok is false when Lark is unconfigured or its command is not a managed package.

func LarkHelperVersion added in v1.5.136

func LarkHelperVersion() string

LarkHelperVersion is the helper version this build expects.

func LastAttemptText added in v1.5.110

func LastAttemptText(s Snapshot) string

LastAttemptText renders the history of the last failed attempt for a status view: when it happened, what kind of attempt it was, and the error. State is the current readiness, so this text never stands in for it.

func ModelName

func ModelName(ref SourceRef, name string) string

ModelName is deterministic even when multiple wire names sanitize alike.

func RebindLarkSource added in v1.5.136

func RebindLarkSource(m *Manager, pkg ManagedPackage) error

RebindLarkSource points the configured Lark source at an installed helper. ReplaceSourceConfig persists the replacement disabled and unapproved, so the new helper bytes are reviewed before they can run; credentials and login state survive the replacement.

func RemoveAllManagedPackages added in v1.5.49

func RemoveAllManagedPackages(id string) error

RemoveAllManagedPackages removes every valid installed version for one first-party package. An unexpected directory fails closed instead of turning uninstall into an arbitrary recursive delete.

func RemoveManagedPackage added in v1.5.49

func RemoveManagedPackage(pkg ManagedPackage) error

RemoveManagedPackage removes only the exact registered package root. Source config and login state are separate explicit operations.

func WriteNewSource added in v1.5.62

func WriteNewSource(path string, ref SourceRef, c SourceConfig) error

WriteNewSource registers only an absent source, checking and writing under the same cross-process lock so concurrent CLI additions cannot overwrite it.

func WriteSource

func WriteSource(path string, ref SourceRef, c *SourceConfig) error

WriteSource edits just one canonical source table, preserving unrelated tables/comments. Noncanonical dotted/inline representations fail closed.

Types

type Catalog

type Catalog struct {
	Protocol  string               `json:"protocol,omitempty"`
	Version   string               `json:"version,omitempty"`
	Tools     []extension.ToolSpec `json:"tools"`
	Commands  []Item               `json:"commands,omitempty"`
	Events    []string             `json:"events,omitempty"`
	Prompts   []Item               `json:"prompts,omitempty"`
	Resources []Item               `json:"resources,omitempty"`
}

type Config

type Config struct {
	Plugins map[string]SourceConfig `toml:"plugins"`
	MCP     struct {
		Servers map[string]SourceConfig `toml:"servers"`
	} `toml:"mcp"`
}

func LoadConfig

func LoadConfig(path string) (Config, error)

type Item

type Item struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	URI         string `json:"uri,omitempty"`
}

type LarkAuthorizationStatus added in v1.5.78

type LarkAuthorizationStatus struct {
	Lark, Project LarkServiceAuthorization
}

type LarkDownloadProgress added in v1.5.145

type LarkDownloadProgress struct {
	Stage      string
	Source     string
	Downloaded int64
	Total      int64
}

LarkDownloadProgress is one downloader progress sample. Total is zero when the server does not announce a Content-Length.

type LarkRelease added in v1.5.62

type LarkRelease struct {
	Version     string
	Archive     string
	ArchiveURL  string
	ChecksumURL string
}

LarkRelease identifies the exact first-party helper package the operator is asked to approve. Discovery does not download or execute anything.

func LarkReleaseFor added in v1.5.62

func LarkReleaseFor(version string) (LarkRelease, error)

LarkReleaseFor reports official URLs for a Golder release and the independent Lark version contained in that release.

type LarkServiceAuthorization added in v1.5.78

type LarkServiceAuthorization struct {
	State             string // authorized, required, unavailable, or unknown
	MissingUserScopes []string
}

LarkServiceAuthorization describes only a bounded status probe. Unknown is deliberately distinct from requiring login: network and CLI failures must not trigger a new authorization flow.

type LarkSetup added in v1.5.62

type LarkSetup struct {
	Package     ManagedPackage
	LarkCLI     string
	ProjectCLI  string
	AppID       string
	AppSecret   string
	Domains     []string
	ProjectHost string
}

LarkSetup holds one transient operator-entered configuration. AppSecret is never put into the source table, transcript, command line or model context.

type LarkSourceOptions added in v1.5.49

type LarkSourceOptions struct {
	Package             ManagedPackage
	LarkCLI             string
	ProjectCLI          string
	AppID               string
	AppSecretCredential string
	Domains             []string
	ProjectHost         string
}

LarkSourceOptions is the non-secret configuration collected by the GUI. AppSecretCredential names a value in .credentials.yaml; no secret is accepted.

type MCPDraft added in v1.5.62

type MCPDraft struct {
	ID            string
	Transport     string
	Command       string
	Args          []string
	URL           string
	Network       bool
	OAuthClientID string
	OAuthIssuer   string
	Env           map[string]string `json:"-"`
	Headers       map[string]string `json:"-"`
}

MCPDraft is a transient operator-only import. Env and Headers may contain secrets and must never be logged, displayed in a transcript or marshalled.

func ParseMCPImport added in v1.5.62

func ParseMCPImport(raw string) ([]MCPDraft, error)

ParseMCPImport accepts an mcpServers object or one server object. It performs no I/O and never includes untrusted configuration values in errors.

func (MCPDraft) Validate added in v1.5.62

func (d MCPDraft) Validate() error

Validate is data-only. Local executable availability is checked when the manager fingerprints the source, never by executing it.

type MCPEdit added in v1.5.62

type MCPEdit struct {
	ID       string
	Revision string
	Config   SourceConfig
}

MCPEdit is an operator-only snapshot. Config can contain legacy literal secrets: callers may show keys, but must never render or log Env/Headers.

type ManagedPackage added in v1.5.49

type ManagedPackage struct {
	ID         string `json:"id"`
	Version    string `json:"version"`
	Executable string `json:"executable"`
	SHA256     string `json:"sha256"`
	Root       string `json:"root"`
}

ManagedPackage is one checksum-verified first-party helper installed below the protected Golder state root.

func InstallLarkRelease added in v1.5.62

func InstallLarkRelease(ctx context.Context, version string) (ManagedPackage, error)

InstallLarkRelease downloads the exact matching first-party release after an explicit operator decision and verifies the archive before installing it.

func InstallLarkReleaseWithProgress added in v1.5.145

func InstallLarkReleaseWithProgress(ctx context.Context, version string, progress func(LarkDownloadProgress)) (ManagedPackage, error)

InstallLarkReleaseWithProgress is InstallLarkRelease with byte progress. Progress callbacks run on the download goroutine and must not block.

func InstallManagedPackage added in v1.5.49

func InstallManagedPackage(opts PackageInstallOptions) (ManagedPackage, error)

InstallManagedPackage copies a signed-bundle helper into a versioned private directory and verifies its SHA-256 before the atomic directory rename.

func InstalledManagedPackage added in v1.5.49

func InstalledManagedPackage(id string) (ManagedPackage, bool)

InstalledManagedPackage returns the newest valid installed version.

func ManagedPackageForExecutable added in v1.5.55

func ManagedPackageForExecutable(id, executable string) (ManagedPackage, bool)

ManagedPackageForExecutable resolves an active Source command to the exact verified managed package it belongs to. It never trusts a version parsed from the path alone: package.json and the installed executable hash must validate.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(opts Options) (*Manager, error)

func (*Manager) AddLark added in v1.5.62

func (m *Manager) AddLark(ctx context.Context, setup LarkSetup) (err error)

AddLark writes one new, disabled Lark source after validating its installed helper and executable dependencies. Existing sources are never overwritten.

func (*Manager) AddMCP added in v1.5.62

func (m *Manager) AddMCP(d MCPDraft) (err error)

AddMCP persists one disabled source and its private values. It rejects an existing ID while holding the cross-process config lock. Each inline value gets a new, unshared credential so rollback cannot delete another source's. No program is started and no remote server is contacted.

func (*Manager) Approve

func (m *Manager) Approve(ref SourceRef) error

func (*Manager) ApproveSession

func (m *Manager) ApproveSession(ref SourceRef) error

ApproveSession must not become persistent when a later probe saves its catalog. Session admission and remembered trust are separate state.

func (*Manager) AuthorizeMCP added in v1.5.62

func (m *Manager) AuthorizeMCP(ctx context.Context, ref SourceRef, open mcpauth.Open) error

AuthorizeMCP runs an explicitly requested, operator-controlled OAuth flow. It is never called by tool execution or ordinary connection attempts.

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) Config

func (m *Manager) Config(ref SourceRef) (SourceConfig, error)

func (*Manager) ConfigureSource added in v1.5.49

func (m *Manager) ConfigureSource(ref SourceRef, cfg SourceConfig) error

ConfigureSource installs or replaces one already-reviewed source definition in this Manager. It does not approve, enable or execute the source. Callers persist the same definition with WriteSource first, so a process crash cannot leave an in-memory extension that the next launch does not know about.

func (*Manager) Connect

func (m *Manager) Connect(ctx context.Context, ref SourceRef) error

func (*Manager) Cwd

func (m *Manager) Cwd() string

func (*Manager) Disable

func (m *Manager) Disable(ref SourceRef) error

func (*Manager) DisableReviewedMCP added in v1.5.62

func (m *Manager) DisableReviewedMCP(edit MCPEdit) error

DisableReviewedMCP refuses to overwrite a newer source definition while persisting a disabled bit. Revocation precedes the disk update.

func (*Manager) Disconnect

func (m *Manager) Disconnect(ref SourceRef) error

func (*Manager) Enable

func (m *Manager) Enable(ref SourceRef) error

func (*Manager) EnableReviewedMCP added in v1.5.62

func (m *Manager) EnableReviewedMCP(edit MCPEdit, remember bool) error

EnableReviewedMCP approves exactly the definition reviewed by the operator. The disk comparison and optional enabled-bit write share one interprocess lock, so a concurrent settings edit cannot be silently overwritten.

func (*Manager) EnabledSourceConfig added in v1.5.49

func (m *Manager) EnabledSourceConfig(ref SourceRef, enabled bool) error

EnabledSourceConfig persists only the enabled bit of a source configuration. It is used after an explicit GUI/CLI approval, never during discovery.

func (*Manager) HasSource added in v1.5.49

func (m *Manager) HasSource(ref SourceRef) bool

HasSource reports whether a source identity is currently registered.

func (*Manager) KnownTools

func (m *Manager) KnownTools() []agentcore.AgentTool

KnownTools is used for validating explicit operator tool names before the allow/deny filter. It is never registered directly for execution.

func (*Manager) List

func (m *Manager) List() []Snapshot

func (*Manager) Logs

func (m *Manager) Logs(ref SourceRef) (string, error)

func (*Manager) Observe

func (m *Manager) Observe(ev agentcore.AgentEvent)

Observe only queues host-owned metadata. Message bodies, tool arguments and result text are never copied into an extension event subscription.

func (*Manager) PackageSkills

func (m *Manager) PackageSkills() map[string]string

PackageSkills returns only approved enabled package roots. Independent skills retain their existing discovery order and win same-name collisions upstream.

func (*Manager) PackageViews added in v1.5.45

func (m *Manager) PackageViews() []PackageView

PackageViews returns the small first-party package catalog. These rows make a shipped-but-unconfigured package discoverable without turning discovery into installation or source authority.

func (*Manager) PrepareMCPEdit added in v1.5.62

func (m *Manager) PrepareMCPEdit(id string) (MCPEdit, error)

PrepareMCPEdit reads the current disk definition and refuses to edit a source whose in-memory definition differs from a different process's edit.

func (*Manager) ProbeLarkAuthorization added in v1.5.78

func (m *Manager) ProbeLarkAuthorization(ctx context.Context) (LarkAuthorizationStatus, error)

ProbeLarkAuthorization is an operator-initiated, fixed read-only status call. It cannot invoke arbitrary tools or authorize writes and retains the normal source approval, sandbox, tool policy, lifetime and fingerprint checks.

func (*Manager) Prompt

func (m *Manager) Prompt(ctx context.Context, ref SourceRef, name string, args map[string]string) (string, error)

func (*Manager) Refresh

func (m *Manager) Refresh(ctx context.Context, ref SourceRef) error

func (*Manager) RefreshDirty

func (m *Manager) RefreshDirty(ctx context.Context)

RefreshDirty only uses already-established sessions. No new process or connection can be introduced by a list_changed notification.

func (*Manager) RefreshLiveState added in v1.5.110

func (m *Manager) RefreshLiveState()

RefreshLiveState re-reads the cheap facts a published snapshot cannot know: for a call-scoped source, whether its shared login-state lock is held right now by this or another session. It starts no child process and makes no network call, so a list view may call it on open. Personal authorization is still the explicit, operator-initiated ProbeLarkAuthorization.

func (*Manager) RemoveMCP added in v1.5.62

func (m *Manager) RemoveMCP(edit MCPEdit) error

RemoveMCP deletes only the confirmed current source definition and live source. Shared named credentials and source-scoped login state are retained.

func (*Manager) RemoveSource added in v1.5.49

func (m *Manager) RemoveSource(ref SourceRef) error

RemoveSource forgets one live source after disconnecting it. Persistent login state is intentionally separate: Reset is the explicit destructive action.

func (*Manager) ReplaceReviewedMCP added in v1.5.62

func (m *Manager) ReplaceReviewedMCP(edit MCPEdit, cfg SourceConfig) error

ReplaceReviewedMCP atomically replaces a complete reviewed definition. The new configuration is disabled and must receive a new approval.

func (*Manager) ReplaceSourceConfig added in v1.5.55

func (m *Manager) ReplaceSourceConfig(ref SourceRef, cfg SourceConfig) error

ReplaceSourceConfig persists and activates one replacement definition. The resulting Source is always disabled and unapproved; private state_dir data and named credentials are outside the definition and are deliberately untouched.

func (*Manager) Reset added in v1.5.16

func (m *Manager) Reset(ref SourceRef) error

Reset clears only this source HOME, with its persistent parent lock retained. The caller must obtain a separate explicit operator confirmation.

func (*Manager) Resource

func (m *Manager) Resource(ctx context.Context, ref SourceRef, uri string) (string, error)

func (*Manager) Revision

func (m *Manager) Revision() uint64

func (*Manager) SetSkillEnabled

func (m *Manager) SetSkillEnabled(name string, enabled bool) bool

func (*Manager) SetSkills

func (m *Manager) SetSkills(skills []*runtime.Skill, off bool)

func (*Manager) Setup added in v1.5.16

func (m *Manager) Setup(ctx context.Context, ref SourceRef, show func(setupevent.Event) error) error

Setup is an explicit operator action, never a model tool or handshake side effect. Its callback runs as events arrive, while the child keeps polling.

func (*Manager) SetupVariant added in v1.5.16

func (m *Manager) SetupVariant(ctx context.Context, ref SourceRef, variant string, show func(setupevent.Event) error) error

func (*Manager) Skill

func (m *Manager) Skill(name string) *runtime.Skill

func (*Manager) SkillRoots

func (m *Manager) SkillRoots() []string

func (*Manager) SkillViews

func (m *Manager) SkillViews() []SkillView

func (*Manager) Skills

func (m *Manager) Skills() []*runtime.Skill

func (*Manager) Source added in v1.5.49

func (m *Manager) Source(ref SourceRef) (Snapshot, bool)

Source returns one safe snapshot, or false when it is not configured.

func (*Manager) Tools

func (m *Manager) Tools() []agentcore.AgentTool

func (*Manager) UpdateMCPTarget added in v1.5.62

func (m *Manager) UpdateMCPTarget(edit MCPEdit, draft MCPDraft) error

UpdateMCPTarget replaces the reviewed connection and environment/header values while retaining advanced source capabilities. An edit always disables the source and invalidates its previous approval.

type OfficialCLI added in v1.5.57

type OfficialCLI struct {
	Kind       OfficialCLIKind
	Version    string
	Executable string
}

func DiscoverOfficialCLI added in v1.5.57

func DiscoverOfficialCLI(kind OfficialCLIKind, preferred string) (OfficialCLI, bool)

type OfficialCLIInstallProgress added in v1.5.74

type OfficialCLIInstallProgress struct {
	Kind       OfficialCLIKind
	Phase      string // checking, connecting, downloading, verifying, extracting, installing, complete
	Downloaded int64
	Total      int64
}

OfficialCLIInstallProgress contains no credentials, URLs or archive content. Total is zero when the server does not advertise a download size. Downloaded measures archive bytes, not verification or installation completion.

type OfficialCLIInstallSpec added in v1.5.57

type OfficialCLIInstallSpec struct {
	Version     string
	ArchiveURL  string
	SHA256      string
	SHA512      string
	ArchivePath string
	BinaryName  string
}

type OfficialCLIInstaller added in v1.5.57

type OfficialCLIInstaller struct {
	Client *http.Client
	Root   string
	GOOS   string
	GOARCH string
	Specs  map[OfficialCLIKind]OfficialCLIInstallSpec
	// Progress is called synchronously on the installing goroutine. Callers
	// dispatch UI updates themselves; callbacks must not block the download.
	Progress            func(OfficialCLIInstallProgress)
	AllowHTTP           bool // tests only
	SkipCommonDiscovery bool // tests only
}

func NewOfficialCLIInstaller added in v1.5.57

func NewOfficialCLIInstaller() *OfficialCLIInstaller

func (*OfficialCLIInstaller) Discover added in v1.5.57

func (i *OfficialCLIInstaller) Discover(kind OfficialCLIKind, preferred string) (OfficialCLI, bool)

func (*OfficialCLIInstaller) Install added in v1.5.57

type OfficialCLIKind added in v1.5.57

type OfficialCLIKind string
const (
	OfficialLarkCLI    OfficialCLIKind = "lark-cli"
	OfficialProjectCLI OfficialCLIKind = "meegle"
)

type Options

type Options struct {
	Cwd           string
	ConfigPath    string
	Allow         func(string) bool
	Permissions   *permissions.State
	NoTools       bool
	IgnoreSources bool // embedders opt in separately from built-in tools
}

type PackageInstallOptions added in v1.5.49

type PackageInstallOptions struct {
	ID      string
	Version string
	Source  string
	SHA256  string
}

PackageInstallOptions is fixed by the signed GUI package. ID is checked against the first-party registry; Source and SHA256 must refer to the bundled helper, never a URL or model-provided path.

type PackageView added in v1.5.45

type PackageView struct {
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	Type        string    `json:"type"`
	Description string    `json:"description"`
	Source      SourceRef `json:"source"`
	State       string    `json:"state"`
	Executable  string    `json:"executable,omitempty"`
	Version     string    `json:"version,omitempty"`
	Configured  bool      `json:"configured"`
	NextAction  string    `json:"next_action"`
	Docs        string    `json:"docs"`
}

PackageView is a first-party extension package Golder knows how to host but never installs, registers, enables or executes by discovery alone.

type SkillView

type SkillView struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Path        string `json:"path"`
	State       string `json:"state"`
	ProvidedBy  string `json:"provided_by,omitempty"`
}

type Snapshot

type Snapshot struct {
	Ref            SourceRef `json:"source"`
	Type           string    `json:"type"`
	Enabled        bool      `json:"enabled"`
	Trust          string    `json:"trust"`
	State          string    `json:"state"`
	Authentication string    `json:"authentication"`
	Endpoint       string    `json:"endpoint,omitempty"`
	Version        string    `json:"version,omitempty"`
	Protocol       string    `json:"protocol,omitempty"`
	LastError      string    `json:"last_error,omitempty"`
	// LastErrorScope and LastErrorAt describe the last failed attempt
	// (connect, call, catalog or event) and when it happened. They are history:
	// State is the current readiness, and a successful attempt clears all three.
	LastErrorScope string     `json:"last_error_scope,omitempty"`
	LastErrorAt    *time.Time `json:"last_error_at,omitempty"`
	// Busy is a live, point-in-time fact for call-scoped sources: the shared
	// login-state lock is held right now (by this process or another session).
	Busy         bool           `json:"busy,omitempty"`
	Tools        []ToolView     `json:"tools"`
	Commands     []Item         `json:"commands,omitempty"`
	Events       []string       `json:"events,omitempty"`
	Prompts      []Item         `json:"prompts,omitempty"`
	Resources    []Item         `json:"resources,omitempty"`
	Revision     uint64         `json:"revision"`
	Capabilities map[string]any `json:"capabilities,omitempty"`
}

type SourceConfig

type SourceConfig struct {
	Enabled         bool                `toml:"enabled" json:"enabled"`
	Runtime         string              `toml:"runtime,omitempty" json:"runtime,omitempty"`
	Manifest        string              `toml:"manifest,omitempty" json:"manifest,omitempty"`
	Transport       string              `toml:"transport,omitempty" json:"transport,omitempty"`
	Command         string              `toml:"command,omitempty" json:"command,omitempty"`
	Args            []string            `toml:"args,omitempty" json:"args,omitempty"`
	URL             string              `toml:"url,omitempty" json:"url,omitempty"`
	Dir             string              `toml:"dir,omitempty" json:"dir,omitempty"`
	Env             map[string]string   `toml:"env,omitempty" json:"env,omitempty"`
	EnvPassthrough  []string            `toml:"env_passthrough,omitempty" json:"env_passthrough,omitempty"`
	Headers         map[string]string   `toml:"headers,omitempty" json:"headers,omitempty"`
	OAuthClientID   string              `toml:"oauth_client_id,omitempty" json:"oauth_client_id,omitempty"`
	OAuthIssuer     string              `toml:"oauth_issuer,omitempty" json:"oauth_issuer,omitempty"`
	AllowedTools    []string            `toml:"allowed_tools,omitempty" json:"allowed_tools,omitempty"`
	DisallowedTools []string            `toml:"disallowed_tools,omitempty" json:"disallowed_tools,omitempty"`
	StartupTimeout  string              `toml:"startup_timeout,omitempty" json:"startup_timeout,omitempty"`
	CallTimeout     string              `toml:"call_timeout,omitempty" json:"call_timeout,omitempty"`
	Network         bool                `toml:"network,omitempty" json:"network,omitempty"`
	StateDir        bool                `toml:"state_dir,omitempty" json:"state_dir,omitempty"`
	Setup           []string            `toml:"setup,omitempty" json:"setup,omitempty"`
	SetupVariants   map[string][]string `toml:"setup_variants,omitempty" json:"setup_variants,omitempty"`
	SetupOrigins    []string            `toml:"setup_origins,omitempty" json:"setup_origins,omitempty"`
	Executables     []string            `toml:"executables,omitempty" json:"executables,omitempty"`
	Skills          string              `toml:"skills,omitempty" json:"skills,omitempty"`
	ConfirmTools    []string            `toml:"confirm_tools,omitempty" json:"confirm_tools,omitempty"`
	AggregateTools  []string            `toml:"aggregate_tools,omitempty" json:"aggregate_tools,omitempty"`
	// contains filtered or unexported fields
}

SourceConfig is an operator declaration, never a model argument. Network is the immutable launch ceiling of a local process, not a per-call grant.

func LarkSourceConfig added in v1.5.49

func LarkSourceConfig(opts LarkSourceOptions) (SourceConfig, error)

LarkSourceConfig builds the fixed first-party source declaration. The only variable executable paths are explicit native CLI selections included in the fingerprint and sandbox capability list.

func LarkSourceConfigFromExisting added in v1.5.136

func LarkSourceConfigFromExisting(pkg ManagedPackage, current SourceConfig) (SourceConfig, error)

LarkSourceConfigFromExisting rebuilds a Lark declaration around a newly installed helper. Every non-secret setting, the named App Secret credential reference and the source-scoped login state are preserved.

type SourceRef

type SourceRef = extension.SourceRef

type ToolView

type ToolView struct {
	Spec      extension.ToolSpec `json:"spec"`
	ModelName string             `json:"model_name"`
	State     string             `json:"state"`
	Reason    string             `json:"reason,omitempty"`
}

Jump to

Keyboard shortcuts

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