{"modulePath":"github.com/wavetermdev/waveterm","version":"v0.14.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package waveobj\n\n## Constants\n\n```go\nconst (\n\tMetaKey_View = \"view\"\n\n\tMetaKey_Controller = \"controller\"\n\n\tMetaKey_File = \"file\"\n\n\tMetaKey_Url = \"url\"\n\n\tMetaKey_PinnedUrl = \"pinnedurl\"\n\n\tMetaKey_Connection = \"connection\"\n\n\tMetaKey_Edit = \"edit\"\n\n\tMetaKey_History        = \"history\"\n\tMetaKey_HistoryForward = \"history:forward\"\n\n\tMetaKey_DisplayName  = \"display:name\"\n\tMetaKey_DisplayOrder = \"display:order\"\n\n\tMetaKey_Icon      = \"icon\"\n\tMetaKey_IconColor = \"icon:color\"\n\n\tMetaKey_FrameClear             = \"frame:*\"\n\tMetaKey_Frame                  = \"frame\"\n\tMetaKey_FrameBorderColor       = \"frame:bordercolor\"\n\tMetaKey_FrameActiveBorderColor = \"frame:activebordercolor\"\n\tMetaKey_FrameTitle             = \"frame:title\"\n\tMetaKey_FrameIcon              = \"frame:icon\"\n\tMetaKey_FrameText              = \"frame:text\"\n\n\tMetaKey_CmdClear            = \"cmd:*\"\n\tMetaKey_Cmd                 = \"cmd\"\n\tMetaKey_CmdInteractive      = \"cmd:interactive\"\n\tMetaKey_CmdLogin            = \"cmd:login\"\n\tMetaKey_CmdPersistent       = \"cmd:persistent\"\n\tMetaKey_CmdRunOnStart       = \"cmd:runonstart\"\n\tMetaKey_CmdClearOnStart     = \"cmd:clearonstart\"\n\tMetaKey_CmdRunOnce          = \"cmd:runonce\"\n\tMetaKey_CmdCloseOnExit      = \"cmd:closeonexit\"\n\tMetaKey_CmdCloseOnExitForce = \"cmd:closeonexitforce\"\n\tMetaKey_CmdCloseOnExitDelay = \"cmd:closeonexitdelay\"\n\tMetaKey_CmdNoWsh            = \"cmd:nowsh\"\n\tMetaKey_CmdArgs             = \"cmd:args\"\n\tMetaKey_CmdShell            = \"cmd:shell\"\n\tMetaKey_CmdAllowConnChange  = \"cmd:allowconnchange\"\n\tMetaKey_CmdJwt              = \"cmd:jwt\"\n\tMetaKey_CmdEnv              = \"cmd:env\"\n\tMetaKey_CmdCwd              = \"cmd:cwd\"\n\tMetaKey_CmdInitScript       = \"cmd:initscript\"\n\tMetaKey_CmdInitScriptSh     = \"cmd:initscript.sh\"\n\tMetaKey_CmdInitScriptBash   = \"cmd:initscript.bash\"\n\tMetaKey_CmdInitScriptZsh    = \"cmd:initscript.zsh\"\n\tMetaKey_CmdInitScriptPwsh   = \"cmd:initscript.pwsh\"\n\tMetaKey_CmdInitScriptFish   = \"cmd:initscript.fish\"\n\n\tMetaKey_AiClear      = \"ai:*\"\n\tMetaKey_AiPresetKey  = \"ai:preset\"\n\tMetaKey_AiApiType    = \"ai:apitype\"\n\tMetaKey_AiBaseURL    = \"ai:baseurl\"\n\tMetaKey_AiApiToken   = \"ai:apitoken\"\n\tMetaKey_AiName       = \"ai:name\"\n\tMetaKey_AiModel      = \"ai:model\"\n\tMetaKey_AiOrgID      = \"ai:orgid\"\n\tMetaKey_AIApiVersion = \"ai:apiversion\"\n\tMetaKey_AiMaxTokens  = \"ai:maxtokens\"\n\tMetaKey_AiTimeoutMs  = \"ai:timeoutms\"\n\n\tMetaKey_AiFileDiffChatId     = \"aifilediff:chatid\"\n\tMetaKey_AiFileDiffToolCallId = \"aifilediff:toolcallid\"\n\n\tMetaKey_EditorClear               = \"editor:*\"\n\tMetaKey_EditorMinimapEnabled      = \"editor:minimapenabled\"\n\tMetaKey_EditorStickyScrollEnabled = \"editor:stickyscrollenabled\"\n\tMetaKey_EditorWordWrap            = \"editor:wordwrap\"\n\tMetaKey_EditorFontSize            = \"editor:fontsize\"\n\n\tMetaKey_GraphClear     = \"graph:*\"\n\tMetaKey_GraphNumPoints = \"graph:numpoints\"\n\tMetaKey_GraphMetrics   = \"graph:metrics\"\n\n\tMetaKey_SysinfoType = \"sysinfo:type\"\n\n\tMetaKey_TabFlagColor  = \"tab:flagcolor\"\n\tMetaKey_TabBackground = \"tab:background\"\n\n\tMetaKey_BgClear             = \"bg:*\"\n\tMetaKey_Bg                  = \"bg\"\n\tMetaKey_BgOpacity           = \"bg:opacity\"\n\tMetaKey_BgBlendMode         = \"bg:blendmode\"\n\tMetaKey_BgBorderColor       = \"bg:bordercolor\"\n\tMetaKey_BgActiveBorderColor = \"bg:activebordercolor\"\n\n\tMetaKey_LayoutVTabBarWidth   = \"layout:vtabbarwidth\"\n\tMetaKey_LayoutWidgetsVisible = \"layout:widgetsvisible\"\n\n\tMetaKey_WaveAiPanelOpen     = \"waveai:panelopen\"\n\tMetaKey_WaveAiPanelWidth    = \"waveai:panelwidth\"\n\tMetaKey_WaveAiModel         = \"waveai:model\"\n\tMetaKey_WaveAiChatId        = \"waveai:chatid\"\n\tMetaKey_WaveAiWidgetContext = \"waveai:widgetcontext\"\n\n\tMetaKey_TermClear               = \"term:*\"\n\tMetaKey_TermFontSize            = \"term:fontsize\"\n\tMetaKey_TermFontFamily          = \"term:fontfamily\"\n\tMetaKey_TermMode                = \"term:mode\"\n\tMetaKey_TermTheme               = \"term:theme\"\n\tMetaKey_TermLocalShellPath      = \"term:localshellpath\"\n\tMetaKey_TermLocalShellOpts      = \"term:localshellopts\"\n\tMetaKey_TermScrollback          = \"term:scrollback\"\n\tMetaKey_TermVDomSubBlockId      = \"term:vdomblockid\"\n\tMetaKey_TermVDomToolbarBlockId  = \"term:vdomtoolbarblockid\"\n\tMetaKey_TermTransparency        = \"term:transparency\"\n\tMetaKey_TermAllowBracketedPaste = \"term:allowbracketedpaste\"\n\tMetaKey_TermShiftEnterNewline   = \"term:shiftenternewline\"\n\tMetaKey_TermMacOptionIsMeta     = \"term:macoptionismeta\"\n\tMetaKey_TermCursor              = \"term:cursor\"\n\tMetaKey_TermCursorBlink         = \"term:cursorblink\"\n\tMetaKey_TermConnDebug           = \"term:conndebug\"\n\tMetaKey_TermBellSound           = \"term:bellsound\"\n\tMetaKey_TermBellIndicator       = \"term:bellindicator\"\n\tMetaKey_TermOsc52               = \"term:osc52\"\n\tMetaKey_TermDurable             = \"term:durable\"\n\n\tMetaKey_WebZoom          = \"web:zoom\"\n\tMetaKey_WebHideNav       = \"web:hidenav\"\n\tMetaKey_WebPartition     = \"web:partition\"\n\tMetaKey_WebUserAgentType = \"web:useragenttype\"\n\n\tMetaKey_MarkdownFontSize      = \"markdown:fontsize\"\n\tMetaKey_MarkdownFixedFontSize = \"markdown:fixedfontsize\"\n\n\tMetaKey_TsunamiClear          = \"tsunami:*\"\n\tMetaKey_TsunamiSdkReplacePath = \"tsunami:sdkreplacepath\"\n\tMetaKey_TsunamiAppPath        = \"tsunami:apppath\"\n\tMetaKey_TsunamiAppId          = \"tsunami:appid\"\n\tMetaKey_TsunamiScaffoldPath   = \"tsunami:scaffoldpath\"\n\tMetaKey_TsunamiEnv            = \"tsunami:env\"\n\n\tMetaKey_VDomClear         = \"vdom:*\"\n\tMetaKey_VDomInitialized   = \"vdom:initialized\"\n\tMetaKey_VDomCorrelationId = \"vdom:correlationid\"\n\tMetaKey_VDomRoute         = \"vdom:route\"\n\tMetaKey_VDomPersist       = \"vdom:persist\"\n\n\tMetaKey_OnboardingGithubStar  = \"onboarding:githubstar\"\n\tMetaKey_OnboardingLastVersion = \"onboarding:lastversion\"\n\n\tMetaKey_Count = \"count\"\n)\n```\n\n```go\nconst (\n\tOTypeKeyName   = \"otype\"\n\tOIDKeyName     = \"oid\"\n\tVersionKeyName = \"version\"\n\tMetaKeyName    = \"meta\"\n\n\tOIDGoFieldName     = \"OID\"\n\tVersionGoFieldName = \"Version\"\n\tMetaGoFieldName    = \"Meta\"\n)\n```\n\n```go\nconst (\n\tUpdateType_Update = \"update\"\n\tUpdateType_Delete = \"delete\"\n)\n```\n\n```go\nconst (\n\tOType_Client      = \"client\"\n\tOType_Window      = \"window\"\n\tOType_Workspace   = \"workspace\"\n\tOType_Tab         = \"tab\"\n\tOType_LayoutState = \"layout\"\n\tOType_Block       = \"block\"\n\tOType_MainServer  = \"mainserver\"\n\tOType_Job         = \"job\"\n\tOType_Temp        = \"temp\"\n\tOType_Builder     = \"builder\" // not persisted to DB\n)\n```\n\n```go\nconst Entity_Any = \"any\"\n```\n\n## Variables\n\n```go\nvar MetaMap_DeleteSentinel = uuid.NewString()\n```\n\n```go\nvar ValidOTypes = map[string]bool{\n\tOType_Client:      true,\n\tOType_Window:      true,\n\tOType_Workspace:   true,\n\tOType_Tab:         true,\n\tOType_LayoutState: true,\n\tOType_Block:       true,\n\tOType_MainServer:  true,\n\tOType_Job:         true,\n\tOType_Temp:        true,\n\tOType_Builder:     true,\n}\n```\n\n## Functions\n\n```go\nfunc AllWaveObjTypes() []reflect.Type\n```\n\n```go\nfunc ContextAddUpdate(ctx context.Context, update WaveObjUpdate)\n```\n\n```go\nfunc ContextGetUpdates(ctx context.Context) map[ORef]WaveObjUpdate\n```\n\n```go\nfunc ContextPrintUpdates(ctx context.Context)\n```\n\n```go\nfunc ContextUpdatesBeginTx(ctx context.Context) context.Context\n```\n\n```go\nfunc ContextUpdatesCommitTx(ctx context.Context)\n```\n\n```go\nfunc ContextUpdatesRollbackTx(ctx context.Context)\n```\n\n```go\nfunc ContextWithUpdates(ctx context.Context) context.Context\n```\n\n```go\nfunc FromJsonGen[T WaveObj](data []byte) (T, error)\n```\n\n```go\nfunc GetOID(waveObj WaveObj) string\n```\n\n```go\nfunc GetVersion(waveObj WaveObj) int\n```\n\n```go\nfunc RegisterType(rtype reflect.Type)\n```\n\n```go\nfunc SetMeta(waveObj WaveObj, meta map[string]any)\n```\n\n```go\nfunc SetOID(waveObj WaveObj, oid string)\n```\n\n```go\nfunc SetVersion(waveObj WaveObj, version int)\n```\n\n```go\nfunc ToJson(w WaveObj) ([]byte, error)\n```\n\n```go\nfunc ToJsonMap(w WaveObj) (map[string]any, error)\n```\n\n## Types\n\n```go\ntype ActiveTabUpdate struct {\n\tWorkspaceId    string `json:\"workspaceid\"`\n\tNewActiveTabId string `json:\"newactivetabid\"`\n}\n```\n\n```go\ntype Block struct {\n\tOID         string         `json:\"oid\"`\n\tParentORef  string         `json:\"parentoref,omitempty\"`\n\tVersion     int            `json:\"version\"`\n\tRuntimeOpts *RuntimeOpts   `json:\"runtimeopts,omitempty\"`\n\tStickers    []*StickerType `json:\"stickers,omitempty\"`\n\tMeta        MetaMapType    `json:\"meta\"`\n\tSubBlockIds []string       `json:\"subblockids,omitempty\"`\n\tJobId       string         `json:\"jobid,omitempty\"` // if set, the block will render this jobid's pty output\n}\n```\n\n```go\nfunc (*Block) GetOType() string\n```\n\n```go\ntype BlockDef struct {\n\tFiles map[string]*FileDef `json:\"files,omitempty\"`\n\tMeta  MetaMapType         `json:\"meta,omitempty\"`\n}\n```\n\n```go\ntype Client struct {\n\tOID           string      `json:\"oid\"`\n\tVersion       int         `json:\"version\"`\n\tWindowIds     []string    `json:\"windowids\"`\n\tMeta          MetaMapType `json:\"meta\"`\n\tTosAgreed     int64       `json:\"tosagreed,omitempty\"` // unix milli\n\tHasOldHistory bool        `json:\"hasoldhistory,omitempty\"`\n\tTempOID       string      `json:\"tempoid,omitempty\"`\n\tInstallId     string      `json:\"installid,omitempty\"`\n}\n```\n\n```go\nfunc (*Client) GetOType() string\n```\n\n```go\ntype FileDef struct {\n\tContent string         `json:\"content,omitempty\"`\n\tMeta    map[string]any `json:\"meta,omitempty\"`\n}\n```\n\n```go\ntype Job struct {\n\tOID     string `json:\"oid\"`\n\tVersion int    `json:\"version\"`\n\n\t// job metadata\n\tConnection      string            `json:\"connection\"`\n\tJobKind         string            `json:\"jobkind\"` // shell, task\n\tCmd             string            `json:\"cmd\"`\n\tCmdArgs         []string          `json:\"cmdargs,omitempty\"`\n\tCmdEnv          map[string]string `json:\"cmdenv,omitempty\"`\n\tJobAuthToken    string            `json:\"jobauthtoken\"` // job manger -\u003e wave\n\tAttachedBlockId string            `json:\"attachedblockid,omitempty\"`\n\tWaveVersion     string            `json:\"waveversion,omitempty\"`\n\n\t// reconnect option (e.g. orphaned, so we need to kill on connect)\n\tTerminateOnReconnect bool `json:\"terminateonreconnect,omitempty\"`\n\n\t// job manager state\n\tJobManagerStatus       string `json:\"jobmanagerstatus\"`               // init, running, done\n\tJobManagerDoneReason   string `json:\"jobmanagerdonereason,omitempty\"` // startuperror, gone, terminated\n\tJobManagerStartupError string `json:\"jobmanagerstartuperror,omitempty\"`\n\tJobManagerPid          int    `json:\"jobmanagerpid,omitempty\"`\n\tJobManagerStartTs      int64  `json:\"jobmanagerstartts,omitempty\"` // exact process start time (milliseconds)\n\n\t// cmd/process runtime info\n\tCmdPid        int      `json:\"cmdpid,omitempty\"`     // command process id\n\tCmdStartTs    int64    `json:\"cmdstartts,omitempty\"` // exact command process start time (milliseconds from epoch)\n\tCmdTermSize   TermSize `json:\"cmdtermsize\"`\n\tCmdExitTs     int64    `json:\"cmdexitts,omitempty\"`     // timestamp (milliseconds) -- use CmdExitTs \u003e 0 to check if command has exited\n\tCmdExitCode   *int     `json:\"cmdexitcode,omitempty\"`   // nil when CmdExitSignal is set.  success exit is when CmdExitCode is 0\n\tCmdExitSignal string   `json:\"cmdexitsignal,omitempty\"` // empty string if CmdExitCode is set\n\tCmdExitError  string   `json:\"cmdexiterror,omitempty\"`\n\n\t// output info\n\tStreamDone  bool   `json:\"streamdone,omitempty\"`\n\tStreamError string `json:\"streamerror,omitempty\"`\n\n\tMeta MetaMapType `json:\"meta\"`\n}\n```\n\n```go\nfunc (*Job) GetOType() string\n```\n\n```go\ntype LayoutActionData struct {\n\tActionType    string `json:\"actiontype\"`\n\tActionId      string `json:\"actionid\"`\n\tBlockId       string `json:\"blockid\"`\n\tNodeSize      *uint  `json:\"nodesize,omitempty\"`\n\tIndexArr      *[]int `json:\"indexarr,omitempty\"`\n\tFocused       bool   `json:\"focused\"`\n\tMagnified     bool   `json:\"magnified\"`\n\tEphemeral     bool   `json:\"ephemeral\"`\n\tTargetBlockId string `json:\"targetblockid,omitempty\"`\n\tPosition      string `json:\"position,omitempty\"`\n}\n```\n\n```go\ntype LayoutState struct {\n\tOID                   string              `json:\"oid\"`\n\tVersion               int                 `json:\"version\"`\n\tRootNode              any                 `json:\"rootnode,omitempty\"`\n\tMagnifiedNodeId       string              `json:\"magnifiednodeid,omitempty\"`\n\tFocusedNodeId         string              `json:\"focusednodeid,omitempty\"`\n\tLeafOrder             *[]LeafOrderEntry   `json:\"leaforder,omitempty\"`\n\tPendingBackendActions *[]LayoutActionData `json:\"pendingbackendactions,omitempty\"`\n\tMeta                  MetaMapType         `json:\"meta,omitempty\"`\n}\n```\n\n```go\nfunc (*LayoutState) GetOType() string\n```\n\n```go\ntype LeafOrderEntry struct {\n\tNodeId  string `json:\"nodeid\"`\n\tBlockId string `json:\"blockid\"`\n}\n```\n\n```go\ntype MainServer struct {\n\tOID           string      `json:\"oid\"`\n\tVersion       int         `json:\"version\"`\n\tMeta          MetaMapType `json:\"meta\"`\n\tJwtPrivateKey string      `json:\"jwtprivatekey\"` // base64\n\tJwtPublicKey  string      `json:\"jwtpublickey\"`  // base64\n}\n```\n\n```go\nfunc (*MainServer) GetOType() string\n```\n\n```go\ntype MetaDataDecl struct {\n\tKey        string   `json:\"key\"`\n\tDesc       string   `json:\"desc,omitempty\"`\n\tType       string   `json:\"type\"` // string, int, float, bool, array, object\n\tDefault    any      `json:\"default,omitempty\"`\n\tStrOptions []string `json:\"stroptions,omitempty\"`\n\tNumRange   []*int   `json:\"numrange,omitempty\"` // inclusive, null means no limit\n\tEntity     []string `json:\"entity\"`             // what entities this applies to, e.g. \"block\", \"tab\", \"any\", etc.\n\tSpecial    []string `json:\"special,omitempty\"`  // special handling.  things that need to happen if this gets updated\n}\n```\n\n```go\ntype MetaMapType map[string]any\n```\n\n```go\nfunc GetMeta(waveObj WaveObj) MetaMapType\n```\n\n```go\nfunc MergeMeta(meta MetaMapType, metaUpdate MetaMapType, mergeSpecial bool) MetaMapType\n```\nreturns a clean copy of meta with mergeMeta merged in if mergeSpecial is false, then special keys will not be merged (like display:\\*)\n\n```go\nfunc (m MetaMapType) GetArray(key string) []any\n```\n\n```go\nfunc (m MetaMapType) GetBool(key string, def bool) bool\n```\n\n```go\nfunc (m MetaMapType) GetConnectionOverride(connName string) MetaMapType\n```\n\n```go\nfunc (m MetaMapType) GetFloat(key string, def float64) float64\n```\n\n```go\nfunc (m MetaMapType) GetInt(key string, def int) int\n```\n\n```go\nfunc (m MetaMapType) GetMap(key string) MetaMapType\n```\n\n```go\nfunc (m MetaMapType) GetString(key string, def string) string\n```\n\n```go\nfunc (m MetaMapType) GetStringArray(key string) []string\n```\n\n```go\nfunc (m MetaMapType) GetStringList(key string) []string\n```\n\n```go\nfunc (m MetaMapType) GetStringMap(key string, useDeleteSentinel bool) map[string]string\n```\n\n```go\nfunc (m MetaMapType) HasKey(key string) bool\n```\n\n```go\ntype MetaPresetDecl struct {\n\tPreset string   `json:\"preset\"`\n\tDesc   string   `json:\"desc,omitempty\"`\n\tKeys   []string `json:\"keys\"`\n\tEntity []string `json:\"entity\"` // what entities this applies to, e.g. \"block\", \"tab\", etc.\n}\n```\n\n```go\ntype MetaTSType struct {\n\t// shared\n\tView           string   `json:\"view,omitempty\"`\n\tController     string   `json:\"controller,omitempty\"`\n\tFile           string   `json:\"file,omitempty\"`\n\tUrl            string   `json:\"url,omitempty\"`\n\tPinnedUrl      string   `json:\"pinnedurl,omitempty\"`\n\tConnection     string   `json:\"connection,omitempty\"`\n\tEdit           bool     `json:\"edit,omitempty\"`\n\tHistory        []string `json:\"history,omitempty\"`\n\tHistoryForward []string `json:\"history:forward,omitempty\"`\n\n\tDisplayName  string  `json:\"display:name,omitempty\"`\n\tDisplayOrder float64 `json:\"display:order,omitempty\"`\n\n\tIcon      string `json:\"icon,omitempty\"`\n\tIconColor string `json:\"icon:color,omitempty\"`\n\n\tFrameClear             bool   `json:\"frame:*,omitempty\"`\n\tFrame                  bool   `json:\"frame,omitempty\"`\n\tFrameBorderColor       string `json:\"frame:bordercolor,omitempty\"`\n\tFrameActiveBorderColor string `json:\"frame:activebordercolor,omitempty\"`\n\tFrameTitle             string `json:\"frame:title,omitempty\"`\n\tFrameIcon              string `json:\"frame:icon,omitempty\"`\n\tFrameText              string `json:\"frame:text,omitempty\"`\n\n\tCmdClear            bool     `json:\"cmd:*,omitempty\"`\n\tCmd                 string   `json:\"cmd,omitempty\"`\n\tCmdInteractive      bool     `json:\"cmd:interactive,omitempty\"`\n\tCmdLogin            bool     `json:\"cmd:login,omitempty\"`\n\tCmdPersistent       bool     `json:\"cmd:persistent,omitempty\"`\n\tCmdRunOnStart       bool     `json:\"cmd:runonstart,omitempty\"`\n\tCmdClearOnStart     bool     `json:\"cmd:clearonstart,omitempty\"`\n\tCmdRunOnce          bool     `json:\"cmd:runonce,omitempty\"`\n\tCmdCloseOnExit      bool     `json:\"cmd:closeonexit,omitempty\"`\n\tCmdCloseOnExitForce bool     `json:\"cmd:closeonexitforce,omitempty\"`\n\tCmdCloseOnExitDelay float64  `json:\"cmd:closeonexitdelay,omitempty\"`\n\tCmdNoWsh            bool     `json:\"cmd:nowsh,omitempty\"`\n\tCmdArgs             []string `json:\"cmd:args,omitempty\"`  // args for cmd (only if cmd:shell is false)\n\tCmdShell            bool     `json:\"cmd:shell,omitempty\"` // shell expansion for cmd+args (defaults to true)\n\tCmdAllowConnChange  bool     `json:\"cmd:allowconnchange,omitempty\"`\n\tCmdJwt              bool     `json:\"cmd:jwt,omitempty\"` // force adding JWT to environment\n\n\t// these can be nested under \"[conn]\"\n\tCmdEnv            map[string]string `json:\"cmd:env,omitempty\"`\n\tCmdCwd            string            `json:\"cmd:cwd,omitempty\"`\n\tCmdInitScript     string            `json:\"cmd:initscript,omitempty\"`\n\tCmdInitScriptSh   string            `json:\"cmd:initscript.sh,omitempty\"`\n\tCmdInitScriptBash string            `json:\"cmd:initscript.bash,omitempty\"`\n\tCmdInitScriptZsh  string            `json:\"cmd:initscript.zsh,omitempty\"`\n\tCmdInitScriptPwsh string            `json:\"cmd:initscript.pwsh,omitempty\"`\n\tCmdInitScriptFish string            `json:\"cmd:initscript.fish,omitempty\"`\n\n\t// AI options match settings\n\tAiClear      bool    `json:\"ai:*,omitempty\"`\n\tAiPresetKey  string  `json:\"ai:preset,omitempty\"`\n\tAiApiType    string  `json:\"ai:apitype,omitempty\"`\n\tAiBaseURL    string  `json:\"ai:baseurl,omitempty\"`\n\tAiApiToken   string  `json:\"ai:apitoken,omitempty\"`\n\tAiName       string  `json:\"ai:name,omitempty\"`\n\tAiModel      string  `json:\"ai:model,omitempty\"`\n\tAiOrgID      string  `json:\"ai:orgid,omitempty\"`\n\tAIApiVersion string  `json:\"ai:apiversion,omitempty\"`\n\tAiMaxTokens  float64 `json:\"ai:maxtokens,omitempty\"`\n\tAiTimeoutMs  float64 `json:\"ai:timeoutms,omitempty\"`\n\n\tAiFileDiffChatId     string `json:\"aifilediff:chatid,omitempty\"`\n\tAiFileDiffToolCallId string `json:\"aifilediff:toolcallid,omitempty\"`\n\n\tEditorClear               bool    `json:\"editor:*,omitempty\"`\n\tEditorMinimapEnabled      bool    `json:\"editor:minimapenabled,omitempty\"`\n\tEditorStickyScrollEnabled bool    `json:\"editor:stickyscrollenabled,omitempty\"`\n\tEditorWordWrap            bool    `json:\"editor:wordwrap,omitempty\"`\n\tEditorFontSize            float64 `json:\"editor:fontsize,omitempty\"`\n\n\tGraphClear     bool     `json:\"graph:*,omitempty\"`\n\tGraphNumPoints int      `json:\"graph:numpoints,omitempty\"`\n\tGraphMetrics   []string `json:\"graph:metrics,omitempty\"`\n\n\tSysinfoType string `json:\"sysinfo:type,omitempty\"`\n\n\t// for tabs\n\tTabFlagColor        string  `json:\"tab:flagcolor,omitempty\"`\n\tTabBackground       string  `json:\"tab:background,omitempty\"`\n\tBgClear             bool    `json:\"bg:*,omitempty\"`\n\tBg                  string  `json:\"bg,omitempty\"`\n\tBgOpacity           float64 `json:\"bg:opacity,omitempty\"`\n\tBgBlendMode         string  `json:\"bg:blendmode,omitempty\"`\n\tBgBorderColor       string  `json:\"bg:bordercolor,omitempty\"`       // frame:bordercolor\n\tBgActiveBorderColor string  `json:\"bg:activebordercolor,omitempty\"` // frame:activebordercolor\n\n\t// for workspace\n\tLayoutVTabBarWidth   int   `json:\"layout:vtabbarwidth,omitempty\"`\n\tLayoutWidgetsVisible *bool `json:\"layout:widgetsvisible,omitempty\"`\n\n\t// for tabs+waveai\n\tWaveAiPanelOpen     bool   `json:\"waveai:panelopen,omitempty\"`\n\tWaveAiPanelWidth    int    `json:\"waveai:panelwidth,omitempty\"`\n\tWaveAiModel         string `json:\"waveai:model,omitempty\"`\n\tWaveAiChatId        string `json:\"waveai:chatid,omitempty\"`\n\tWaveAiWidgetContext *bool  `json:\"waveai:widgetcontext,omitempty\"` // default is true\n\n\tTermClear               bool     `json:\"term:*,omitempty\"`\n\tTermFontSize            int      `json:\"term:fontsize,omitempty\"`\n\tTermFontFamily          string   `json:\"term:fontfamily,omitempty\"`\n\tTermMode                string   `json:\"term:mode,omitempty\"`\n\tTermTheme               string   `json:\"term:theme,omitempty\"`\n\tTermLocalShellPath      string   `json:\"term:localshellpath,omitempty\"` // matches settings\n\tTermLocalShellOpts      []string `json:\"term:localshellopts,omitempty\"` // matches settings\n\tTermScrollback          *int     `json:\"term:scrollback,omitempty\"`\n\tTermVDomSubBlockId      string   `json:\"term:vdomblockid,omitempty\"`\n\tTermVDomToolbarBlockId  string   `json:\"term:vdomtoolbarblockid,omitempty\"`\n\tTermTransparency        *float64 `json:\"term:transparency,omitempty\"` // default 0.5\n\tTermAllowBracketedPaste *bool    `json:\"term:allowbracketedpaste,omitempty\"`\n\tTermShiftEnterNewline   *bool    `json:\"term:shiftenternewline,omitempty\"`\n\tTermMacOptionIsMeta     *bool    `json:\"term:macoptionismeta,omitempty\"`\n\tTermCursor              string   `json:\"term:cursor,omitempty\"`\n\tTermCursorBlink         *bool    `json:\"term:cursorblink,omitempty\"`\n\tTermConnDebug           string   `json:\"term:conndebug,omitempty\"` // null, info, debug\n\tTermBellSound           *bool    `json:\"term:bellsound,omitempty\"`\n\tTermBellIndicator       *bool    `json:\"term:bellindicator,omitempty\"`\n\tTermOsc52               string   `json:\"term:osc52,omitempty\"`\n\tTermDurable             *bool    `json:\"term:durable,omitempty\"`\n\n\tWebZoom          float64 `json:\"web:zoom,omitempty\"`\n\tWebHideNav       *bool   `json:\"web:hidenav,omitempty\"`\n\tWebPartition     string  `json:\"web:partition,omitempty\"`\n\tWebUserAgentType string  `json:\"web:useragenttype,omitempty\"`\n\n\tMarkdownFontSize      float64 `json:\"markdown:fontsize,omitempty\"`\n\tMarkdownFixedFontSize float64 `json:\"markdown:fixedfontsize,omitempty\"`\n\n\tTsunamiClear          bool              `json:\"tsunami:*,omitempty\"`\n\tTsunamiSdkReplacePath string            `json:\"tsunami:sdkreplacepath,omitempty\"`\n\tTsunamiAppPath        string            `json:\"tsunami:apppath,omitempty\"`\n\tTsunamiAppId          string            `json:\"tsunami:appid,omitempty\"`\n\tTsunamiScaffoldPath   string            `json:\"tsunami:scaffoldpath,omitempty\"`\n\tTsunamiEnv            map[string]string `json:\"tsunami:env,omitempty\"`\n\n\tVDomClear         bool   `json:\"vdom:*,omitempty\"`\n\tVDomInitialized   bool   `json:\"vdom:initialized,omitempty\"`\n\tVDomCorrelationId string `json:\"vdom:correlationid,omitempty\"`\n\tVDomRoute         string `json:\"vdom:route,omitempty\"`\n\tVDomPersist       bool   `json:\"vdom:persist,omitempty\"`\n\n\tOnboardingGithubStar  bool   `json:\"onboarding:githubstar,omitempty\"`  // for client\n\tOnboardingLastVersion string `json:\"onboarding:lastversion,omitempty\"` // for client (tracks semver of last 'onboarding' shown)\n\n\tCount int `json:\"count,omitempty\"` // temp for cpu plot. will remove later\n}\n```\nfor typescript typing\n\n```go\ntype ORef struct {\n\t// special JSON marshalling to string\n\tOType string `json:\"otype\" mapstructure:\"otype\"`\n\tOID   string `json:\"oid\" mapstructure:\"oid\"`\n}\n```\n\n```go\nfunc MakeORef(otype string, oid string) ORef\n```\n\n```go\nfunc ORefFromMap(m map[string]any) (*ORef, error)\n```\n\n```go\nfunc ORefFromWaveObj(w WaveObj) *ORef\n```\n\n```go\nfunc ParseORef(orefStr string) (ORef, error)\n```\n\n```go\nfunc ParseORefNoErr(orefStr string) *ORef\n```\n\n```go\nfunc (oref ORef) IsEmpty() bool\n```\n\n```go\nfunc (oref ORef) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (oref ORef) String() string\n```\n\n```go\nfunc (oref *ORef) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ObjRTInfo struct {\n\tTsunamiAppMeta any `json:\"tsunami:appmeta,omitempty\" tstype:\"AppMeta\"`\n\tTsunamiSchemas any `json:\"tsunami:schemas,omitempty\"`\n\n\tShellHasCurCwd       bool   `json:\"shell:hascurcwd,omitempty\"`\n\tShellState           string `json:\"shell:state,omitempty\"`\n\tShellType            string `json:\"shell:type,omitempty\"`\n\tShellVersion         string `json:\"shell:version,omitempty\"`\n\tShellUname           string `json:\"shell:uname,omitempty\"`\n\tShellIntegration     bool   `json:\"shell:integration,omitempty\"`\n\tShellOmz             bool   `json:\"shell:omz,omitempty\"`\n\tShellComp            string `json:\"shell:comp,omitempty\"`\n\tShellInputEmpty      bool   `json:\"shell:inputempty,omitempty\"`\n\tShellLastCmd         string `json:\"shell:lastcmd,omitempty\"`\n\tShellLastCmdExitCode int    `json:\"shell:lastcmdexitcode,omitempty\"`\n\n\tBuilderLayout map[string]float64 `json:\"builder:layout,omitempty\"`\n\tBuilderAppId  string             `json:\"builder:appid,omitempty\"`\n\tBuilderEnv    map[string]string  `json:\"builder:env,omitempty\"`\n\n\tWaveAIChatId          string `json:\"waveai:chatid,omitempty\"`\n\tWaveAIMode            string `json:\"waveai:mode,omitempty\"`\n\tWaveAIMaxOutputTokens int    `json:\"waveai:maxoutputtokens,omitempty\"`\n}\n```\n\n```go\ntype Point struct {\n\tX int `json:\"x\"`\n\tY int `json:\"y\"`\n}\n```\n\n```go\ntype RuntimeOpts struct {\n\tTermSize TermSize `json:\"termsize,omitempty\"`\n\tWinSize  WinSize  `json:\"winsize,omitempty\"`\n}\n```\n\n```go\ntype StickerClickOptsType struct {\n\tSendInput   string    `json:\"sendinput,omitempty\"`\n\tCreateBlock *BlockDef `json:\"createblock,omitempty\"`\n}\n```\n\n```go\ntype StickerDisplayOptsType struct {\n\tIcon    string `json:\"icon\"`\n\tImgSrc  string `json:\"imgsrc\"`\n\tSvgBlob string `json:\"svgblob,omitempty\"`\n}\n```\n\n```go\ntype StickerType struct {\n\tStickerType string                  `json:\"stickertype\"`\n\tStyle       map[string]any          `json:\"style\"`\n\tClickOpts   *StickerClickOptsType   `json:\"clickopts,omitempty\"`\n\tDisplay     *StickerDisplayOptsType `json:\"display\"`\n}\n```\n\n```go\ntype Tab struct {\n\tOID         string      `json:\"oid\"`\n\tVersion     int         `json:\"version\"`\n\tName        string      `json:\"name\"`\n\tLayoutState string      `json:\"layoutstate\"`\n\tBlockIds    []string    `json:\"blockids\"`\n\tMeta        MetaMapType `json:\"meta\"`\n}\n```\n\n```go\nfunc (t *Tab) GetBlockORefs() []ORef\n```\n\n```go\nfunc (*Tab) GetOType() string\n```\n\n```go\ntype TermSize struct {\n\tRows int `json:\"rows\"`\n\tCols int `json:\"cols\"`\n}\n```\n\n```go\ntype UIContext struct {\n\tWindowId    string `json:\"windowid\"`\n\tActiveTabId string `json:\"activetabid\"`\n}\n```\n\n```go\ntype UpdatesRtnType = []WaveObjUpdate\n```\n\n```go\nfunc ContextGetUpdatesRtn(ctx context.Context) UpdatesRtnType\n```\n\n```go\ntype WaveObj interface {\n\tGetOType() string // should not depend on object state (should work with nil value)\n}\n```\n\n```go\nfunc FromJson(data []byte) (WaveObj, error)\n```\n\n```go\nfunc FromJsonMap(m map[string]any) (WaveObj, error)\n```\n\n```go\ntype WaveObjUpdate struct {\n\tUpdateType string  `json:\"updatetype\"`\n\tOType      string  `json:\"otype\"`\n\tOID        string  `json:\"oid\"`\n\tObj        WaveObj `json:\"obj,omitempty\"`\n}\n```\n\n```go\nfunc ContextGetUpdate(ctx context.Context, oref ORef) *WaveObjUpdate\n```\n\n```go\nfunc MakeUpdate(obj WaveObj) WaveObjUpdate\n```\n\n```go\nfunc MakeUpdates(objs []WaveObj) []WaveObjUpdate\n```\n\n```go\nfunc (update WaveObjUpdate) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (update *WaveObjUpdate) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WinSize struct {\n\tWidth  int `json:\"width\"`\n\tHeight int `json:\"height\"`\n}\n```\n\n```go\ntype Window struct {\n\tOID         string      `json:\"oid\"`\n\tVersion     int         `json:\"version\"`\n\tWorkspaceId string      `json:\"workspaceid\"`\n\tIsNew       bool        `json:\"isnew,omitempty\"` // set when a window is created on the backend so the FE can size it properly.  cleared on first resize\n\tPos         Point       `json:\"pos\"`\n\tWinSize     WinSize     `json:\"winsize\"`\n\tLastFocusTs int64       `json:\"lastfocusts\"`\n\tMeta        MetaMapType `json:\"meta\"`\n}\n```\nstores the ui-context of the window, points to a workspace containing the actual data being displayed in the window\n\n```go\nfunc (*Window) GetOType() string\n```\n\n```go\ntype Workspace struct {\n\tOID         string      `json:\"oid\"`\n\tVersion     int         `json:\"version\"`\n\tName        string      `json:\"name,omitempty\"`\n\tIcon        string      `json:\"icon,omitempty\"`\n\tColor       string      `json:\"color,omitempty\"`\n\tTabIds      []string    `json:\"tabids\"`\n\tActiveTabId string      `json:\"activetabid\"`\n\tMeta        MetaMapType `json:\"meta\"`\n}\n```\n\n```go\nfunc (*Workspace) GetOType() string\n```\n\n```go\ntype WorkspaceList []*WorkspaceListEntry\n```\n\n```go\ntype WorkspaceListEntry struct {\n\tWorkspaceId string `json:\"workspaceid\"`\n\tWindowId    string `json:\"windowid\"`\n}\n```\n\n","path":"github.com/wavetermdev/waveterm/pkg/waveobj","name":"waveobj","synopsis":"","isRedistributable":true}
