@chatpanel/events 0.433.0 → 0.435.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1 +1 @@
1
- import{CURRENT_VERSION as o,EVENT_TYPES as t,ALL_TYPES as a,ACTOR_KINDS as i,SCOPE_KINDS as s,CLASSES as n,EFFECTS as l,EGRESS as S,EventError as E,validateEvent as m,isValidEvent as c,createAppender as p}from"./event.js";import{REF_KINDS as d,RESOLUTION as _,makeRef as A,isRef as R,resolveRef as f}from"./ref.js";import{linearize as I,compareEvents as O,causesAreWellFormed as N}from"./order.js";import{pendingQueue as C,isQueued as M,dequeue as P,moveQueued as L,promoteQueued as h}from"./queue.js";import{groupModels as D,filterSections as F,defaultModelId as k,modelSummary as y,withRecent as b,rememberRecent as U}from"./model-picker.js";import{composerChips as K,chipText as B}from"./composer-chips.js";import{NOTE_ACTIONS as G,NOTE_ACTION_ORDER as H,NOTE_ACTION_TEMPERATURE as V,NOTE_ACTION_ERRORS as W,NOTE_COMMANDS as X,NOTE_COMMAND_TEMPERATURE as Y,NOTE_COMMAND_MAX_TOKENS as z,frameNoteAction as J,noteActionLabel as j,noteActionItems as Q,filterNoteActions as q,commandLineAt as Z,triggerQueryAt as $}from"./note-actions.js";import{parseAgentMention as re,agentMentionAt as oe,parseSkillMention as te,mergeSkillPrompt as ae,findSkillByName as ie,findTargetByName as se,mentionAnswerPrefix as ne}from"./note-mentions.js";import{wikiQueryAt as Se,rankLinkTargets as Ee}from"./note-links.js";import{isBlankNote as ce,blankNotes as pe,blankFirst as Te,SPARE_BLANK_MS as de,UNTITLED as _e}from"./note-blank.js";import{paragraphAt as Re,recallQuery as fe,recallPicks as ue,RECALL_MIN_TERMS as Ie,RECALL_LIMIT as Oe}from"./note-recall.js";import{chapPageLink as ge,pickLinkTarget as Ce}from"./note-link.js";import{SWARM_ROLES as Pe,roleById as Le,classifyModel as he,supportsSubagents as xe,appoint as De,routeTeam as Fe}from"./cowriter-router.js";import{SEARCH_ENGINES as ye,RESULTS_PER_ENGINE as be,buildSearchUrl as Ue,unwrapRedirect as ve,isResultHost as Ke,pickResults as Be,mergeEngineResults as we,engineOrder as Ge,offTopic as He,isSearchPage as Ve}from"./web-search.js";import{PACER_DEFAULTS as Xe,classifyAnswer as Ye,createEnginePacer as ze,searchPolitely as Je,retryAfterMs as je}from"./engine-pacer.js";import{SEARCH_API_PRESETS as qe,SearchApiError as Ze,defineSearchApi as $e,missingVars as er,buildApiRequest as rr,readApiResponse as or,apiEngine as tr,DEFAULT_API_ENGINES as ar,apiEnginesFrom as ir,patchApiEntries as sr,viewApiEntries as nr,searchApiChoices as lr,apiTrialVerdict as Sr}from"./search-api.js";import{SEARCH_STATUS as mr,viaOf as cr,tagResults as pr,searchStatus as Tr,engineLabel as dr,summarizeSearch as _r}from"./search-outcome.js";import{MAX_GRAPH_NODES as Rr,buildNoteGraph as fr,egoGraph as ur,trimGraph as Ir,graphStats as Or}from"./note-graph.js";import{lintText as gr,wordDiff as Cr,filterTypoEdits as Mr,editKey as Pr,applyEdits as Lr,COWRITER_SYSTEM as hr,COWRITER_TEMPERATURE as xr}from"./cowriter.js";import{salientTerms as Fr,topicTerms as kr,researchRelevance as yr,webQuery as br,researchSnippet as Ur,rankResearchCards as vr,mergeResearchLanes as Kr}from"./note-research.js";import{PLAN_ROLES as wr,PLAN_AUTHORS as Gr,PLAN_DECOMPOSE_SYSTEM as Hr,PLAN_DECOMPOSE_MAX_TOKENS as Vr,PLAN_DECOMPOSE_TEMPERATURE as Wr,PLAN_SECTION_MAX_TOKENS as Xr,PLAN_SECTION_TEMPERATURE as Yr,planSectionSystem as zr,parsePlanTasks as Jr,planTitleFor as jr,planParts as Qr,planBody as qr,planAttribution as Zr}from"./note-plan.js";import{REACH as eo,reachRank as ro,reachSatisfies as oo}from"./reach.js";import{UPCASTERS as ao,upcast as io,upcastAll as so}from"./upcast.js";import{validateCapability as lo,validateInvocation as So,canSatisfy as Eo,toModelSchema as mo,toModelSchemas as co}from"./capability.js";import{checkInvariants as To,INVARIANTS as _o}from"./invariants.js";import{createMemoryAdapter as Ro,createLogStore as fo,createBlobStore as uo}from"./store.js";import{createRegistry as Oo,REGISTRY_STATES as No}from"./registry.js";import{defineSearchEngine as Co,reconcileEngines as Mo,attemptOrder as Po,ENGINE_KINDS as Lo,SearchEngineError as ho,inheritEngineDefaults as xo,ENGINES_REV as Do}from"./search-engines.js";import{getWeather as ko,weatherUrl as yo,parseWeather as bo,formatWeather as Uo,areaLabel as vo,isAmbiguousLocation as Ko,WEATHER_HOST as Bo,WEATHER_TIMEOUT_MS as wo,WeatherError as Go}from"./weather.js";import{defineToolGroup as Vo,createToolGroupRegistry as Wo,ToolGroupError as Xo}from"./tool-groups.js";import{toolNeedFor as zo,grantsNeededFor as Jo,equipmentFor as jo,isPleasantry as Qo}from"./tool-need.js";import{housekeepingTarget as Zo,hasSubstance as $o,isLocalHelper as et,isSystemModel as rt,lightestLocalHelper as ot}from"./housekeeping.js";import{parseFlowchart as at,layoutFlowchart as it,renderFlowchartSvg as st}from"./flowchart.js";import{validateView as lt,validateViewInvocation as St,viewResult as Et}from"./view.js";import{validateWidget as ct,validateWidgetMessage as pt,effectiveGrants as Tt,widgetIcon as dt,WIDGET_SURFACES as _t}from"./widget.js";import{fuseRRF as Rt,planQueries as ft,multiSearch as ut}from"./rrf.js";import{SUBJECT_KINDS as Ot,DEFAULT_THRESHOLD as Nt,MAX_SUBJECTS as gt,MAX_SUBJECT_CHARS as Ct,normalizeSubject as Mt,subjectKey as Pt,subjectTokens as Lt,isSubjectCandidate as ht,aliasMap as xt,resolveSubjects as Dt,earnsBrief as Ft,rankSubjects as kt,REDACTION_TOKEN_TYPES as yt,isRedactionToken as bt,SELF_LABELS as Ut,isSelfLabel as vt,stripQualifiers as Kt,suggestMerges as Bt}from"./entity.js";import{BRIEF_STATES as Gt,CLAIM_KINDS as Ht,MAX_CLAIMS as Vt,MAX_CLAIM_REFS as Wt,MAX_BRIEF_RECORDS as Xt,MAX_BRIEF_CHARS as Yt,contentHash as zt,briefId as Jt,briefToText as jt,briefTerms as Qt,briefLinks as qt,checkKnowledgeInvariants as Zt,parseBriefText as $t}from"./knowledge.js";import{deriveBrief as ra,deriveBriefs as oa,driftedRefs as ta}from"./knowledge-derive.js";import{SYNTHESIS_SCHEMA as ia,synthesisPrompt as sa,claimsFromSynthesis as na,MAX_SYNTHESIS_CLAIMS as la,MAX_EXCERPTS as Sa,MAX_EXCERPT_CHARS as Ea}from"./synthesis.js";import{PROPOSAL_STATES as ca,SUPERSEDE_OVERLAP as pa,propose as Ta,accept as da,reject as _a,diffProposal as Aa,converge as Ra,linkClaims as fa}from"./promotion.js";import{normalizeRecord as Ia,normalizeRecords as Oa,wikilinksIn as Na,redactedTokensIn as ga,redactionCost as Ca,wantedPages as Ma,orphanRecords as Pa,duplicateTitles as La,vocabularyDrift as ha,mentionsFrom as xa,spanningQuestions as Da,surveyCorpus as Fa,thresholdSweep as ka,formatSurvey as ya,NEAR_TITLE_DISTANCE as ba,SPAN_MIN_TERMS as Ua}from"./curate.js";import{PDF_MAX_CHARS as Ka,linesFromItems as Ba,orderLines as wa,paragraphsFromLines as Ga,pageTextFromItems as Ha,looksScanned as Va,buildPdfDocument as Wa}from"./pdf-layout.js";import{YOUTUBE_HOSTS as Ya,TRANSCRIPT_MAX_CHARS as za,parseYouTubeUrl as Ja,isYouTubeUrl as ja,captionTracksFromPlayerResponse as Qa,videoMetaFromPlayerResponse as qa,pickCaptionTrack as Za,timedTextUrl as $a,parseTimedText as ei,groupSegments as ri,formatTimestamp as oi,formatTranscript as ti,buildTranscriptDocument as ai,transcriptFromTracks as ii}from"./media-transcript.js";import{ACCESS_LOG_VERSION as ni,ACCESS_LOG_MAX as li,redactAccessArgs as Si,makeAccessEvent as Ei,createAccessLog as mi,makeStorageTier as ci,formatBytes as pi}from"./observability.js";import{routeGraph as di,projectChain as _i}from"./route-graph.js";import{defineAdapter as Ri,createAdapterRegistry as fi,AdapterError as ui}from"./adapters.js";import{linkifyCitations as Oi,repairCitedLinks as Ni,markdownUrl as gi,sourcesFromToolText as Ci,createCitationCollector as Mi,RETRIEVAL_TOOLS as Pi}from"./citations.js";import{buildTrajectory as hi,phasesOf as xi,lanesOf as Di,filterEntries as Fi,displayName as ki,ENTRY_KINDS as yi,threadsOf as bi,threadTitle as Ui,promptEntries as vi,turnsOf as Ki,threadTree as Bi}from"./trajectory.js";import{createTurnRunner as Gi,createStepRecorder as Hi,argsShape as Vi,defineLoop as Wi,LOOP_KINDS as Xi,LoopError as Yi,abortCause as zi,errorFacts as Ji}from"./loop.js";import{defineModel as Qi,defineMiddleware as qi,defineRouteStrategy as Zi,createModelRouter as $i,signalsFrom as es,requirementsFor as rs,requirementsForStep as os,preferenceFor as ts,failoverOrder as as,pinnedOrderOf as is,FAILOVER_CLASS_GAP as ss,FAILOVER_CAPABILITY_GAP as ns,sameModelKey as ls,RouterError as Ss}from"./router.js";import{makeSourceStore as ms,manifestText as cs,shortUrl as ps,readSource as Ts,sourceId as ds}from"./sources-retrieval.js";import{classifySource as As,extractUrls as Rs,hostMatches as fs,meetReach as us,sourcePolicyFor as Is,sourceUrlsOf as Os,DEFAULT_INTERNAL_PATTERNS as Ns,INTERNAL_PATTERN_CATALOG as gs}from"./sources.js";import{defineRule as Ms,createRuleEngine as Ps,SUPPRESSED as Ls,RuleError as hs}from"./rules.js";import{VAULT_VERSION as Ds,KDF_ITERATIONS as Fs,KDF_HASH as ks,DEFAULT_LOCK_MS as ys,VaultError as bs,MAX_TITLE_CHARS as Us,MAX_NOTE_CHARS as vs,MAX_SECRET_CHARS as Ks,MAX_ENTRIES as Bs,createVault as ws,unlockVault as Gs,deriveKey as Hs,sealEntry as Vs,openEntry as Ws,validateEntry as Xs,entryMeta as Ys,searchEntries as zs,isLocked as Js,lockedSummary as js,canAddEntry as Qs,toB64 as qs,fromB64 as Zs}from"./vault.js";import{SCHEDULE_KINDS as en,TRIGGER_KINDS as rn,JOB_ACTIONS as on,MISSED_POLICIES as tn,ScheduleError as an,validateSchedule as sn,nextFireAt as nn,occurrencesBetween as ln,nextWakeAt as Sn,parseCron as En,defineTrigger as mn,createTriggerRegistry as cn,BUILTIN_TRIGGERS as pn,timerTrigger as Tn,meetingStartedTrigger as dn,meetingEndedTrigger as _n,personJoinedTrigger as An,phraseTrigger as Rn,topicTrigger as fn,questionTrigger as un,voiceCommandTrigger as In,defineJob as On,dueJobs as Nn,jobsForEvent as gn,occurrenceKey as Cn,clipText as Mn,matchSummary as Pn}from"./schedule.js";import{defineMeetingAnalyzer as hn,createAnalyzerRegistry as xn,CADENCES as Dn,AnalyzerError as Fn}from"./meeting-analyzers.js";import{DEFAULT_WAKE as yn,ASSISTANT_NAME as bn,MAX_COMMANDS_PER_DELTA as Un,DAYPART_HOUR as vn,VoiceIntentError as Kn,compileWake as Bn,wakeFor as wn,findWakeCommand as Gn,parseCommand as Hn,commandsFromSegments as Vn,parseDuration as Wn,parseClock as Xn,parseWhen as Yn,parseNumberWords as zn,normalizeSpeech as Jn,tokenize as jn,editDistance as Qn,defineVoiceIntent as qn,createVoiceIntentRegistry as Zn,defaultVoiceIntents as $n,BUILTIN_VOICE_INTENTS as el,timerIntent as rl,reminderIntent as ol,scheduleIntent as tl,noteIntent as al,monitorIntent as il,REFINEMENT_SCHEMA as sl,refinementPrompt as nl,refinementFormat as ll,parseRefinement as Sl,refinementStream as El,settleRefinement as ml,refineSpokenCommand as cl,isFillerSentence as pl,gistText as Tl,gistOpening as dl,commandLooksFinished as _l,sameUtterance as Al,createUtteranceGate as Rl,UTTERANCE_SETTLE_MS as fl,UTTERANCE_DANGLING_MS as ul}from"./voice-intents.js";import{MAX_TOPICS as Ol,MAX_TOPIC_CHARS as Nl,TOPICS_SCHEMA as gl,topicsSchema as Cl,topicsPrompt as Ml,topicsFormat as Pl,parseTopics as Ll,normalizeTopic as hl,normalizeTopics as xl,topicsStream as Dl,ENTITY_TYPES as Fl,ENTITIES_SCHEMA as kl,entitiesPrompt as yl,entitiesFormat as bl,parseEntities as Ul,coerceEntities as vl,entitiesStream as Kl,MAX_SUGGESTIONS as Bl,MAX_SUGGESTION_CHARS as wl,SUGGESTIONS_SCHEMA as Gl,suggestionsPrompt as Hl,suggestionsFormat as Vl,parseSuggestions as Wl,suggestionsStream as Xl}from"./extraction.js";import{FIELD_TYPES as zl,RESPONSE_MODES as Jl,StructuredError as jl,defineSchema as Ql,describeSchema as ql,toJsonSchema as Zl,responseFormat as $l,unfence as eS,findJson as rS,rewriteJson as oS,repairJson as tS,isNothing as aS,coerce as iS,parseStructured as sS,createStructuredStream as nS}from"./structured.js";import{explainMcpError as SS,packageFromArgs as ES,isStaleMcpSession as mS,installHintFor as cS,missingCommandMessage as pS,missingCommandIn as TS,normalizePlatform as dS}from"./mcp-errors.js";import{explainInstallFailure as AS,gatewayNotBackAdvice as RS,adviceText as fS,npmInstallCommand as uS,standaloneInstallCommand as IS,nodeSatisfies as OS,PUBLIC_REGISTRY as NS}from"./install-advice.js";import{parseSignInPrompt as CS,signInError as MS,signInFromError as PS,signInToolResult as LS,MCP_SIGN_IN_CODE as hS}from"./mcp-signin.js";import{parseAuthChallenge as DS,wellKnownUrls as FS,canonicalResource as kS,readResourceMetadata as yS,readAuthServerMetadata as bS,registrationRequest as US,readRegistration as vS,authorizeUrl as KS,tokenRequest as BS,readTokenResponse as wS,tokenExpired as GS,authHeader as HS,discoverMcpAuth as VS,registerMcpClient as WS,fetchMcpToken as XS,TOKEN_SKEW_MS as YS,mcpAuthKey as zS,refreshedAuth as JS}from"./mcp-oauth.js";import{toolTraits as QS,bareToolName as qS,canRunConcurrently as ZS,isCacheable as $S,needsConfirmation as eE,traitsIndex as rE,effectiveToolName as oE,parallelEligible as tE,PARALLEL_LOCAL_RE as aE}from"./tool-traits.js";import{planToolRound as sE,runToolRound as nE}from"./tool-round.js";import{createToolLoopGuard as SE,roundSignature as EE,stableToolCallKey as mE,toolMadeProgress as cE,isLoopableTool as pE,blockedToolResult as TE,OBSERVATION_TOOLS as dE,INPUT_PROGRESS_TOOLS as _E}from"./tool-loop-guard.js";import{classifyFailure as RE,createModelHealth as fE,COOLDOWN_MS as uE,UNAVAILABLE_REASONS as IE,normModelName as OE}from"./model-health.js";import{runWithFailover as gE,failoverExhausted as CE,FAILOVER_MAX_ATTEMPTS as ME}from"./failover.js";import{sourcePolicySettings as LE,sourceGuardFor as hE,sourceGate as xE,isSourceGateError as DE,withinReach as FE}from"./source-gate.js";import{runTurnLoop as yE,createCallRunner as bE,roundCap as UE,withToolSystem as vE,describeCall as KE,stepResultText as BE,stepResultNote as wE,addUsage as GE,normalizeUsage as HE,openAiTranscript as VE,anthropicTranscript as WE,DEFAULT_MAX_ROUNDS as XE,DEFAULT_MAX_FINISH_TRIES as YE,FINISH_NUDGES as zE,LOOPING_NUDGE as JE,EXHAUSTED_NOTE as jE,ROUND_SEPARATOR as QE}from"./turn-loop.js";import{SHIMS as ZE,SHIM_IDS as $E,defineShim as em,createShimLog as rm,summarizeShims as om,retirableShims as tm,describeShims as am,ShimError as im}from"./shim.js";import{modelView as nm,modelSaid as lm,stoppedText as Sm,isClientNote as Em,STOPPED_MARK as mm}from"./model-view.js";import{createResultStore as pm,shieldToolResult as Tm,runResultQuery as dm,withResultShield as _m,describeShape as Am,compactValue as Rm,resultToolSpec as fm,RESULT_TOOL_NAME as um,DEFAULT_SHIELD as Im,DEFAULT_STORE as Om}from"./tool-result.js";import{PERMISSION_EVENT as gm,PERMISSION_ANSWERS as Cm,PERMISSION_TIMEOUT_MS as Mm,PERMISSION_TOOL_NAME as Pm,permissionToolSpec as Lm,isPermissionTool as hm,permissionRequestFromClaude as xm,permissionKeys as Dm,describePermission as Fm,permissionAnswer as km,permissionAllowed as ym,rememberPermission as bm,recallPermission as Um,claudePermissionResponse as vm,permissionLine as Km,permissionIcon as Bm,createPermissionDesk as wm}from"./agent-permission.js";import{findTools as Hm,findToolsResult as Vm,findActionArgs as Wm,oneLiner as Xm,overlapRank as Ym,FIND_ACTION as zm}from"./tool-discovery.js";import{rankFused as jm,fusedRanker as Qm,rerankThrough as qm,toolDoc as Zm,FUSED_CANDIDATES as $m,FUSED_BUDGET_MS as ec}from"./tool-rank-fused.js";import{makeToolHub as oc,hubSpec as tc,HUB_TOOL_NAME as ac,withHint as ic,withLead as sc,lastUserText as nc}from"./tool-hub.js";import{withPromptedTools as Sc,promptedTranscript as Ec,makePromptedTranscript as mc,promptedToolsSystem as cc,parseToolCalls as pc,visiblePrefix as Tc,toolChannel as dc,transcriptFor as _c}from"./prompted-tools.js";import{REVEAL as Rc,revealStep as fc,revealCut as uc}from"./stream-reveal.js";import{buildToolset as Oc}from"./toolset.js";import{DESCRIBE_ACTION as gc,actionMenu as Cc,buildGroupDispatchSpec as Mc,validateAction as Pc,makeGroupDispatchExecutor as Lc,withGuidance as hc,makeDispatchProvider as xc,estimateTokens as Dc}from"./tool-dispatch.js";import{FIND_TOOL_NAME as kc,FIND_DESCRIPTION as yc,FIND_RESIDENT as bc,findDispatchProvider as Uc}from"./find-tool.js";import{WEB_SEARCH_TOOL_NAME as Kc,WEB_SEARCH_TOOL_SYSTEM as Bc,WEB_SEARCH_SPEC as wc,searchResultsToText as Gc,searchFailureOf as Hc,webSearchToolProvider as Vc}from"./web-search-tool.js";import{compressToolSpec as Xc,compressToolSpecs as Yc,compressionStats as zc,trimDescription as Jc,COMPRESSION_MODES as jc,DEFAULT_COMPRESSION as Qc}from"./tool-schema.js";import{validateRecipe as Zc,expandRecipe as $c,recipeParams as ep,mapInput as rp,dryRunRecipe as op,runPlan as tp,runRecipe as ap,RecipeError as ip,RECIPE_MODES as sp}from"./recipe.js";import{recipeToolProvider as lp,recipeToolSpec as Sp,describeRecipeForApproval as Ep,RECIPE_TOOL_NAME as mp}from"./recipe-tool.js";import{createBudget as pp,validateBudget as Tp,normalizeBudget as dp,usageOf as _p,BudgetError as Ap,BUDGET_DIMENSIONS as Rp}from"./budget.js";import{defineTeam as up,validateTeam as Ip,normalizeTeam as Op,normalizeGrants as Np,grantAllows as gp,scmAllows as Cp,describeRole as Mp,TeamError as Pp,ROLE_MODES as Lp,MERGE_POLICIES as hp,PLAN_MODES as xp,GRANTABLE as Dp,WORK_GRANTS as Fp,GRANT_RE as kp,AGENT_REF_RE as yp,STARTER_TEAMS as bp,starterTeams as Up,blankTeam as vp,teamFromForm as Kp,slugTeamName as Bp}from"./team.js";import{fixedPlan as Gp,parsePlan as Hp,plannerPrompt as Vp,waves as Wp,breakCycles as Xp,TEAM_PLAN_SCHEMA as Yp}from"./team-plan.js";import{createBoard as Jp,parseFindings as jp,boardText as Qp,findingsInstruction as qp,toBriefClaims as Zp,FINDINGS_SCHEMA as $p,FINDING_KINDS as eT,THREAD_KINDS as rT,THREAD_STATUSES as oT,POST_KINDS as tT,POST_STATUSES as aT,ASK_TYPES as iT,emptyBoardState as sT,foldBoard as nT,findingsOf as lT}from"./team-board.js";import{boardToolProvider as ET,boardToolSpec as mT,createAnswerBox as cT,withBoardTool as pT,BOARD_TOOL_NAME as TT,DEFAULT_ASK_TIMEOUT_MS as dT}from"./board-tool.js";import{createRunCache as AT,withRunCache as RT}from"./team-cache.js";import{emptyRun as uT,foldRun as IT,runFromEvents as OT,checkpointFrom as NT,isResumable as gT,LIVE_RUN_STATUSES as CT,RESUMABLE_RUN_STATUSES as MT,spendOf as PT,describeSpend as LT,runState as hT,priorWorkFor as xT,STALLED_AFTER_MS as DT}from"./team-record.js";import{validateProject as kT,normalizeProject as yT,defineProject as bT,canTransition as UT,blankProject as vT,projectFromForm as KT,emptyProjectRecord as BT,foldProject as wT,projectProgress as GT,ProjectError as HT,PROJECT_STATUSES as VT,PROJECT_ID_RE as WT}from"./project.js";import{validateJob as YT,normalizeJob as zT,defineJob as JT,canTransition as jT,applyAll as QT,jobToRole as qT,readyJobs as ZT,blankJob as $T,jobFromForm as ed,JobError as rd,JOB_STATUSES as od,JOB_ID_RE as td}from"./job.js";import{validateGate as id,normalizeGate as sd,effectiveGate as nd,gateAllows as ld,DEFAULT_GATE as Sd,AUTONOMY as Ed,HUMAN_FLAGS as md,CHECKS as cd}from"./gate.js";import{runProject as Td,roundJobs as dd,teamForRound as _d,jobResults as Ad,roundBudget as Rd,parseJobs as fd,parseReview as ud,jobsPrompt as Id,reviewPrompt as Od,PROJECT_JOBS_SCHEMA as Nd,PROJECT_REVIEW_SCHEMA as gd,ProjectRunError as Cd,EXECUTIVE as Md,MAX_JOBS_PER_ROUND as Pd,MAX_ROUNDS as Ld,PROJECT_RUN_STATUSES as hd}from"./project-run.js";import{canonical as Dd,sha256 as Fd,makeEntry as kd,verifyChain as yd,attest as bd,verifyAttested as Ud,summarize as vd,fit as Kd,adjustSummary as Bd,normalizeEngine as wd,engineKey as Gd,normalizeScm as Hd,SCORECARD_ENTRY_KINDS as Vd,ROLE_KINDS as Wd,SCORECARD_VERSION as Xd,ENGINE_KINDS as Yd}from"./scorecard.js";import{ENGINE_KINDS as Jd,ROUTE_PREFERS as jd,normalizePolicy as Qd,normalizeEngineSpec as qd,validateEngineSpec as Zd,engineRef as $d,engineKeyOf as e_,describeEngine as r_,tierOf as o_}from"./engine.js";import{AGENT_ID_RE as a_,APPLIES_TO as i_,EGRESS_CLASSES as s_,ASSISTANT_ID as n_,AgentError as l_,validateAgent as S_,normalizeAgent as E_,defineAgent as m_,assistantAgent as c_,engineOf as p_,describeAgent as T_,slugAgentId as d_,resolveTeam as __,STARTER_AGENTS as A_,starterAgents as R_,blankAgent as f_,agentFromForm as u_,poolFor as I_}from"./agent.js";import{LEDGER_VERSION as N_,LEDGER_ENTRY_KINDS as g_,DECLINE_REASONS as C_,WITHDRAW_AFTER as M_,ledgerKey as P_,normalizeCall as L_,makeLedgerEntry as h_,summarizeEngine as x_}from"./model-ledger.js";import{RECRUIT_SCHEMA as F_,MIN_FIT as k_,engineRow as y_,engineRows as b_,needForJob as U_,routeFor as v_,engineWorth as K_,applications as B_,evaluatorPrompt as w_,parseEvaluation as G_,decide as H_,recruitForRun as V_,proposalFromNeeds as W_,proposalToAgent as X_,carveBudget as Y_,recruitEvents as z_,recruitJob as J_}from"./recruit.js";import{DEFAULT_MIN_CALLS as Q_,cardOverride as q_,applyCard as Z_}from"./model-candidates.js";import{SCM_KINDS as eA,validateConnection as rA,normalizeConnection as oA,parseRemote as tA,connectionFor as aA,branchFor as iA,worktreeDirFor as sA,credentialEnv as nA,describeConnection as lA,blankConnection as SA,connectionFromForm as EA}from"./scm-connection.js";import{messagesFor as cA,mergeTranscript as pA,clipTranscript as TA,clipMessage as dA,newSteps as _A,continuationNote as AA,createControl as RA,STEP_MAX_CHARS as fA,TASK_TRANSCRIPT_MAX_CHARS as uA}from"./team-task.js";import{runTeam as OA,resumeTeam as NA,dryRunTeam as gA,isModelUnavailable as CA,TeamRunError as MA,RUN_STATUSES as PA}from"./team-run.js";import{teamToolProvider as hA,teamToolSpec as xA,teamToolTimeoutMs as DA,describeTeamForApproval as FA,TEAM_TOOL_NAME as kA,TEAM_MANUAL as yA}from"./team-tool.js";import{workLogFor as UA,workLogText as vA,workLogEvidence as KA,describeCall as BA,WORKLOG_KINDS as wA}from"./team-worklog.js";import{normalizeRequest as HA,subtaskFromRequest as VA,takeUp as WA,takeUpLine as XA,holdsGrants as YA,jobFromSubtask as zA,extendDependents as JA,taskTree as jA,threadRows as QA,MAX_SUBTASKS as qA,MAX_DEPTH as ZA,MIN_TAKEUP_FIT as $A}from"./team-subtask.js";import{teamLine as rR,teamLanes as oR}from"./team-trail.js";import{promoteRoles as aR,starterTeam as iR,missingStarters as sR,teamHealth as nR,teamShape as lR,describeTeamShape as SR,whereItWorks as ER,rosterRows as mR,agentKind as cR,agentHue as pR,agentColor as TR,agentInitials as dR,roleCardId as _R,cardNumbers as AR,upsertAgents as RR,soloTeam as fR,teamsWithSolos as uR,builtinOrg as IR,isBuiltin as OR,grantChoices as NR,grantsFromChoices as gR,skillChoices as CR,GRANT_INFO as MR,SOLO_BUDGET as PR,TEAM_SHAPES as LR,ROSTER_KINDS as hR}from"./team-org.js";import{observeInbox as DR,observeStrip as FR,runLanes as kR,spendRows as yR,engineStrip as bR}from"./team-observe.js";import{mcpDispatchProvider as vR,MCP_TOOL_NAME as KR}from"./mcp-dispatch.js";import{createManifest as wR,ManifestError as GR,SOURCES as HR}from"./manifest.js";import{createKernel as WR,meetDecisions as XR,KernelError as YR,REQUIRED_PLUGINS as zR,ALLOW_ALL as JR}from"./kernel.js";import{replay as QR,formatReport as qR,parseJsonl as ZR,toJsonl as $R}from"./harness.js";import{compileQuery as rf,findMatches as of,matchIndexFor as tf,expandReplacement as af,replaceMatch as sf,replaceAll as nf,replaceAllInRange as lf,MAX_MATCHES as Sf}from"./text-search.js";import{DATA_SCOPES as mf}from"./scopes.js";import{MEMORY_VERSION as pf,MEMORY_KINDS as Tf,MEMORY_KIND_NAMES as df,AMBIENT_KINDS as _f,MAX_MEMORY_CHARS as Af,MIN_MEMORY_CHARS as Rf,DEFAULT_MAX_MEMORIES as ff,DEFAULT_BLOCK_CHARS as uf,SAME_FACT as If,MEMORY_TOOL_SPEC as Of,MEMORY_UPCASTERS as Nf,MemoryError as gf,normalizeMemory as Cf,isValidMemory as Mf,memoryKey as Pf,slotOf as Lf,similarity as hf,containment as xf,candidatesFrom as Df,reconcile as Ff,matchForForget as kf,recall as yf,saysWhere as bf,homePlace as Uf,needsWhere as vf,memoryBlock as Kf,markUsed as Bf,pruneMemories as wf,memoryToolSystem as Gf,upcastMemory as Hf,sameMemory as Vf,AMBIENT_MAX_WORDS as Wf}from"./memory.js";import{linksToRead as Yf,storyLinkOf as zf,linkAttachments as Jf,asksOnlyAboutPage as jf,pageInstruction as Qf}from"./message-links.js";import{frontPagesAskedAbout as Zf,frontPageInstruction as $f,FRONT_PAGES as eu}from"./site-pages.js";import{SOURCE_TRUST as ou,SkillSourceError as tu,defineSkillSource as au,createSkillSourceRegistry as iu}from"./skill-sources.js";import{SKILL_MANIFEST_VERSION as nu,SKILL_CONTEXTS as lu,SKILL_HISTORY_SCOPES as Su,SKILL_MCP_MODES as Eu,SKILL_TRUST as mu,SKILL_FILE_KINDS as cu,SKILL_UPCASTERS as pu,SkillManifestError as Tu,isSafeSkillPath as du,originOf as _u,trustOf as Au,skillFiles as Ru,needsBridge as fu,declaredAccess as uu,originLabel as Iu,sameSkillOrigin as Ou,skillIsStale as Nu,validateSkill as gu,upcastSkill as Cu,upcastSkills as Mu,normalizeSkill as Pu}from"./skill-manifest.js";import{SKILL_VARS as hu,SKILL_VAR_NAMES as xu,skillVar as Du,skillVarPattern as Fu,parseSkillVars as ku,lintSkillPrompt as yu,suggestSkillVar as bu,substituteSkillVars as Uu,expandSkillPrompt as vu,skillVarGuidance as Ku,SkillVarError as Bu}from"./skill-vars.js";import{lineAt as Gu,writerAffordance as Hu,INSTRUCTION_RE as Vu,instructionOnLine as Wu,GOAL_MIN_NEW as Xu,goalDraftAllowed as Yu,createSpendMeter as zu,writerTail as Ju,draftSeparator as ju,groundingBlock as Qu,writerRequest as qu,AUTOCOMPLETE_SYSTEM as Zu,AUTOCOMPLETE_MAX_TOKENS as $u,AUTOCOMPLETE_TEMPERATURE as eI,clipCompletion as rI,GEARS as oI,WRITER_PREFS as tI,WRITER_PREF_DEFAULTS as aI,normalizeWriterPrefs as iI,normalizeIntent as sI}from"./cowriter-writer.js";import{SLASH_TYPING_RE as lI,NEW_THREAD_SLASH_ITEMS as SI,parseNewThread as EI,BUG_REPORT_SLASH_ITEMS as mI,parseBugCommand as cI,isSkillEnabled as pI,enabledSkills as TI,slashCommandItems as dI,matchSlashSkill as _I,matchSlashRecipe as AI,recipeInvocationText as RI,matchSlashTeam as fI,teamInvocationText as uI,slashCommandInsert as II,skillInvocationOf as OI,skillInvocationLabel as NI}from"./slash-commands.js";import{outlineOf as CI,parseListItem as MI,continueList as PI,indentSelection as LI,toggleWrap as hI,toggleLinePrefix as xI,toggleTask as DI,toggleLink as FI,docStats as kI,selectionStats as yI}from"./markdown-authoring.js";import{MAX_TAG_LENGTH as UI,MAX_TAGS as vI,normalizeTag as KI,normalizeTags as BI,hasTag as wI,addTag as GI,removeTag as HI,toggleTag as VI,sameTags as WI,formatTag as XI,parseTagQuery as YI,hasTagTerms as zI,formatTagQuery as JI,matchesTagFilter as jI,filterByTags as QI,tagFacets as qI,suggestExistingTags as ZI,tagsSearchText as $I}from"./tags.js";import{UNTITLED_MEETING as rO,MAX_TITLE_LENGTH as oO,TITLE_RULES_VERSION as tO,cleanTitle as aO,isGenericTitle as iO,titleFromSummary as sO,titleFromTopics as nO,titleFromParticipants as lO,titleFromDate as SO,readableWhen as EO,deriveMeetingTitle as mO,shouldAutoTitle as cO,isBetterTitleSource as pO,meetingTitlePrompt as TO,parseTitleResponse as dO}from"./titles.js";import{RECORD_KINDS as AO,STRUCTURE_KINDS as RO,MAX_TITLE_LEN as fO,LibraryError as uO,parseRecordId as IO,makeRecordId as OO,isRecordId as NO,normalizeStoredRecord as gO,isValidStoredRecord as CO,toSearchRecord as MO,searchTextFor as PO,toIndexEntry as LO,deriveTitle as hO,snippetOf as xO,wordCount as DO,findRecordRefs as FO,linkRecordRefs as kO,repairAnswerMarkup as yO}from"./library.js";import{CLOCK_TOLERANCE_MS as UO,SyncError as vO,stampOf as KO,decide as BO,planSync as wO,isSettled as GO,forkConflict as HO,advanceBases as VO}from"./sync-plan.js";import{ENCRYPTED_TYPE as XO,COMPRESSIONS as YO,BackupError as zO,KDF_ITERATIONS as JO,encryptBackup as jO,decryptBackup as QO,isEncryptedBackup as qO,RECORD_TYPE as ZO,deriveBackupKey as $O,sealRecord as eN,openRecord as rN,isSealedRecord as oN,keyCache as tN,identityCodec as aN,streamCodec as iN,nodeCodec as sN,bestCodec as nN}from"./backup-envelope.js";import{recordsFromBackup as SN,backupFromRecords as EN}from"./backup-records.js";import{DEFAULT_POLICY as cN,SLOW_POLICY as pN,scalePolicy as TN,pickProfile as dN,adaptProfile as _N,policyFor as AN,SLOW_FLUSH_MS as RN,FAST_FLUSH_MS as fN,FAST_STREAK as uN,createJournal as IN,JournalError as ON,ENTRY_VERSION as NN,makeEntry as gN,tombstone as CN,isTombstone as MN,isEntry as PN,entryStamp as LN,supersedes as hN,BOUNDS as xN,createSegment as DN,applyEntry as FN,segmentBytes as kN,segmentEntries as yN,shouldRotate as bN,mergeSegments as UN,segmentName as vN,parseSegmentName as KN,SEGMENT_RE as BN,boundSegments as wN,segmentsFor as GN,overlay as HN,catchUpPlan as VN}from"./journal.js";import{OMNI_MODES as XN,OMNI_GRAMMAR as YN,parseOmni as zN,extractFilters as JN,resolveSince as jN,wantsModel as QN,isActionable as qN}from"./omni.js";import{THEMES as $N,LIGHT as eg,DARK as rg,PALETTES as og,SHAPE as tg,TOKEN_NAMES as ag,TOKEN_ROLES as ig,paletteFor as sg,cssVarName as ng,toCssVars as lg,themeStylesheet as Sg,resolveTheme as Eg}from"./theme.js";import{PLANS as cg,API_BASE as pg,ENDPOINTS as Tg,ENTITLEMENT_PUBLIC_JWK as dg,UPGRADE_URL as _g,FEATURE_TIER as Ag,PRO_FEATURES as Rg,TEAM_FEATURES as fg,FREE_LIMITS as ug,COUNTED as Ig,freeCap as Og,observeSince as Ng,RECHECK_INTERVAL_MS as gg,EntitlementError as Cg,checkoutUrl as Mg,planOf as Pg,planLabel as Lg,isPro as hg,isTeam as xg,can as Dg,tierFor as Fg,withinFreeLimit as kg,verifyEntitlement as yg,verifySignedToken as bg,licenseFromPayload as Ug,needsRecheck as vg}from"./entitlement.js";import{generateDeviceKey as Bg,exportDevicePublicKey as wg,signChallenge as Gg}from"./device-proof.js";import{renderMarkdown as Vg,defaultLinkPolicy as Wg,defaultImagePolicy as Xg}from"./markdown-render.js";import{NOTE_IMAGE_SCHEME as zg,MAX_NOTE_IMAGE_BYTES as Jg,NOTE_IMAGE_TYPES as jg,noteImageId as Qg,noteImageRef as qg,noteImageIds as Zg,noteImageRefs as $g,stripNoteImageRefs as eC,orphanNoteImages as rC,newNoteImageId as oC}from"./note-images.js";import{parseMeetingText as aC,speakerStats as iC,densityRibbon as sC}from"./meeting-text.js";import{speakerBreakdown as lC,speakerTimeline as SC,formatTalkTime as EC,SPEAKER_SLOTS as mC}from"./meeting-shape.js";import{isSpeakerImageValue as pC,speakerLabeller as TC}from"./meeting-shape.js";import{SORT_MODES as _C,SORT_LABELS as AC,sortStamp as RC,sortRecords as fC,filterRecords as uC,dayBucket as IC,rowTime as OC,groupRecords as NC}from"./record-list.js";import{DATE_PRESETS as CC,startOfDay as MC,addDays as PC,dayKey as LC,resolveDateValue as hC,dateRangeOf as xC,parseDateQuery as DC,hasDateTerms as FC,isSingleDay as kC,formatDateTerm as yC,setDateTerm as bC,matchesDateRange as UC,filterByDate as vC,describeDateRange as KC,dateFilterLabel as BC,activePreset as wC,pickDay as GC,shiftMonth as HC,monthGrid as VC,dayCounts as WC,nearbyDays as XC,localeWeekStart as YC}from"./date-filter.js";import{INSIGHT_KINDS as JC,summarySections as jC,insightKindOf as QC,meetingInsights as qC,hasInsights as ZC}from"./meeting-insights.js";import{demd as eM,NOTE_SECTIONS as rM,noteSectionKind as oM,MOMENT_BADGES as tM,momentBadge as aM,parseMeetingNotes as iM,groupActionsByOwner as sM}from"./meeting-insights.js";import{MEETING_INSIGHT_SECTIONS as lM,MEETING_INSIGHT_SYSTEM as SM,meetingInsightPrompt as EM,sectionMaxTokens as mM,composeMeetingInsightNotes as cM,insightTranscript as pM}from"./meeting-insight-prompts.js";import{PREF_SECTIONS as dM,PREF_SECTION_IDS as _M,DESKTOP_SECTION_IDS as AM,sectionSpec as RM,sectionValue as fM,pickSections as uM,applySections as IM,sectionHash as OM,mergeStamped as NM,changedSections as gM}from"./client-prefs.js";import{SETTINGS_GROUPS as MM,SETTINGS_PAGES as PM,REQUIREMENTS as LM,BOOKKEEPING_KEYS as hM,listRows as xM,findRow as DM,pageById as FM,groupById as kM,pagesOf as yM,quickRows as bM,breadcrumb as UM,linkTo as vM,linkToRow as KM,parseLink as BM,valueOf as wM,setValue as GM,effectiveValue as HM,describeValue as VM,SETTINGS_OPEN_DEFAULT as WM,settingsOpenMode as XM,searchSettings as YM,statusOf as zM,statusAll as JM,homeChecklist as jM,gateOf as QM,sectionOfRow as qM}from"./settings-registry.js";import{pointsAtGateway as $M,destinationFromEndpoint as eP,destinationFromAgent as rP,availableDestinations as oP,seedDestinations as tP,shouldSeedDestinations as aP,mergeEndpointDestinations as iP}from"./gateway-dests.js";import{McpClient as nP,mcpProvider as lP}from"./mcp-client.js";import{mcpSharedSystem as EP,mcpInventorySystem as mP,sourceCitationSystem as cP,combineSystemPrompt as pP,toolStatus as TP,widgetAuthoringSystem as dP,vaultWidgetSystem as _P,wantsVaultGuidance as AP}from"./tool-hints.js";import{adaptiveToolRetryHint as fP,createAdaptiveToolPolicy as uP,isInvalidToolParametersResult as IP}from"./adaptive-tool-policy.js";import{getMcpProviders as NP,testMcpServer as gP,resetMcp as CP,mcpBackoff as MP,mcpClientFor as PP}from"./mcp-manager.js";import{SIDELINE_COMMANDS as hP,BRINGBACK_COMMAND as xP,THREAD_TOOL_NAME as DP,SIDELINE_SLASH_ITEMS as FP,THREAD_TOOL_SPEC as kP,parseSideline as yP,parseBringBack as bP,resolveSidelineTarget as UP,threadManifest as vP,threadToolProvider as KP,readThread as BP,briefPrompt as wP,foldBackNote as GP,foldNotes as HP,nextSidelineIndex as VP,sourceOf as WP,noteUnits as XP,sidelinePath as YP,foldBackFor as zP,SIDELINE_TOOL_NAME as JP,SIDELINE_TOOL_SPEC as jP,sidelineToolProvider as QP}from"./sideline.js";import{WEATHER_TOOL_NAME as ZP,WEATHER_TOOL_SYSTEM as $P,weatherToolProvider as eL,weatherFromSearch as rL}from"./weather-tool.js";import{DECIDE_TOOL_NAME as tL,RERANK_TOOL_NAME as aL,CAPABILITY_TOOLS_SYSTEM as iL,capabilityToolsProvider as sL}from"./capability-tools.js";import{openDecision as lL,distributionConfidence as SL}from"./open-decision.js";import{IN_PROCESS_IDS as mL,inProcessView as cL,capabilityView as pL,choicePatch as TL,choiceNote as dL,inProcessPatch as _L}from"./runtime-in-process.js";import{renderContent as RL,toChatMessages as fL,toMultimodalMessages as uL,imageAttachmentsOf as IL,deferAttachedSources as OL,withSourceTool as NL,SOURCE_TOOL_SPEC as gL}from"./context-attachments.js";import{prefetchPlan as ML,prefetchAttachment as PL,lookupResult as LL,lookupLabel as hL,runResearchItem as xL,weatherPlace as DL,weatherFollowupPlace as FL,carriedPlace as kL,newsAsk as yL,pageAsk as bL,answeredByPrefetch as UL,webRedoAsk as vL,aboutOwnPast as KL,offeredSearch as BL,prefetchBudgetMs as wL}from"./prefetch.js";import{createFetchedStore as HL,withFetchedMemo as VL,fetchKey as WL,fetchTitle as XL,fetchedAsSources as YL,fetchedFacts as zL,defaultTtl as JL,exchangeOf as jL,FETCHED_TTL_MS as QL}from"./fetched.js";import{windowOf as ZL,fitFor as $L,keepRecentFor as eh,minWindowFor as rh,isContextLimitError as oh,FIT_HEADROOM as th,SMALL_WINDOW as ah,isSmallWindow as ih,SMALL_WINDOW_ROUNDS as sh}from"./context-window.js";import{planCompaction as lh,compactionPrompt as Sh,compactionRecord as Eh,messagesAfter as mh,systemWithSummary as ch,compactable as ph,COMPACTION_SYSTEM as Th}from"./compaction.js";import{selectContext as _h}from"./context-select.js";import{withoutOwnInstructions as Rh}from"./own-instructions.js";import{digest as uh,needsWhole as Ih}from"./digest.js";import{planRetrieval as Nh,toolsWanted as gh,worldAnswered as Ch,worldPlanned as Mh,toolPlan as Ph,contextPlan as Lh,historyContext as hh,HISTORY_NOTE as xh,placeItems as Dh,planTurn as Fh}from"./retrieval-plan.js";import{intentNeeds as yh,intentNeedOptions as bh,intentSchema as Uh,intentPrompt as vh,intentFromReply as Kh,intentItems as Bh,wantsIntent as wh,wantsDecision as Gh,decideIntent as Hh,questionsIn as Vh,partQueries as Wh,MAX_PARTS as Xh,EXPECTS as Yh,expectsOf as zh}from"./turn-intent.js";import{classifyIntent as jh,checkDecider as Qh,deciderFor as qh,decidedLine as Zh,DECIDER_CHECKS as $h,CHECK_REACH as ex}from"./lookup-decider.js";import{ENDPOINT_JOBS as ox,VENDOR_JOBS as tx,MODEL_TYPES as ax,OPENAI_VOICES as ix,vendorOf as sx,modelJobsOf as nx,endpointJobs as lx,endpointEntry as Sx,isEndpointRef as Ex,resolveEndpointRef as mx,servesChat as cx,presetServes as px,modelsOfType as Tx,isVoiceId as dx,voiceListRequest as _x,normalizeVoices as Ax}from"./endpoint-jobs.js";import{figuresIn as fx,unsupportedFigures as ux,unsupportedNote as Ix,groundingNote as Ox,turnGroundingNote as Nx,stripEchoedWrapper as gx}from"./answer-grounding.js";import{documentContext as Mx,documentTerms as Px,documentBudget as Lx,DOCUMENT_PREFETCH as hx,WHOLE_MAX_PAGES as xx,SCAN_MAX_PAGES as Dx}from"./document-context.js";import{threadMaterialOf as kx,materialReader as yx,isMaterial as bx,MATERIAL_PAGE_CHARS as Ux}from"./thread-material.js";import{turnFlow as Kx,turnFlowChart as Bx,flowWorthDrawing as wx,stepAction as Gx,stepState as Hx}from"./turn-flow.js";import{runTurnPipeline as Wx,runTurnPipelineAsking as Xx,finishTurn as Yx,routeByRule as zx,defineLane as Jx,listLanes as jx,TURN_STAGES as Qx}from"./turn-pipeline.js";import{gatherItems as Zx,isMiss as $x,isWebSearch as eD,GATHER_LIMITS as rD}from"./turn-gather.js";import{TURN_EVENTS as tD,createTurnEvents as aD,activityOf as iD,applyStateDelta as sD}from"./turn-events.js";import{QUESTION_PLAN_LIMITS as lD,SEARCH_UNAVAILABLE as SD,factSchema as ED,factSchemaFor as mD,partsOf as cD,plainEvidence as pD,evidenceFor as TD,rankedEvidence as dD,factPrompt as _D,fitsExpected as AD,snapQuote as RD,standsOn as fD,subjectsOf as uD,factFromReply as ID,carried as OD,againQuery as ND,pointsBack as gD,dependsOn as CD,partsPlan as MD,notFoundLines as PD,factsList as LD,sourcesOf as hD,finishAnswer as xD,gatherFacts as DD}from"./question-plan.js";import{createCassette as kD,gradeAnswer as yD,scoreRuns as bD,textKey as UD,ReplayMiss as vD}from"./turn-replay.js";import{asksIdentity as BD,identitySystem as wD,identityHint as GD}from"./identity.js";import{splitBlocks as VD,mergeNote as WD,syncNote as XD,conflictsIn as YD,resolveConflict as zD}from"./note-merge.js";import{makeFolder as jD,cleanFolderName as QD,repairFolders as qD,noteFolder as ZD,folderTree as $D,folderPath as eF,folderSubtree as rF,renameFolder as oF,moveFolder as tF,moveNote as aF,deleteFolderPlan as iF,findSourceFolder as sF,MAX_FOLDER_NAME as nF,MAX_FOLDER_DEPTH as lF}from"./folders.js";import{htmlToMarkdown as EF,decodeEntities as mF}from"./html-markdown.js";import{runImport as pF,decidePage as TF,decideUpdate as dF,IMPORT_SOURCES as _F,MAX_IMPORT_TITLE as AF}from"./notes-import.js";import{oneNoteSource as fF,toolValue as uF,oneNoteResourceId as IF,missingOneNoteTools as OF,ONENOTE_TOOLS as NF,MAX_PAGE_HTML as gF}from"./onenote-source.js";import{appleNotesSource as MF,appleScriptError as PF,APPLE_NOTES_SCRIPTS as LF,APPLE_NOTES_OPS as hF}from"./apple-notes-source.js";import{STITCH_LIMITS as DF,CUT_FINISH as FF,partChars as kF,splitForWindow as yF,partPrompt as bF,mapParts as UF,reduceNotes as vF,fitAttachments as KF,isNone as BF,continuationMessages as wF,trimOverlap as GF,withStitching as HF,CONTINUE_TEXT as VF}from"./stitch.js";import{presenceFor as XF,presenceDelta as YF,reachOf as zF,withPresence as JF,presenceBlock as jF,roundCount as QF,roundMinutes as qF,PRESENCE_BUDGET_TOKENS as ZF,PRESENCE_KINDS as $F}from"./presence.js";import{PolicyError as rk,POLICY_VERSION as ok,POLICY_TOKEN_TYPE as tk,REDACTION_TIERS as ak,LOCKABLE as ik,FEATURES as sk,PERMISSION_MODES as nk,PRODUCT_HOSTS as lk,normalizeOrgPolicy as Sk,endpointAllowed as Ek,modelAllowed as mk,agentAllowed as ck,permissionMode as pk,routeAllowed as Tk,redactionTier as dk,egressAllowed as _k,settingLocked as Ak,featureEnabled as Rk,applyPolicyToSettings as fk,policyLabel as uk,policyHash as Ik,verifyPolicyToken as Ok,globToRegExp as Nk}from"./policy.js";import{languageInstruction as Ck,RESPONSE_LANGUAGES as Mk}from"./response-language.js";import{NOTE_TOOL_SPECS as Lk,makeNoteToolExecutor as hk}from"./note-tool.js";import{memoryToolProvider as Dk}from"./memory-tool.js";import{captureFromMessage as kk}from"./memory-capture.js";import{skillRunFromSkill as bk,skillPackageFiles as Uk,filterMcpServersForSkill as vk,skillToolSystem as Kk,skillHandle as Bk,rankSkills as wk,skillCatalogSystem as Gk}from"./skill-runtime.js";import{skillFileProvider as Vk,SKILL_FILE_TOOL as Wk,skillEntry as Xk,skillDiscoveryProvider as Yk}from"./skill-files.js";import{SKILL_DRAFT_SCHEMA as Jk,MAX_SKILL_FILE_BYTES as jk,MAX_SKILL_PACKAGE_BYTES as Qk,skillCreatorPrompt as qk,skillIdFrom as Zk,admitPackage as $k,skillFromDraft as ey,packagesFromFiles as ry}from"./skill-creator.js";import{PATH_KIND as ty,FILES_TOOL as ay,checkAttachablePath as iy,secretReason as sy,isSecretPath as ny,pathAttachment as ly,describeAttachedPath as Sy,describePathSize as Ey,displayPath as my,pathAttachmentsOf as cy,withAbsolutePaths as py,attachedFilesProvider as Ty,attachedDocumentsOf as dy,documentReaderFor as _y,sniffType as Ay,normalizePath as Ry,collapseDots as fy,basenameOf as uy,SKIP_DIR_NAMES as Iy}from"./attached-paths.js";import{WRITE_FILE_TOOL as Ny,WRITE_MAX_BYTES as gy,writablePath as Cy,writableContent as My,describeWrite as Py,fileWriteProvider as Ly,diskWriter as hy}from"./file-write.js";import{EXTRACT_ROUTE as Dy,EXTRACT_PROVIDER_ID as Fy,MAX_DOCUMENT_BYTES as ky,PAGE_CHARS as yy,EXTRACT_TYPES as by,validateExtractRequest as Uy,validateExtractResponse as vy,EXTRACT_CONTEXT_ROUTE as Ky,EXTRACT_CONTEXT_MAX_DOCS as By,validateExtractContextRequest as wy,validateExtractContextResponse as Gy,paginateText as Hy,gatewayExtractor as Vy,extractorChain as Wy}from"./extract-capability.js";import{KB_CHUNK_CHARS as Yy,KB_CHUNK_OVERLAP as zy,headingOf as Jy,blocksOf as jy,splitLong as Qy,chunkPages as qy,outlineOf as Zy,citeChunk as $y,pageText as eb}from"./kb-chunk.js";import{KB_NODE_KINDS as ob,KB_EDGE_KINDS as tb,entitiesIn as ab,buildKbGraph as ib,indexGraph as sb,resolveNode as nb,neighbours as lb,pathBetween as Sb,expandChunks as Eb,communities as mb,topEntities as cb,graphReport as pb}from"./kb-graph.js";import{KB_VERSION as db,KB_LIMITS as _b,KB_NOTE_STATUSES as Ab,KB_ACCESS_ALL as Rb,shortHash as fb,kbDocId as ub,createKb as Ib,addDocument as Ob,removeDocument as Nb,addNote as gb,setNoteStatus as Cb,setKbAccess as Mb,kbMayUse as Pb,refreshKb as Lb,chunkById as hb,kbStatus as xb,embedMissing as Db,searchKb as Fb,readPage as kb,serializeKb as yb,deserializeKb as bb}from"./kb-index.js";import{KB_RESEARCH_LIMITS as vb,frameKbQuestion as Kb,spreadOf as Bb,groupByDoc as wb,kbResearch as Gb,kbAttachment as Hb}from"./kb-research.js";import{KB_TOOL as Wb,KB_ACTIONS as Xb,kbResident as Yb,kbToolProvider as zb,localKbClient as Jb,gatewayKbClient as jb,renderSearch as Qb,renderOutline as qb,renderGraph as Zb,renderStatus as $b,renderAdded as eU}from"./kb-tool.js";import{KB_ROUTE as oU,KB_ID_RE as tU,KB_SUBS as aU,KB_SOURCE_KINDS as iU,KB_AGENT_HEADER as sU,routeKb as nU,validateKbCreate as lU,validateKbAdd as SU,validateKbSearch as EU,validateKbResearch as mU,validateKbGraph as cU,validateKbNote as pU,validateKbNoteStatus as TU,validateKbAccess as dU,kbAttachment as _U,kbAttachmentsOf as AU}from"./kb-capability.js";import{MCP_REGISTRY_API as fU,MCP_CATALOG as uU,registryListUrl as IU,fetchMcpRegistryPage as OU,normalizeRegistryPage as NU,normalizeRegistryEntry as gU,mcpServerFromCatalogItem as CU}from"./mcp-registry.js";import{CE_SPECVERSION as PU,CE_TYPE_PREFIX as LU,CE_SOURCE_PREFIX as hU,rfc3339 as xU,ceSourceOf as DU,ceHostOf as FU,toCloudEvent as kU,fromCloudEvent as yU,toCloudEventLines as bU,fromCloudEventLines as UU,toCloudEventBatch as vU}from"./cloudevents.js";import{PUSH_LIMITS as BU,planEventPush as wU,ingestCloudEvents as GU,cursorOf as HU}from"./event-sync.js";import{eventStats as WU,projectYear as XU}from"./event-stats.js";import{SEALED_TYPE as zU,SEALED_VERSION as JU,SealError as jU,webCryptoSealer as QU,nodeSealer as qU,newDeviceKey as ZU,sealBlob as $U,openBlob as ev,shredBlob as rv,isSealedBlob as ov,isShredded as tv}from"./blob-envelope.js";import{USAGE_RING_MAX as iv,COST_BASES as sv,usageRecord as nv,usageFromEvent as lv,usageFromOpenAi as Sv,rollupKey as Ev,applyUsage as mv,summarizeUsage as cv,formatTurnUsage as pv,describeTurnUsage as Tv,promptTokensOf as dv}from"./usage.js";import{rateFor as Av,costFor as Rv,formatUsd as fv,PRICING_BASES as uv,PRICING_LABELS as Iv,normalizePricing as Ov,priceUsage as Nv}from"./usage-pricing.js";import{FACTCHECK_SCHEMA as Cv,FACTCHECK_VERDICTS as Mv,lastClaimOf as Pv,factcheckPrompt as Lv,factcheckVerdict as hv,factcheckKey as xv}from"./cowriter-factcheck.js";import{createVoiceLoop as Fv,VOICE_STATES as kv,MUTE_GRACE_MS as yv,MAX_PENDING_CHARS as bv,CONTINUATION_WINDOW_MS as Uv,ECHO_OVERLAP as vv,ECHO_TAIL_MS as Kv,MIN_BARGE_IN_WORDS as Bv,looksLikeEcho as wv}from"./voice-loop.js";import{voiceStep as Hv,initialVoiceState as Vv,voiceSpeaker as Wv,isFarewell as Xv,ANOTHER_VOICE as Yv}from"./voice-brain.js";import{speakStream as Jv,speakable as jv,SPOKEN_REPLY_HINT as Qv}from"./speak-stream.js";import{createVad as Zv,lowBandEnergy as $v,pcmEnergy as eK,VAD_DEFAULTS as rK}from"./voice-vad.js";import{HF_API as tK,TTS_ARCH_LABEL as aK,ttsArchOf as iK,partitionTtsModels as sK,modelSearchUrl as nK,searchModels as lK,normalizeModel as SK,formatDownloads as EK,describeSearchResult as mK}from"./model-registry.js";import{SAMPLE_RATE as pK,MIN_SECONDS as TK,TARGET_SECONDS as dK,MAX_SECONDS as _K,PROMPT_TEXT as AK,sampleSeconds as RK,sampleTooShort as fK,defaultVoiceName as uK,microphoneError as IK,webMedia as OK,startRecording as NK}from"./voice-sample.js";import{TIER_LABEL as CK,modelRows as MK,catalogStatus as PK,dtypePicker as LK,voicePicker as hK,voiceListRows as xK,diarizeRows as DK,switchOutcome as FK,saveVoiceFailure as kK,saveTimedOut as yK,catalogUnavailable as bK}from"./voice-models.js";import{dictToText as vK,textToDict as KK}from"./redaction-dictionary.js";import{groupRuns as wK,summarizeRun as GK,findRepeats as HK,withCost as VK,verdict as WK,toSanitizedReport as XK}from"./run-details.js";import{RELAYED_HOST as zK,linkSurfaceOf as JK,surfaceLabel as jK,isRelayedTurn as QK,usageFromRelayedTurn as qK,summarizeRelayedUsage as ZK,mergeUsageSummaries as $K,relayedRunsOf as eB,relayedThreadTitle as rB,pullRelayedEvents as oB}from"./link-activity.js";import{parseMcpConfig as aB,parseArgsInput as iB,argsToText as sB,parseEnvInput as nB,envToText as lB,envLikeArgs as SB}from"./mcp-config-import.js";import{mutableRef as mB,refreshArgs as cB,canRefresh as pB,describeRuntime as TB}from"./mcp-launcher.js";import{defaultMcpServers as _B,isDefaultMcpServer as AB,upgradeShippedMcpPins as RB,msGraphMcpArgs as fB,MS_GRAPH_MCP_ENV as uB,MS_GRAPH_MCP_PIN as IB,MS_GRAPH_MCP_FORK as OB}from"./default-mcp-servers.js";import{MONITOR_SOURCES as gB,DEFAULT_MONITOR_PROFILE as CB,monitorProfile as MB,monitorWindowMs as PB,monitorNeedsTools as LB,filterMonitorTools as hB,recentFindings as xB,describeMonitorProfile as DB}from"./monitor-profile.js";import{NOTHING_NEW as kB,isNothingNew as yB,accumulates as bB,priorFindingsText as UB,deltaInstruction as vB,monitorPrompt as KB,applyMonitorReply as BB}from"./monitor-turn.js";import{defaultSkills as GB,meetingNotesSkill as HB,discussionSkill as VB,backfillBuiltinSkills as WB}from"./default-skills.js";import{SURFACES as YB,FEATURES as zB,listFeatures as JB,featureIds as jB}from"./feature-map.js";import{ISSUE_REPO as qB,NEW_ISSUE_BASE as ZB,ISSUE_SEARCH_API as $B,MAX_ISSUE_URL as ew,scrubReportText as rw,diagnosticsText as ow,buildBugReport as tw,newIssueUrl as aw,titleTerms as iw,issueSearchUrl as sw,matchIssues as nw,findExistingIssues as lw,issueCommentText as Sw}from"./bug-report.js";import{WEB_RESEARCH_LIMITS as mw,WEB_TASK_DOMAINS as cw,researchAsk as pw,refineQueries as Tw,parseSearchText as dw,cleanUrl as _w,pageKey as Aw,passagesOf as Rw,webResearch as fw,researchBrief as uw,researchCall as Iw,runResearch as Ow}from"./web-research.js";import{parseAmount as gw,moneyIn as Cw,basisAt as Mw,qualifierAt as Pw,quoteAround as Lw,offersIn as hw,rankOffers as xw,comparable as Dw,basisLabel as Fw,formatValue as kw,unverifiedAmounts as yw,quoteFormIn as bw}from"./offers.js";import{isSecretField as vw,maskSecretFields as Kw,isPersonalField as Bw,commitKind as ww,commitQuestion as Gw,captchaIn as Hw,captchaHandoff as Vw,fenceUntrusted as Ww,isFenced as Xw}from"./page-guard.js";import{BROWSER_RELAY as zw,BROWSER_KINDS as Jw,validateBrowserCall as jw,validateBrowserAnnounce as Qw,validateBrowserResult as qw,createBrowserRelay as Zw,browserRelaySystem as $w}from"./browser-relay.js";export{li as ACCESS_LOG_MAX,ni as ACCESS_LOG_VERSION,i as ACTOR_KINDS,a_ as AGENT_ID_RE,yp as AGENT_REF_RE,JR as ALLOW_ALL,a as ALL_TYPES,_f as AMBIENT_KINDS,Wf as AMBIENT_MAX_WORDS,Yv as ANOTHER_VOICE,pg as API_BASE,hF as APPLE_NOTES_OPS,LF as APPLE_NOTES_SCRIPTS,i_ as APPLIES_TO,iT as ASK_TYPES,n_ as ASSISTANT_ID,bn as ASSISTANT_NAME,$u as AUTOCOMPLETE_MAX_TOKENS,Zu as AUTOCOMPLETE_SYSTEM,eI as AUTOCOMPLETE_TEMPERATURE,Ed as AUTONOMY,ui as AdapterError,l_ as AgentError,Fn as AnalyzerError,JO as BACKUP_KDF_ITERATIONS,TT as BOARD_TOOL_NAME,hM as BOOKKEEPING_KEYS,Gt as BRIEF_STATES,xP as BRINGBACK_COMMAND,Jw as BROWSER_KINDS,zw as BROWSER_RELAY,Rp as BUDGET_DIMENSIONS,mI as BUG_REPORT_SLASH_ITEMS,pn as BUILTIN_TRIGGERS,el as BUILTIN_VOICE_INTENTS,zO as BackupError,Ap as BudgetError,Dn as CADENCES,iL as CAPABILITY_TOOLS_SYSTEM,hU as CE_SOURCE_PREFIX,PU as CE_SPECVERSION,LU as CE_TYPE_PREFIX,cd as CHECKS,ex as CHECK_REACH,Ht as CLAIM_KINDS,n as CLASSES,UO as CLOCK_TOLERANCE_MS,Th as COMPACTION_SYSTEM,YO as COMPRESSIONS,jc as COMPRESSION_MODES,Uv as CONTINUATION_WINDOW_MS,VF as CONTINUE_TEXT,uE as COOLDOWN_MS,sv as COST_BASES,Ig as COUNTED,hr as COWRITER_SYSTEM,xr as COWRITER_TEMPERATURE,o as CURRENT_VERSION,FF as CUT_FINISH,rg as DARK,mf as DATA_SCOPES,CC as DATE_PRESETS,vn as DAYPART_HOUR,$h as DECIDER_CHECKS,tL as DECIDE_TOOL_NAME,C_ as DECLINE_REASONS,ar as DEFAULT_API_ENGINES,dT as DEFAULT_ASK_TIMEOUT_MS,uf as DEFAULT_BLOCK_CHARS,Qc as DEFAULT_COMPRESSION,Sd as DEFAULT_GATE,Ns as DEFAULT_INTERNAL_PATTERNS,ys as DEFAULT_LOCK_MS,YE as DEFAULT_MAX_FINISH_TRIES,ff as DEFAULT_MAX_MEMORIES,XE as DEFAULT_MAX_ROUNDS,Q_ as DEFAULT_MIN_CALLS,CB as DEFAULT_MONITOR_PROFILE,cN as DEFAULT_POLICY,Im as DEFAULT_SHIELD,Om as DEFAULT_STORE,Nt as DEFAULT_THRESHOLD,yn as DEFAULT_WAKE,gc as DESCRIBE_ACTION,AM as DESKTOP_SECTION_IDS,hx as DOCUMENT_PREFETCH,vv as ECHO_OVERLAP,Kv as ECHO_TAIL_MS,l as EFFECTS,S as EGRESS,s_ as EGRESS_CLASSES,XO as ENCRYPTED_TYPE,Tg as ENDPOINTS,ox as ENDPOINT_JOBS,Do as ENGINES_REV,Lo as ENGINE_KINDS,Jd as ENGINE_SPEC_KINDS,kl as ENTITIES_SCHEMA,dg as ENTITLEMENT_PUBLIC_JWK,Fl as ENTITY_TYPES,yi as ENTRY_KINDS,NN as ENTRY_VERSION,t as EVENT_TYPES,Md as EXECUTIVE,jE as EXHAUSTED_NOTE,Yh as EXPECTS,By as EXTRACT_CONTEXT_MAX_DOCS,Ky as EXTRACT_CONTEXT_ROUTE,Fy as EXTRACT_PROVIDER_ID,Dy as EXTRACT_ROUTE,by as EXTRACT_TYPES,Cg as EntitlementError,E as EventError,Cv as FACTCHECK_SCHEMA,Mv as FACTCHECK_VERDICTS,ns as FAILOVER_CAPABILITY_GAP,ss as FAILOVER_CLASS_GAP,ME as FAILOVER_MAX_ATTEMPTS,fN as FAST_FLUSH_MS,uN as FAST_STREAK,sk as FEATURES,zB as FEATURE_MAP,YB as FEATURE_SURFACES,Ag as FEATURE_TIER,QL as FETCHED_TTL_MS,zl as FIELD_TYPES,ay as FILES_TOOL,$p as FINDINGS_SCHEMA,eT as FINDING_KINDS,zm as FIND_ACTION,yc as FIND_DESCRIPTION,bc as FIND_RESIDENT,kc as FIND_TOOL_NAME,zE as FINISH_NUDGES,th as FIT_HEADROOM,ug as FREE_LIMITS,eu as FRONT_PAGES,ec as FUSED_BUDGET_MS,$m as FUSED_CANDIDATES,rD as GATHER_LIMITS,oI as GEARS,Xu as GOAL_MIN_NEW,Dp as GRANTABLE,MR as GRANT_INFO,kp as GRANT_RE,tK as HF_API,xh as HISTORY_NOTE,ac as HUB_TOOL_NAME,md as HUMAN_FLAGS,_F as IMPORT_SOURCES,_E as INPUT_PROGRESS_TOOLS,JC as INSIGHT_KINDS,Vu as INSTRUCTION_RE,gs as INTERNAL_PATTERN_CATALOG,_o as INVARIANTS,mL as IN_PROCESS_IDS,qB as ISSUE_REPO,$B as ISSUE_SEARCH_API,on as JOB_ACTIONS,td as JOB_POST_ID_RE,od as JOB_POST_STATUSES,xN as JOURNAL_BOUNDS,rd as JobPostError,ON as JournalError,Rb as KB_ACCESS_ALL,Xb as KB_ACTIONS,sU as KB_AGENT_HEADER,Yy as KB_CHUNK_CHARS,zy as KB_CHUNK_OVERLAP,tb as KB_EDGE_KINDS,tU as KB_ID_RE,_b as KB_LIMITS,ob as KB_NODE_KINDS,Ab as KB_NOTE_STATUSES,vb as KB_RESEARCH_LIMITS,oU as KB_ROUTE,iU as KB_SOURCE_KINDS,aU as KB_SUBS,Wb as KB_TOOL,db as KB_VERSION,ks as KDF_HASH,Fs as KDF_ITERATIONS,YR as KernelError,g_ as LEDGER_ENTRY_KINDS,N_ as LEDGER_VERSION,eg as LIGHT,CT as LIVE_RUN_STATUSES,ik as LOCKABLE,JE as LOOPING_NUDGE,Xi as LOOP_KINDS,uO as LibraryError,Yi as LoopError,Ux as MATERIAL_PAGE_CHARS,Yt as MAX_BRIEF_CHARS,Xt as MAX_BRIEF_RECORDS,Vt as MAX_CLAIMS,Wt as MAX_CLAIM_REFS,Un as MAX_COMMANDS_PER_DELTA,ZA as MAX_DEPTH,ky as MAX_DOCUMENT_BYTES,Bs as MAX_ENTRIES,Sa as MAX_EXCERPTS,Ea as MAX_EXCERPT_CHARS,lF as MAX_FOLDER_DEPTH,nF as MAX_FOLDER_NAME,Rr as MAX_GRAPH_NODES,AF as MAX_IMPORT_TITLE,ew as MAX_ISSUE_URL,Pd as MAX_JOBS_PER_ROUND,Sf as MAX_MATCHES,Af as MAX_MEMORY_CHARS,vs as MAX_NOTE_CHARS,Jg as MAX_NOTE_IMAGE_BYTES,gF as MAX_PAGE_HTML,Xh as MAX_PARTS,bv as MAX_PENDING_CHARS,Ld as MAX_ROUNDS,_K as MAX_SECONDS,Ks as MAX_SECRET_CHARS,jk as MAX_SKILL_FILE_BYTES,Qk as MAX_SKILL_PACKAGE_BYTES,gt as MAX_SUBJECTS,Ct as MAX_SUBJECT_CHARS,qA as MAX_SUBTASKS,Bl as MAX_SUGGESTIONS,wl as MAX_SUGGESTION_CHARS,la as MAX_SYNTHESIS_CLAIMS,vI as MAX_TAGS,UI as MAX_TAG_LENGTH,Us as MAX_TITLE_CHARS,fO as MAX_TITLE_LEN,oO as MAX_TITLE_LENGTH,Ol as MAX_TOPICS,Nl as MAX_TOPIC_CHARS,uU as MCP_CATALOG,fU as MCP_REGISTRY_API,hS as MCP_SIGN_IN_CODE,KR as MCP_TOOL_NAME,lM as MEETING_INSIGHT_SECTIONS,SM as MEETING_INSIGHT_SYSTEM,Tf as MEMORY_KINDS,df as MEMORY_KIND_NAMES,Of as MEMORY_TOOL_SPEC,Nf as MEMORY_UPCASTERS,pf as MEMORY_VERSION,hp as MERGE_POLICIES,Bv as MIN_BARGE_IN_WORDS,k_ as MIN_FIT,Rf as MIN_MEMORY_CHARS,TK as MIN_SECONDS,$A as MIN_TAKEUP_FIT,tn as MISSED_POLICIES,ax as MODEL_TYPES,tM as MOMENT_BADGES,gB as MONITOR_SOURCES,uB as MS_GRAPH_MCP_ENV,OB as MS_GRAPH_MCP_FORK,IB as MS_GRAPH_MCP_PIN,yv as MUTE_GRACE_MS,GR as ManifestError,nP as McpClient,gf as MemoryError,ba as NEAR_TITLE_DISTANCE,ZB as NEW_ISSUE_BASE,SI as NEW_THREAD_SLASH_ITEMS,G as NOTE_ACTIONS,W as NOTE_ACTION_ERRORS,H as NOTE_ACTION_ORDER,V as NOTE_ACTION_TEMPERATURE,X as NOTE_COMMANDS,z as NOTE_COMMAND_MAX_TOKENS,Y as NOTE_COMMAND_TEMPERATURE,zg as NOTE_IMAGE_SCHEME,jg as NOTE_IMAGE_TYPES,rM as NOTE_SECTIONS,Lk as NOTE_TOOL_SPECS,kB as NOTHING_NEW,dE as OBSERVATION_TOOLS,YN as OMNI_GRAMMAR,XN as OMNI_MODES,NF as ONENOTE_TOOLS,ix as OPENAI_VOICES,Xe as PACER_DEFAULTS,yy as PAGE_CHARS,og as PALETTES,aE as PARALLEL_LOCAL_RE,ty as PATH_KIND,Ka as PDF_MAX_CHARS,Cm as PERMISSION_ANSWERS,gm as PERMISSION_EVENT,nk as PERMISSION_MODES,Mm as PERMISSION_TIMEOUT_MS,Pm as PERMISSION_TOOL_NAME,cg as PLANS,Gr as PLAN_AUTHORS,Vr as PLAN_DECOMPOSE_MAX_TOKENS,Hr as PLAN_DECOMPOSE_SYSTEM,Wr as PLAN_DECOMPOSE_TEMPERATURE,xp as PLAN_MODES,wr as PLAN_ROLES,Xr as PLAN_SECTION_MAX_TOKENS,Yr as PLAN_SECTION_TEMPERATURE,tk as POLICY_TOKEN_TYPE,ok as POLICY_VERSION,tT as POST_KINDS,aT as POST_STATUSES,dM as PREF_SECTIONS,_M as PREF_SECTION_IDS,ZF as PRESENCE_BUDGET_TOKENS,$F as PRESENCE_KINDS,uv as PRICING_BASES,Iv as PRICING_LABELS,lk as PRODUCT_HOSTS,WT as PROJECT_ID_RE,Nd as PROJECT_JOBS_SCHEMA,gd as PROJECT_REVIEW_SCHEMA,hd as PROJECT_RUN_STATUSES,VT as PROJECT_STATUSES,AK as PROMPT_TEXT,ca as PROPOSAL_STATES,Rg as PRO_FEATURES,NS as PUBLIC_REGISTRY,BU as PUSH_LIMITS,rk as PolicyError,HT as ProjectError,Cd as ProjectRunError,lD as QUESTION_PLAN_LIMITS,eo as REACH,Oe as RECALL_LIMIT,Ie as RECALL_MIN_TERMS,gg as RECHECK_INTERVAL_MS,sp as RECIPE_MODES,mp as RECIPE_TOOL_NAME,Yd as RECORD_ENGINE_KINDS,AO as RECORD_KINDS,ZO as RECORD_TYPE,F_ as RECRUIT_SCHEMA,ak as REDACTION_TIERS,yt as REDACTION_TOKEN_TYPES,sl as REFINEMENT_SCHEMA,d as REF_KINDS,No as REGISTRY_STATES,zK as RELAYED_HOST,zR as REQUIRED_PLUGINS,LM as REQUIREMENTS,aL as RERANK_TOOL_NAME,_ as RESOLUTION,Mk as RESPONSE_LANGUAGES,Jl as RESPONSE_MODES,be as RESULTS_PER_ENGINE,um as RESULT_TOOL_NAME,MT as RESUMABLE_RUN_STATUSES,Pi as RETRIEVAL_TOOLS,Rc as REVEAL,Wd as ROLE_KINDS,Lp as ROLE_MODES,hR as ROSTER_KINDS,QE as ROUND_SEPARATOR,jd as ROUTE_PREFERS,PA as RUN_STATUSES,ip as RecipeError,vD as ReplayMiss,Ss as RouterError,hs as RuleError,If as SAME_FACT,pK as SAMPLE_RATE,Dx as SCAN_MAX_PAGES,en as SCHEDULE_KINDS,eA as SCM_KINDS,s as SCOPE_KINDS,Vd as SCORECARD_ENTRY_KINDS,Xd as SCORECARD_VERSION,zU as SEALED_TYPE,JU as SEALED_VERSION,qe as SEARCH_API_PRESETS,ye as SEARCH_ENGINES,mr as SEARCH_STATUS,SD as SEARCH_UNAVAILABLE,BN as SEGMENT_RE,Ut as SELF_LABELS,MM as SETTINGS_GROUPS,WM as SETTINGS_OPEN_DEFAULT,PM as SETTINGS_PAGES,tg as SHAPE,ZE as SHIMS,$E as SHIM_IDS,hP as SIDELINE_COMMANDS,FP as SIDELINE_SLASH_ITEMS,JP as SIDELINE_TOOL_NAME,jP as SIDELINE_TOOL_SPEC,lu as SKILL_CONTEXTS,Jk as SKILL_DRAFT_SCHEMA,cu as SKILL_FILE_KINDS,Wk as SKILL_FILE_TOOL,Su as SKILL_HISTORY_SCOPES,nu as SKILL_MANIFEST_VERSION,Eu as SKILL_MCP_MODES,mu as SKILL_TRUST,pu as SKILL_UPCASTERS,hu as SKILL_VARS,xu as SKILL_VAR_NAMES,Iy as SKIP_DIR_NAMES,lI as SLASH_TYPING_RE,RN as SLOW_FLUSH_MS,pN as SLOW_POLICY,ah as SMALL_WINDOW,sh as SMALL_WINDOW_ROUNDS,PR as SOLO_BUDGET,AC as SORT_LABELS,_C as SORT_MODES,HR as SOURCES,gL as SOURCE_TOOL_SPEC,ou as SOURCE_TRUST,Ua as SPAN_MIN_TERMS,de as SPARE_BLANK_MS,mC as SPEAKER_SLOTS,Qv as SPOKEN_REPLY_HINT,DT as STALLED_AFTER_MS,A_ as STARTER_AGENTS,bp as STARTER_TEAMS,fA as STEP_MAX_CHARS,DF as STITCH_LIMITS,mm as STOPPED_MARK,RO as STRUCTURE_KINDS,Ot as SUBJECT_KINDS,Gl as SUGGESTIONS_SCHEMA,pa as SUPERSEDE_OVERLAP,Ls as SUPPRESSED,Pe as SWARM_ROLES,ia as SYNTHESIS_SCHEMA,an as ScheduleError,jU as SealError,Ze as SearchApiError,ho as SearchEngineError,im as ShimError,Tu as SkillManifestError,tu as SkillSourceError,Bu as SkillVarError,jl as StructuredError,vO as SyncError,dK as TARGET_SECONDS,uA as TASK_TRANSCRIPT_MAX_CHARS,fg as TEAM_FEATURES,yA as TEAM_MANUAL,Yp as TEAM_PLAN_SCHEMA,LR as TEAM_SHAPES,kA as TEAM_TOOL_NAME,$N as THEMES,rT as THREAD_KINDS,oT as THREAD_STATUSES,DP as THREAD_TOOL_NAME,kP as THREAD_TOOL_SPEC,CK as TIER_LABEL,tO as TITLE_RULES_VERSION,ag as TOKEN_NAMES,ig as TOKEN_ROLES,YS as TOKEN_SKEW_MS,gl as TOPICS_SCHEMA,za as TRANSCRIPT_MAX_CHARS,rn as TRIGGER_KINDS,aK as TTS_ARCH_LABEL,tD as TURN_EVENTS,Qx as TURN_STAGES,Pp as TeamError,MA as TeamRunError,Xo as ToolGroupError,IE as UNAVAILABLE_REASONS,_e as UNTITLED,rO as UNTITLED_MEETING,ao as UPCASTERS,_g as UPGRADE_URL,iv as USAGE_RING_MAX,ul as UTTERANCE_DANGLING_MS,fl as UTTERANCE_SETTLE_MS,rK as VAD_DEFAULTS,Ds as VAULT_VERSION,tx as VENDOR_JOBS,kv as VOICE_STATES,bs as VaultError,Kn as VoiceIntentError,Bo as WEATHER_HOST,wo as WEATHER_TIMEOUT_MS,ZP as WEATHER_TOOL_NAME,$P as WEATHER_TOOL_SYSTEM,mw as WEB_RESEARCH_LIMITS,wc as WEB_SEARCH_SPEC,Kc as WEB_SEARCH_TOOL_NAME,Bc as WEB_SEARCH_TOOL_SYSTEM,cw as WEB_TASK_DOMAINS,xx as WHOLE_MAX_PAGES,_t as WIDGET_SURFACES,M_ as WITHDRAW_AFTER,wA as WORKLOG_KINDS,Fp as WORK_GRANTS,tI as WRITER_PREFS,aI as WRITER_PREF_DEFAULTS,Ny as WRITE_FILE_TOOL,gy as WRITE_MAX_BYTES,Go as WeatherError,Ya as YOUTUBE_HOSTS,zi as abortCause,KL as aboutOwnPast,da as accept,bB as accumulates,Cc as actionMenu,wC as activePreset,iD as activityOf,_N as adaptProfile,fP as adaptiveToolRetryHint,PC as addDays,Ob as addDocument,gb as addNote,GI as addTag,GE as addUsage,Bd as adjustSummary,$k as admitPackage,VO as advanceBases,fS as adviceText,ND as againQuery,ck as agentAllowed,TR as agentColor,u_ as agentFromForm,pR as agentHue,dR as agentInitials,cR as agentKind,oe as agentMentionAt,xt as aliasMap,UL as answeredByPrefetch,WE as anthropicTranscript,tr as apiEngine,ir as apiEnginesFrom,Sr as apiTrialVerdict,MF as appleNotesSource,PF as appleScriptError,QT as applyAll,Z_ as applyCard,Lr as applyEdits,FN as applyEntry,BB as applyMonitorReply,fk as applyPolicyToSettings,IM as applySections,sD as applyStateDelta,mv as applyUsage,De as appoint,vo as areaLabel,Vi as argsShape,sB as argsToText,BD as asksIdentity,jf as asksOnlyAboutPage,c_ as assistantAgent,dy as attachedDocumentsOf,Ty as attachedFilesProvider,Po as attemptOrder,bd as attest,HS as authHeader,KS as authorizeUrl,oP as availableDestinations,WB as backfillBuiltinSkills,EN as backupFromRecords,qS as bareToolName,uy as basenameOf,Mw as basisAt,Fw as basisLabel,nN as bestCodec,f_ as blankAgent,SA as blankConnection,Te as blankFirst,$T as blankJobPost,pe as blankNotes,vT as blankProject,vp as blankTeam,TE as blockedToolResult,jy as blocksOf,Qp as boardText,ET as boardToolProvider,mT as boardToolSpec,wN as boundSegments,iA as branchFor,UM as breadcrumb,Xp as breakCycles,Jt as briefId,qt as briefLinks,wP as briefPrompt,Qt as briefTerms,jt as briefToText,$w as browserRelaySystem,rr as buildApiRequest,tw as buildBugReport,Mc as buildGroupDispatchSpec,ib as buildKbGraph,fr as buildNoteGraph,Wa as buildPdfDocument,Ue as buildSearchUrl,Oc as buildToolset,hi as buildTrajectory,ai as buildTranscriptDocument,IR as builtinOrg,Dg as can,Qs as canAddEntry,jT as canJobPostTransition,UT as canProjectTransition,pB as canRefresh,ZS as canRunConcurrently,Eo as canSatisfy,Df as candidatesFrom,Dd as canonical,kS as canonicalResource,sL as capabilityToolsProvider,pL as capabilityView,Vw as captchaHandoff,Hw as captchaIn,Qa as captionTracksFromPlayerResponse,kk as captureFromMessage,AR as cardNumbers,q_ as cardOverride,OD as carried,kL as carriedPlace,Y_ as carveBudget,PK as catalogStatus,bK as catalogUnavailable,VN as catchUpPlan,N as causesAreWellFormed,FU as ceHostOf,DU as ceSourceOf,gM as changedSections,ge as chapPageLink,iy as checkAttachablePath,Qh as checkDecider,To as checkInvariants,Zt as checkKnowledgeInvariants,Mg as checkoutUrl,NT as checkpointFrom,B as chipText,dL as choiceNote,TL as choicePatch,hb as chunkById,qy as chunkPages,$y as citeChunk,na as claimsFromSynthesis,Ye as classifyAnswer,RE as classifyFailure,jh as classifyIntent,he as classifyModel,As as classifySource,vm as claudePermissionResponse,QD as cleanFolderName,aO as cleanTitle,_w as cleanUrl,rI as clipCompletion,dA as clipMessage,Mn as clipText,TA as clipTranscript,iS as coerce,vl as coerceEntities,fy as collapseDots,pP as combineSystemPrompt,Z as commandLineAt,_l as commandLooksFinished,Vn as commandsFromSegments,ww as commitKind,Gw as commitQuestion,mb as communities,Rm as compactValue,ph as compactable,Sh as compactionPrompt,Eh as compactionRecord,Dw as comparable,O as compareEvents,rf as compileQuery,Bn as compileWake,cM as composeMeetingInsightNotes,K as composerChips,Xc as compressToolSpec,Yc as compressToolSpecs,zc as compressionStats,aA as connectionFor,EA as connectionFromForm,xf as containment,zt as contentHash,Lh as contextPlan,wF as continuationMessages,AA as continuationNote,PI as continueList,Ra as converge,Rv as costFor,mi as createAccessLog,fi as createAdapterRegistry,uP as createAdaptiveToolPolicy,xn as createAnalyzerRegistry,cT as createAnswerBox,p as createAppender,uo as createBlobStore,Jp as createBoard,Zw as createBrowserRelay,pp as createBudget,bE as createCallRunner,kD as createCassette,Mi as createCitationCollector,RA as createControl,ze as createEnginePacer,HL as createFetchedStore,IN as createJournal,Ib as createKb,WR as createKernel,fo as createLogStore,wR as createManifest,Ro as createMemoryAdapter,fE as createModelHealth,$i as createModelRouter,wm as createPermissionDesk,Oo as createRegistry,pm as createResultStore,Ps as createRuleEngine,AT as createRunCache,DN as createSegment,rm as createShimLog,iu as createSkillSourceRegistry,zu as createSpendMeter,Hi as createStepRecorder,nS as createStructuredStream,Wo as createToolGroupRegistry,SE as createToolLoopGuard,cn as createTriggerRegistry,aD as createTurnEvents,Gi as createTurnRunner,Rl as createUtteranceGate,Zv as createVad,ws as createVault,Zn as createVoiceIntentRegistry,Fv as createVoiceLoop,nA as credentialEnv,ng as cssVarName,HU as cursorOf,BC as dateFilterLabel,xC as dateRangeOf,IC as dayBucket,WC as dayCounts,LC as dayKey,BO as decide,Hh as decideIntent,TF as decidePage,H_ as decideRecruit,dF as decideUpdate,Zh as decidedLine,qh as deciderFor,uu as declaredAccess,mF as decodeEntities,QO as decryptBackup,Xg as defaultImagePolicy,Wg as defaultLinkPolicy,_B as defaultMcpServers,k as defaultModelId,GB as defaultSkills,JL as defaultTtl,$n as defaultVoiceIntents,uK as defaultVoiceName,OL as deferAttachedSources,Ri as defineAdapter,m_ as defineAgent,On as defineJob,JT as defineJobPost,Jx as defineLane,Wi as defineLoop,hn as defineMeetingAnalyzer,qi as defineMiddleware,Qi as defineModel,bT as defineProject,Zi as defineRouteStrategy,Ms as defineRule,Ql as defineSchema,$e as defineSearchApi,Co as defineSearchEngine,em as defineShim,au as defineSkillSource,up as defineTeam,Vo as defineToolGroup,mn as defineTrigger,qn as defineVoiceIntent,iF as deleteFolderPlan,vB as deltaInstruction,eM as demd,sC as densityRibbon,CD as dependsOn,P as dequeue,$O as deriveBackupKey,ra as deriveBrief,oa as deriveBriefs,Hs as deriveKey,mO as deriveMeetingTitle,hO as deriveTitle,T_ as describeAgent,Sy as describeAttachedPath,BA as describeCall,lA as describeConnection,KC as describeDateRange,r_ as describeEngine,DB as describeMonitorProfile,Ey as describePathSize,Fm as describePermission,Ep as describeRecipeForApproval,Mp as describeRole,TB as describeRuntime,ql as describeSchema,mK as describeSearchResult,VM as describeSettingValue,Am as describeShape,am as describeShims,LT as describeSpend,FA as describeTeamForApproval,SR as describeTeamShape,KE as describeToolCall,Tv as describeTurnUsage,Py as describeWrite,bb as deserializeKb,rP as destinationFromAgent,eP as destinationFromEndpoint,ow as diagnosticsText,DK as diarizeRows,vK as dictToText,Aa as diffProposal,uh as digest,VS as discoverMcpAuth,VB as discussionSkill,hy as diskWriter,ki as displayName,my as displayPath,SL as distributionConfidence,kI as docStats,Lx as documentBudget,Mx as documentContext,_y as documentReaderFor,Px as documentTerms,ju as draftSeparator,ta as driftedRefs,op as dryRunRecipe,gA as dryRunTeam,LK as dtypePicker,Nn as dueJobs,La as duplicateTitles,Ft as earnsBrief,Qn as editDistance,Pr as editKey,nd as effectiveGate,Tt as effectiveGrants,HM as effectiveSettingValue,oE as effectiveToolName,ur as egoGraph,_k as egressAllowed,Db as embedMissing,sT as emptyBoardState,BT as emptyProjectRecord,uT as emptyRun,TI as enabledSkills,jO as encryptBackup,Ek as endpointAllowed,Sx as endpointEntry,lx as endpointJobs,Gd as engineKey,e_ as engineKeyOf,dr as engineLabel,p_ as engineOf,Ge as engineOrder,$d as engineRef,y_ as engineRow,b_ as engineRows,bR as engineStrip,K_ as engineWorth,bl as entitiesFormat,ab as entitiesIn,yl as entitiesPrompt,Kl as entitiesStream,Ys as entryMeta,LN as entryStamp,SB as envLikeArgs,lB as envToText,jo as equipmentFor,Ji as errorFacts,Dc as estimateTokens,w_ as evaluatorPrompt,WU as eventStats,TD as evidenceFor,jL as exchangeOf,Eb as expandChunks,$c as expandRecipe,af as expandReplacement,vu as expandSkillPrompt,zh as expectsOf,AS as explainInstallFailure,SS as explainMcpError,wg as exportDevicePublicKey,JA as extendDependents,JN as extractFilters,Rs as extractUrls,Wy as extractorChain,ID as factFromReply,_D as factPrompt,ED as factSchema,mD as factSchemaFor,xv as factcheckKey,Lv as factcheckPrompt,hv as factcheckVerdict,LD as factsList,CE as failoverExhausted,as as failoverOrder,Rk as featureEnabled,jB as featureIds,Ww as fenceUntrusted,WL as fetchKey,OU as fetchMcpRegistryPage,XS as fetchMcpToken,XL as fetchTitle,YL as fetchedAsSources,zL as fetchedFacts,fx as figuresIn,Ly as fileWriteProvider,vC as filterByDate,QI as filterByTags,Fi as filterEntries,vk as filterMcpServersForSkill,hB as filterMonitorTools,q as filterNoteActions,uC as filterRecords,F as filterSections,Mr as filterTypoEdits,Wm as findActionArgs,Uc as findDispatchProvider,lw as findExistingIssues,rS as findJson,of as findMatches,FO as findRecordRefs,HK as findRepeats,DM as findRow,ie as findSkillByName,sF as findSourceFolder,se as findTargetByName,Hm as findTools,Vm as findToolsResult,Gn as findWakeCommand,qp as findingsInstruction,lT as findingsOf,xD as finishAnswer,Yx as finishTurn,Kd as fit,KF as fitAttachments,$L as fitFor,AD as fitsExpected,Gp as fixedPlan,wx as flowWorthDrawing,zP as foldBackFor,GP as foldBackNote,nT as foldBoard,HP as foldNotes,wT as foldProject,IT as foldRun,eF as folderPath,rF as folderSubtree,$D as folderTree,HO as forkConflict,pi as formatBytes,yC as formatDateTerm,EK as formatDownloads,qR as formatReport,ya as formatSurvey,XI as formatTag,JI as formatTagQuery,EC as formatTalkTime,oi as formatTimestamp,ti as formatTranscript,pv as formatTurnUsage,fv as formatUsd,kw as formatValue,Uo as formatWeather,Kb as frameKbQuestion,J as frameNoteAction,Og as freeCap,Zs as fromB64,yU as fromCloudEvent,UU as fromCloudEventLines,$f as frontPageInstruction,Zf as frontPagesAskedAbout,Rt as fuseRRF,Qm as fusedRanker,ld as gateAllows,Vy as gatewayExtractor,jb as gatewayKbClient,RS as gatewayNotBackAdvice,DD as gatherFacts,Zx as gatherItems,Bg as generateDeviceKey,NP as getMcpProviders,ko as getWeather,dl as gistOpening,Tl as gistText,Nk as globToRegExp,Yu as goalDraftAllowed,yD as gradeAnswer,gp as grantAllows,NR as grantChoices,gR as grantsFromChoices,Jo as grantsNeededFor,pb as graphReport,Or as graphStats,Qu as groundingBlock,Ox as groundingNote,sM as groupActionsByOwner,wb as groupByDoc,kM as groupById,D as groupModels,NC as groupRecords,wK as groupRuns,ri as groupSegments,FC as hasDateTerms,ZC as hasInsights,$o as hasSubstance,wI as hasTag,zI as hasTagTerms,Jy as headingOf,hh as historyContext,YA as holdsGrants,jM as homeChecklist,Uf as homePlace,fs as hostMatches,Zo as housekeepingTarget,EF as htmlToMarkdown,tc as hubSpec,aN as identityCodec,GD as identityHint,wD as identitySystem,IL as imageAttachmentsOf,_L as inProcessPatch,cL as inProcessView,LI as indentSelection,sb as indexGraph,GU as ingestCloudEvents,xo as inheritEngineDefaults,Vv as initialVoiceState,QC as insightKindOf,pM as insightTranscript,cS as installHintFor,Wu as instructionOnLine,Kh as intentFromReply,Bh as intentItems,bh as intentNeedOptions,yh as intentNeeds,vh as intentPrompt,Uh as intentSchema,qN as isActionable,Ko as isAmbiguousLocation,pO as isBetterTitleSource,ce as isBlankNote,OR as isBuiltin,$S as isCacheable,Em as isClientNote,oh as isContextLimitError,AB as isDefaultMcpServer,qO as isEncryptedBackup,Ex as isEndpointRef,PN as isEntry,Xv as isFarewell,Xw as isFenced,pl as isFillerSentence,iO as isGenericTitle,IP as isInvalidToolParametersResult,et as isLocalHelper,Js as isLocked,pE as isLoopableTool,bx as isMaterial,$x as isMiss,CA as isModelUnavailable,BF as isNoneNote,aS as isNothing,yB as isNothingNew,hm as isPermissionTool,Bw as isPersonalField,Qo as isPleasantry,hg as isPro,M as isQueued,NO as isRecordId,bt as isRedactionToken,R as isRef,QK as isRelayedTurn,Ke as isResultHost,gT as isResumable,du as isSafeSkillPath,ov as isSealedBlob,oN as isSealedRecord,Ve as isSearchPage,vw as isSecretField,ny as isSecretPath,vt as isSelfLabel,GO as isSettled,tv as isShredded,kC as isSingleDay,pI as isSkillEnabled,ih as isSmallWindow,DE as isSourceGateError,pC as isSpeakerImageValue,mS as isStaleMcpSession,ht as isSubjectCandidate,rt as isSystemModel,xg as isTeam,MN as isTombstone,c as isValidEvent,Mf as isValidMemory,CO as isValidStoredRecord,dx as isVoiceId,eD as isWebSearch,ja as isYouTubeUrl,Sw as issueCommentText,sw as issueSearchUrl,B_ as jobApplications,zA as jobFromSubtask,ed as jobPostFromForm,Ad as jobResults,qT as jobToRole,gn as jobsForEvent,Id as jobsPrompt,_U as kbAttachment,AU as kbAttachmentsOf,ub as kbDocId,Pb as kbMayUse,Zy as kbOutlineOf,Gb as kbResearch,Hb as kbResearchAttachment,Yb as kbResident,xb as kbStatus,zb as kbToolProvider,eh as keepRecentFor,tN as keyCache,Di as lanesOf,Ck as languageInstruction,Pv as lastClaimOf,nc as lastUserText,it as layoutFlowchart,P_ as ledgerKey,Ug as licenseFromPayload,ot as lightestLocalHelper,Gu as lineAt,I as linearize,Ba as linesFromItems,Jf as linkAttachments,fa as linkClaims,kO as linkRecordRefs,JK as linkSurfaceOf,vM as linkTo,KM as linkToRow,Oi as linkifyCitations,Yf as linksToRead,yu as lintSkillPrompt,gr as lintText,JB as listFeatures,jx as listLanes,xM as listRows,Jb as localKbClient,YC as localeWeekStart,js as lockedSummary,wv as looksLikeEcho,Va as looksScanned,hL as lookupLabel,LL as lookupResult,$v as lowBandEnergy,Ei as makeAccessEvent,xc as makeDispatchProvider,kd as makeEntry,jD as makeFolder,Lc as makeGroupDispatchExecutor,gN as makeJournalEntry,h_ as makeLedgerEntry,hk as makeNoteToolExecutor,mc as makePromptedTranscript,OO as makeRecordId,A as makeRef,ms as makeSourceStore,ci as makeStorageTier,oc as makeToolHub,cs as manifestText,rp as mapInput,UF as mapParts,Bf as markUsed,gi as markdownUrl,Kw as maskSecretFields,kf as matchForForget,tf as matchIndexFor,nw as matchIssues,AI as matchSlashRecipe,_I as matchSlashSkill,fI as matchSlashTeam,Pn as matchSummary,UC as matchesDateRange,jI as matchesTagFilter,yx as materialReader,zS as mcpAuthKey,MP as mcpBackoff,PP as mcpClientFor,vR as mcpDispatchProvider,mP as mcpInventorySystem,lP as mcpProvider,CU as mcpServerFromCatalogItem,EP as mcpSharedSystem,XR as meetDecisions,us as meetReach,_n as meetingEndedTrigger,EM as meetingInsightPrompt,qC as meetingInsights,HB as meetingNotesSkill,dn as meetingStartedTrigger,TO as meetingTitlePrompt,Kf as memoryBlock,Pf as memoryKey,Dk as memoryToolProvider,Gf as memoryToolSystem,ne as mentionAnswerPrefix,xa as mentionsFrom,iP as mergeEndpointDestinations,we as mergeEngineResults,WD as mergeNote,Kr as mergeResearchLanes,UN as mergeSegments,ae as mergeSkillPrompt,NM as mergeStamped,pA as mergeTranscript,$K as mergeUsageSummaries,mh as messagesAfter,cA as messagesFor,IK as microphoneError,rh as minWindowFor,TS as missingCommandIn,pS as missingCommandMessage,OF as missingOneNoteTools,sR as missingStarters,er as missingVars,mk as modelAllowed,nx as modelJobsOf,MK as modelRows,lm as modelSaid,nK as modelSearchUrl,y as modelSummary,nm as modelView,Tx as modelsOfType,aM as momentBadge,Cw as moneyIn,il as monitorIntent,LB as monitorNeedsTools,MB as monitorProfile,KB as monitorPrompt,PB as monitorWindowMs,VC as monthGrid,tF as moveFolder,aF as moveNote,L as moveQueued,fB as msGraphMcpArgs,ut as multiSearch,mB as mutableRef,XC as nearbyDays,U_ as needForJob,fu as needsBridge,eE as needsConfirmation,vg as needsRecheck,vf as needsWhere,Ih as needsWhole,lb as neighbours,ZU as newDeviceKey,aw as newIssueUrl,oC as newNoteImageId,_A as newSteps,yL as newsAsk,nn as nextFireAt,VP as nextSidelineIndex,Sn as nextWakeAt,sN as nodeCodec,OS as nodeSatisfies,qU as nodeSealer,OE as normModelName,E_ as normalizeAgent,dp as normalizeBudget,L_ as normalizeCall,oA as normalizeConnection,wd as normalizeEngine,qd as normalizeEngineSpec,sd as normalizeGate,Np as normalizeGrants,sI as normalizeIntent,zT as normalizeJobPost,Cf as normalizeMemory,SK as normalizeModel,Sk as normalizeOrgPolicy,Ry as normalizePath,dS as normalizePlatform,Qd as normalizePolicy,Ov as normalizePricing,yT as normalizeProject,Ia as normalizeRecord,Oa as normalizeRecords,gU as normalizeRegistryEntry,NU as normalizeRegistryPage,HA as normalizeRequest,Hd as normalizeScm,Pu as normalizeSkill,Jn as normalizeSpeech,gO as normalizeStoredRecord,Mt as normalizeSubject,KI as normalizeTag,BI as normalizeTags,Op as normalizeTeam,hl as normalizeTopic,xl as normalizeTopics,HE as normalizeUsage,Ax as normalizeVoices,iI as normalizeWriterPrefs,PD as notFoundLines,Q as noteActionItems,j as noteActionLabel,YD as noteConflictsIn,ZD as noteFolder,Qg as noteImageId,Zg as noteImageIds,qg as noteImageRef,$g as noteImageRefs,al as noteIntent,oM as noteSectionKind,XP as noteUnits,uS as npmInstallCommand,DR as observeInbox,Ng as observeSince,FR as observeStrip,Cn as occurrenceKey,ln as occurrencesBetween,He as offTopic,BL as offeredSearch,hw as offersIn,Xm as oneLiner,IF as oneNoteResourceId,fF as oneNoteSource,uF as oneNoteToolValue,VE as openAiTranscript,ev as openBlob,lL as openDecision,Ws as openEntry,rN as openRecord,wa as orderLines,Iu as originLabel,_u as originOf,rC as orphanNoteImages,Pa as orphanRecords,CI as outlineOf,Ym as overlapRank,HN as overlayEntries,ES as packageFromArgs,ry as packagesFromFiles,bL as pageAsk,FM as pageById,Qf as pageInstruction,Aw as pageKey,eb as pageText,Ha as pageTextFromItems,yM as pagesOf,Hy as paginateText,sg as paletteFor,Re as paragraphAt,Ga as paragraphsFromLines,tE as parallelEligible,re as parseAgentMention,gw as parseAmount,iB as parseArgsInput,DS as parseAuthChallenge,$t as parseBriefText,bP as parseBringBack,cI as parseBugCommand,Xn as parseClock,Hn as parseCommand,En as parseCron,DC as parseDateQuery,Wn as parseDuration,Ul as parseEntities,nB as parseEnvInput,G_ as parseEvaluation,jp as parseFindings,at as parseFlowchart,fd as parseJobs,ZR as parseJsonl,BM as parseLink,MI as parseListItem,aB as parseMcpConfig,iM as parseMeetingNotes,aC as parseMeetingText,EI as parseNewThread,zn as parseNumberWords,zN as parseOmni,Hp as parsePlan,Jr as parsePlanTasks,IO as parseRecordId,Sl as parseRefinement,tA as parseRemote,ud as parseReview,dw as parseSearchText,KN as parseSegmentName,yP as parseSideline,CS as parseSignInPrompt,te as parseSkillMention,ku as parseSkillVars,sS as parseStructured,Wl as parseSuggestions,YI as parseTagQuery,ei as parseTimedText,dO as parseTitleResponse,pc as parseToolCalls,Ll as parseTopics,bo as parseWeather,Yn as parseWhen,Ja as parseYouTubeUrl,kF as partChars,bF as partPrompt,Wh as partQueries,sK as partitionTtsModels,cD as partsOf,MD as partsPlan,Rw as passagesOf,sr as patchApiEntries,ly as pathAttachment,cy as pathAttachmentsOf,Sb as pathBetween,eK as pcmEnergy,C as pendingQueue,ym as permissionAllowed,km as permissionAnswer,Bm as permissionIcon,Dm as permissionKeys,Km as permissionLine,pk as permissionMode,xm as permissionRequestFromClaude,Lm as permissionToolSpec,An as personJoinedTrigger,xi as phasesOf,Rn as phraseTrigger,Za as pickCaptionTrack,GC as pickDay,Ce as pickLinkTarget,dN as pickProfile,Be as pickResults,uM as pickSections,is as pinnedOrderOf,Dh as placeItems,pD as plainEvidence,Zr as planAttribution,qr as planBody,lh as planCompaction,wU as planEventPush,Lg as planLabel,Pg as planOf,Qr as planParts,ft as planQueries,Nh as planRetrieval,zr as planSectionSystem,wO as planSync,jr as planTitleFor,sE as planToolRound,Fh as planTurn,Vp as plannerPrompt,$M as pointsAtGateway,gD as pointsBack,AN as policyFor,Ik as policyHash,uk as policyLabel,I_ as poolFor,ts as preferenceFor,PL as prefetchAttachment,wL as prefetchBudgetMs,ML as prefetchPlan,jF as presenceBlock,YF as presenceDelta,XF as presenceFor,px as presetServes,Nv as priceUsage,UB as priorFindingsText,xT as priorWorkFor,_i as projectChain,KT as projectFromForm,GT as projectProgress,XU as projectYear,h as promoteQueued,aR as promoteRoles,vi as promptEntries,dv as promptTokensOf,cc as promptedToolsSystem,Ec as promptedTranscript,W_ as proposalFromNeeds,X_ as proposalToAgent,Ta as propose,wf as pruneMemories,oB as pullRelayedEvents,Pw as qualifierAt,un as questionTrigger,Vh as questionsIn,bM as quickRows,Lw as quoteAround,bw as quoteFormIn,jm as rankFused,Ee as rankLinkTargets,xw as rankOffers,vr as rankResearchCards,wk as rankSkills,kt as rankSubjects,dD as rankedEvidence,Av as rateFor,zF as reachOf,ro as reachRank,oo as reachSatisfies,or as readApiResponse,bS as readAuthServerMetadata,kb as readPage,vS as readRegistration,yS as readResourceMetadata,Ts as readSource,BP as readThread,wS as readTokenResponse,EO as readableWhen,ZT as readyJobs,yf as recall,Um as recallPermission,ue as recallPicks,fe as recallQuery,xB as recentFindings,RI as recipeInvocationText,ep as recipeParams,lp as recipeToolProvider,Sp as recipeToolSpec,Ff as reconcile,Mo as reconcileEngines,SN as recordsFromBackup,z_ as recruitEvents,V_ as recruitForRun,J_ as recruitJob,Si as redactAccessArgs,ga as redactedTokensIn,Ca as redactionCost,dk as redactionTier,vF as reduceNotes,Tw as refineQueries,cl as refineSpokenCommand,ll as refinementFormat,nl as refinementPrompt,El as refinementStream,cB as refreshArgs,Lb as refreshKb,JS as refreshedAuth,WS as registerMcpClient,US as registrationRequest,IU as registryListUrl,_a as reject,eB as relayedRunsOf,rB as relayedThreadTitle,bm as rememberPermission,U as rememberRecent,ol as reminderIntent,Nb as removeDocument,HI as removeTag,oF as renameFolder,eU as renderAdded,RL as renderContent,st as renderFlowchartSvg,Zb as renderGraph,Vg as renderMarkdown,qb as renderOutline,Qb as renderSearch,$b as renderStatus,yO as repairAnswerMarkup,Ni as repairCitedLinks,qD as repairFolders,tS as repairJson,nf as replaceAll,lf as replaceAllInRange,sf as replaceMatch,QR as replay,rs as requirementsFor,os as requirementsForStep,qm as rerankThrough,pw as researchAsk,uw as researchBrief,Iw as researchCall,yr as researchRelevance,Ur as researchSnippet,CP as resetMcp,hC as resolveDateValue,mx as resolveEndpointRef,nb as resolveNode,zD as resolveNoteConflict,f as resolveRef,UP as resolveSidelineTarget,jN as resolveSince,Dt as resolveSubjects,__ as resolveTeam,Eg as resolveTheme,$l as responseFormat,fm as resultToolSpec,NA as resumeTeam,tm as retirableShims,je as retryAfterMs,uc as revealCut,fc as revealStep,Od as reviewPrompt,oS as rewriteJson,xU as rfc3339,Le as roleById,_R as roleCardId,Ev as rollupKey,mR as rosterRows,Rd as roundBudget,UE as roundCap,QF as roundCount,dd as roundJobs,qF as roundMinutes,EE as roundSignature,Tk as routeAllowed,zx as routeByRule,v_ as routeFor,di as routeGraph,nU as routeKb,Fe as routeTeam,OC as rowTime,OT as runFromEvents,pF as runImport,kR as runLanes,tp as runPlan,Td as runProject,ap as runRecipe,Ow as runResearch,xL as runResearchItem,dm as runResultQuery,hT as runState,OA as runTeam,nE as runToolRound,yE as runTurnLoop,Wx as runTurnPipeline,Xx as runTurnPipelineAsking,gE as runWithFailover,Fr as salientTerms,Vf as sameMemory,ls as sameModelKey,Ou as sameSkillOrigin,WI as sameTags,Al as sameUtterance,RK as sampleSeconds,fK as sampleTooShort,yK as saveTimedOut,kK as saveVoiceFailure,bf as saysWhere,TN as scalePolicy,tl as scheduleIntent,Cp as scmAllows,bD as scoreRuns,rw as scrubReportText,$U as sealBlob,Vs as sealEntry,eN as sealRecord,lr as searchApiChoices,zs as searchEntries,Hc as searchFailureOf,Fb as searchKb,lK as searchModels,Je as searchPolitely,Gc as searchResultsToText,YM as searchSettings,Tr as searchStatus,PO as searchTextFor,sy as secretReason,OM as sectionHash,mM as sectionMaxTokens,qM as sectionOfRow,RM as sectionSpec,fM as sectionValue,tP as seedDestinations,kN as segmentBytes,yN as segmentEntries,vN as segmentName,GN as segmentsFor,_h as selectContext,yI as selectionStats,yb as serializeKb,cx as servesChat,bC as setDateTerm,Mb as setKbAccess,Cb as setNoteStatus,GM as setSettingValue,Ak as settingLocked,wM as settingValue,QM as settingsGateOf,XM as settingsOpenMode,JM as settingsStatusAll,zM as settingsStatusOf,ml as settleRefinement,Fd as sha256,Tm as shieldToolResult,HC as shiftMonth,fb as shortHash,ps as shortUrl,cO as shouldAutoTitle,bN as shouldRotate,aP as shouldSeedDestinations,rv as shredBlob,YP as sidelinePath,QP as sidelineToolProvider,Gg as signChallenge,MS as signInError,PS as signInFromError,LS as signInToolResult,es as signalsFrom,hf as similarity,Gk as skillCatalogSystem,CR as skillChoices,qk as skillCreatorPrompt,Yk as skillDiscoveryProvider,Xk as skillEntry,Vk as skillFileProvider,Ru as skillFiles,ey as skillFromDraft,Bk as skillHandle,Zk as skillIdFrom,NI as skillInvocationLabel,OI as skillInvocationOf,Nu as skillIsStale,Uk as skillPackageFiles,bk as skillRunFromSkill,Kk as skillToolSystem,Du as skillVar,Ku as skillVarGuidance,Fu as skillVarPattern,II as slashCommandInsert,dI as slashCommandItems,Lf as slotOf,d_ as slugAgentId,Bp as slugTeamName,RD as snapQuote,Ay as sniffType,xO as snippetOf,fR as soloTeam,fC as sortRecords,RC as sortStamp,cP as sourceCitationSystem,xE as sourceGate,hE as sourceGuardFor,ds as sourceId,WP as sourceOf,Is as sourcePolicyFor,LE as sourcePolicySettings,Os as sourceUrlsOf,Ci as sourcesFromToolText,hD as sourcesOf,Da as spanningQuestions,Jv as speakStream,jv as speakable,lC as speakerBreakdown,TC as speakerLabeller,iC as speakerStats,SC as speakerTimeline,PT as spendOf,yR as spendRows,yF as splitForWindow,Qy as splitLong,VD as splitNoteBlocks,Bb as spreadOf,mE as stableToolCallKey,KO as stampOf,IS as standaloneInstallCommand,fD as standsOn,MC as startOfDay,NK as startRecording,R_ as starterAgents,iR as starterTeam,Up as starterTeams,Gx as stepAction,wE as stepResultNote,BE as stepResultText,Hx as stepState,Sm as stoppedText,zf as storyLinkOf,iN as streamCodec,gx as stripEchoedWrapper,eC as stripNoteImageRefs,Kt as stripQualifiers,Pt as subjectKey,Lt as subjectTokens,uD as subjectsOf,Uu as substituteSkillVars,VA as subtaskFromRequest,ZI as suggestExistingTags,Bt as suggestMerges,bu as suggestSkillVar,Vl as suggestionsFormat,Hl as suggestionsPrompt,Xl as suggestionsStream,vd as summarize,x_ as summarizeEngine,ZK as summarizeRelayedUsage,GK as summarizeRun,_r as summarizeSearch,om as summarizeShims,cv as summarizeUsage,jC as summarySections,hN as supersedes,xe as supportsSubagents,jK as surfaceLabel,Fa as surveyCorpus,FK as switchOutcome,XD as syncNote,sa as synthesisPrompt,ch as systemWithSummary,qI as tagFacets,pr as tagResults,$I as tagsSearchText,WA as takeUp,XA as takeUpLine,jA as taskTree,_d as teamForRound,Kp as teamFromForm,nR as teamHealth,uI as teamInvocationText,oR as teamLanes,rR as teamLine,lR as teamShape,hA as teamToolProvider,xA as teamToolSpec,DA as teamToolTimeoutMs,uR as teamsWithSolos,gP as testMcpServer,UD as textKey,KK as textToDict,Sg as themeStylesheet,vP as threadManifest,kx as threadMaterialOf,QA as threadRows,Ui as threadTitle,KP as threadToolProvider,Bi as threadTree,bi as threadsOf,ka as thresholdSweep,Fg as tierFor,o_ as tierOf,$a as timedTextUrl,rl as timerIntent,Tn as timerTrigger,SO as titleFromDate,lO as titleFromParticipants,sO as titleFromSummary,nO as titleFromTopics,iw as titleTerms,qs as toB64,Zp as toBriefClaims,fL as toChatMessages,kU as toCloudEvent,vU as toCloudEventBatch,bU as toCloudEventLines,lg as toCssVars,LO as toIndexEntry,Zl as toJsonSchema,$R as toJsonl,mo as toModelSchema,co as toModelSchemas,uL as toMultimodalMessages,XK as toSanitizedReport,MO as toSearchRecord,xI as toggleLinePrefix,FI as toggleLink,VI as toggleTag,DI as toggleTask,hI as toggleWrap,GS as tokenExpired,BS as tokenRequest,jn as tokenize,CN as tombstone,dc as toolChannel,Zm as toolDoc,cE as toolMadeProgress,zo as toolNeedFor,Ph as toolPlan,TP as toolStatus,QS as toolTraits,gh as toolsWanted,cb as topEntities,kr as topicTerms,fn as topicTrigger,Pl as topicsFormat,Ml as topicsPrompt,Cl as topicsSchema,Dl as topicsStream,rE as traitsIndex,_c as transcriptFor,ii as transcriptFromTracks,$ as triggerQueryAt,Jc as trimDescription,Ir as trimGraph,GF as trimOverlap,Au as trustOf,iK as ttsArchOf,Kx as turnFlow,Bx as turnFlowChart,Nx as turnGroundingNote,Ki as turnsOf,eS as unfence,Gs as unlockVault,ux as unsupportedFigures,Ix as unsupportedNote,yw as unverifiedAmounts,ve as unwrapRedirect,io as upcast,so as upcastAll,Hf as upcastMemory,Cu as upcastSkill,Mu as upcastSkills,RB as upgradeShippedMcpPins,RR as upsertAgents,lv as usageFromEvent,Sv as usageFromOpenAi,qK as usageFromRelayedTurn,_p as usageOf,nv as usageRecord,Pc as validateAction,S_ as validateAgent,Qw as validateBrowserAnnounce,jw as validateBrowserCall,qw as validateBrowserResult,Tp as validateBudget,lo as validateCapability,rA as validateConnection,Zd as validateEngineSpec,Xs as validateEntry,m as validateEvent,wy as validateExtractContextRequest,Gy as validateExtractContextResponse,Uy as validateExtractRequest,vy as validateExtractResponse,id as validateGate,So as validateInvocation,YT as validateJobPost,dU as validateKbAccess,SU as validateKbAdd,lU as validateKbCreate,cU as validateKbGraph,pU as validateKbNote,TU as validateKbNoteStatus,mU as validateKbResearch,EU as validateKbSearch,kT as validateProject,Zc as validateRecipe,sn as validateSchedule,gu as validateSkill,Ip as validateTeam,lt as validateView,St as validateViewInvocation,ct as validateWidget,pt as validateWidgetMessage,_P as vaultWidgetSystem,sx as vendorOf,WK as verdict,Ud as verifyAttested,yd as verifyChain,yg as verifyEntitlement,Ok as verifyPolicyToken,bg as verifySignedToken,cr as viaOf,qa as videoMetaFromPlayerResponse,nr as viewApiEntries,Et as viewResult,Tc as visiblePrefix,ha as vocabularyDrift,In as voiceCommandTrigger,_x as voiceListRequest,xK as voiceListRows,hK as voicePicker,Wv as voiceSpeaker,Hv as voiceStep,wn as wakeFor,Ma as wantedPages,Gh as wantsDecision,wh as wantsIntent,QN as wantsModel,AP as wantsVaultGuidance,Wp as waves,FL as weatherFollowupPlace,rL as weatherFromSearch,DL as weatherPlace,eL as weatherToolProvider,yo as weatherUrl,QU as webCryptoSealer,OK as webMedia,br as webQuery,vL as webRedoAsk,fw as webResearch,Vc as webSearchToolProvider,FS as wellKnownUrls,ER as whereItWorks,dP as widgetAuthoringSystem,dt as widgetIcon,Se as wikiQueryAt,Na as wikilinksIn,ZL as windowOf,py as withAbsolutePaths,pT as withBoardTool,VK as withCost,VL as withFetchedMemo,hc as withGuidance,ic as withHint,sc as withLead,JF as withPresence,Sc as withPromptedTools,b as withRecent,_m as withResultShield,RT as withRunCache,NL as withSourceTool,HF as withStitching,vE as withToolSystem,kg as withinFreeLimit,FE as withinReach,Rh as withoutOwnInstructions,DO as wordCount,Cr as wordDiff,KA as workLogEvidence,UA as workLogFor,vA as workLogText,sA as worktreeDirFor,Ch as worldAnswered,Mh as worldPlanned,My as writableContent,Cy as writablePath,Hu as writerAffordance,qu as writerRequest,Ju as writerTail};
1
+ import{CURRENT_VERSION as o,EVENT_TYPES as t,ALL_TYPES as a,ACTOR_KINDS as i,SCOPE_KINDS as s,CLASSES as n,EFFECTS as S,EGRESS as l,EventError as E,validateEvent as m,isValidEvent as c,createAppender as p}from"./event.js";import{REF_KINDS as d,RESOLUTION as _,makeRef as R,isRef as A,resolveRef as f}from"./ref.js";import{linearize as u,compareEvents as O,causesAreWellFormed as N}from"./order.js";import{pendingQueue as C,isQueued as P,dequeue as M,moveQueued as L,promoteQueued as h}from"./queue.js";import{groupModels as D,filterSections as F,defaultModelId as k,modelSummary as y,withRecent as b,rememberRecent as U}from"./model-picker.js";import{composerChips as K,chipText as B}from"./composer-chips.js";import{NOTE_ACTIONS as w,NOTE_ACTION_ORDER as H,NOTE_ACTION_TEMPERATURE as V,NOTE_ACTION_ERRORS as W,NOTE_COMMANDS as X,NOTE_COMMAND_TEMPERATURE as Y,NOTE_COMMAND_MAX_TOKENS as z,frameNoteAction as J,noteActionLabel as j,noteActionItems as Q,filterNoteActions as q,commandLineAt as Z,triggerQueryAt as $}from"./note-actions.js";import{parseAgentMention as re,agentMentionAt as oe,parseSkillMention as te,mergeSkillPrompt as ae,findSkillByName as ie,findTargetByName as se,mentionAnswerPrefix as ne}from"./note-mentions.js";import{wikiQueryAt as le,rankLinkTargets as Ee}from"./note-links.js";import{isBlankNote as ce,blankNotes as pe,blankFirst as Te,SPARE_BLANK_MS as de,UNTITLED as _e}from"./note-blank.js";import{paragraphAt as Ae,recallQuery as fe,recallPicks as Ie,RECALL_MIN_TERMS as ue,RECALL_LIMIT as Oe}from"./note-recall.js";import{chapPageLink as ge,pickLinkTarget as Ce}from"./note-link.js";import{SWARM_ROLES as Me,roleById as Le,classifyModel as he,supportsSubagents as xe,appoint as De,routeTeam as Fe}from"./cowriter-router.js";import{SEARCH_ENGINES as ye,RESULTS_PER_ENGINE as be,buildSearchUrl as Ue,unwrapRedirect as ve,isResultHost as Ke,pickResults as Be,mergeEngineResults as Ge,engineOrder as we,offTopic as He,isSearchPage as Ve}from"./web-search.js";import{PACER_DEFAULTS as Xe,classifyAnswer as Ye,createEnginePacer as ze,searchPolitely as Je,retryAfterMs as je}from"./engine-pacer.js";import{SEARCH_API_PRESETS as qe,SearchApiError as Ze,defineSearchApi as $e,missingVars as er,buildApiRequest as rr,readApiResponse as or,apiEngine as tr,DEFAULT_API_ENGINES as ar,apiEnginesFrom as ir,patchApiEntries as sr,viewApiEntries as nr,searchApiChoices as Sr,apiTrialVerdict as lr}from"./search-api.js";import{SEARCH_STATUS as mr,viaOf as cr,tagResults as pr,searchStatus as Tr,engineLabel as dr,summarizeSearch as _r}from"./search-outcome.js";import{MAX_GRAPH_NODES as Ar,buildNoteGraph as fr,egoGraph as Ir,trimGraph as ur,graphStats as Or}from"./note-graph.js";import{lintText as gr,wordDiff as Cr,filterTypoEdits as Pr,editKey as Mr,applyEdits as Lr,COWRITER_SYSTEM as hr,COWRITER_TEMPERATURE as xr}from"./cowriter.js";import{salientTerms as Fr,topicTerms as kr,researchRelevance as yr,webQuery as br,researchSnippet as Ur,rankResearchCards as vr,mergeResearchLanes as Kr}from"./note-research.js";import{PLAN_ROLES as Gr,PLAN_AUTHORS as wr,PLAN_DECOMPOSE_SYSTEM as Hr,PLAN_DECOMPOSE_MAX_TOKENS as Vr,PLAN_DECOMPOSE_TEMPERATURE as Wr,PLAN_SECTION_MAX_TOKENS as Xr,PLAN_SECTION_TEMPERATURE as Yr,planSectionSystem as zr,parsePlanTasks as Jr,planTitleFor as jr,planParts as Qr,planBody as qr,planAttribution as Zr}from"./note-plan.js";import{REACH as eo,reachRank as ro,reachSatisfies as oo}from"./reach.js";import{UPCASTERS as ao,upcast as io,upcastAll as so}from"./upcast.js";import{validateCapability as So,validateInvocation as lo,canSatisfy as Eo,toModelSchema as mo,toModelSchemas as co}from"./capability.js";import{checkInvariants as To,INVARIANTS as _o}from"./invariants.js";import{createMemoryAdapter as Ao,createLogStore as fo,createBlobStore as Io}from"./store.js";import{createRegistry as Oo,REGISTRY_STATES as No}from"./registry.js";import{defineSearchEngine as Co,reconcileEngines as Po,attemptOrder as Mo,ENGINE_KINDS as Lo,SearchEngineError as ho,inheritEngineDefaults as xo,ENGINES_REV as Do}from"./search-engines.js";import{getWeather as ko,weatherUrl as yo,parseWeather as bo,formatWeather as Uo,areaLabel as vo,isAmbiguousLocation as Ko,WEATHER_HOST as Bo,WEATHER_TIMEOUT_MS as Go,WeatherError as wo}from"./weather.js";import{defineToolGroup as Vo,createToolGroupRegistry as Wo,ToolGroupError as Xo}from"./tool-groups.js";import{toolNeedFor as zo,grantsNeededFor as Jo,equipmentFor as jo,isPleasantry as Qo}from"./tool-need.js";import{housekeepingTarget as Zo,hasSubstance as $o,isLocalHelper as et,isSystemModel as rt,lightestLocalHelper as ot}from"./housekeeping.js";import{parseFlowchart as at,layoutFlowchart as it,renderFlowchartSvg as st}from"./flowchart.js";import{validateView as St,validateViewInvocation as lt,viewResult as Et}from"./view.js";import{validateWidget as ct,validateWidgetMessage as pt,effectiveGrants as Tt,widgetIcon as dt,WIDGET_SURFACES as _t}from"./widget.js";import{fuseRRF as At,planQueries as ft,multiSearch as It}from"./rrf.js";import{SUBJECT_KINDS as Ot,DEFAULT_THRESHOLD as Nt,MAX_SUBJECTS as gt,MAX_SUBJECT_CHARS as Ct,normalizeSubject as Pt,subjectKey as Mt,subjectTokens as Lt,isSubjectCandidate as ht,aliasMap as xt,resolveSubjects as Dt,earnsBrief as Ft,rankSubjects as kt,REDACTION_TOKEN_TYPES as yt,isRedactionToken as bt,SELF_LABELS as Ut,isSelfLabel as vt,stripQualifiers as Kt,suggestMerges as Bt}from"./entity.js";import{BRIEF_STATES as wt,CLAIM_KINDS as Ht,MAX_CLAIMS as Vt,MAX_CLAIM_REFS as Wt,MAX_BRIEF_RECORDS as Xt,MAX_BRIEF_CHARS as Yt,contentHash as zt,briefId as Jt,briefToText as jt,briefTerms as Qt,briefLinks as qt,checkKnowledgeInvariants as Zt,parseBriefText as $t}from"./knowledge.js";import{deriveBrief as ra,deriveBriefs as oa,driftedRefs as ta}from"./knowledge-derive.js";import{SYNTHESIS_SCHEMA as ia,synthesisPrompt as sa,claimsFromSynthesis as na,MAX_SYNTHESIS_CLAIMS as Sa,MAX_EXCERPTS as la,MAX_EXCERPT_CHARS as Ea}from"./synthesis.js";import{PROPOSAL_STATES as ca,SUPERSEDE_OVERLAP as pa,propose as Ta,accept as da,reject as _a,diffProposal as Ra,converge as Aa,linkClaims as fa}from"./promotion.js";import{normalizeRecord as ua,normalizeRecords as Oa,wikilinksIn as Na,redactedTokensIn as ga,redactionCost as Ca,wantedPages as Pa,orphanRecords as Ma,duplicateTitles as La,vocabularyDrift as ha,mentionsFrom as xa,spanningQuestions as Da,surveyCorpus as Fa,thresholdSweep as ka,formatSurvey as ya,NEAR_TITLE_DISTANCE as ba,SPAN_MIN_TERMS as Ua}from"./curate.js";import{PDF_MAX_CHARS as Ka,linesFromItems as Ba,orderLines as Ga,paragraphsFromLines as wa,pageTextFromItems as Ha,looksScanned as Va,buildPdfDocument as Wa}from"./pdf-layout.js";import{YOUTUBE_HOSTS as Ya,TRANSCRIPT_MAX_CHARS as za,parseYouTubeUrl as Ja,isYouTubeUrl as ja,captionTracksFromPlayerResponse as Qa,videoMetaFromPlayerResponse as qa,pickCaptionTrack as Za,timedTextUrl as $a,parseTimedText as ei,groupSegments as ri,formatTimestamp as oi,formatTranscript as ti,buildTranscriptDocument as ai,transcriptFromTracks as ii}from"./media-transcript.js";import{ACCESS_LOG_VERSION as ni,ACCESS_LOG_MAX as Si,redactAccessArgs as li,makeAccessEvent as Ei,createAccessLog as mi,makeStorageTier as ci,formatBytes as pi}from"./observability.js";import{routeGraph as di,projectChain as _i}from"./route-graph.js";import{defineAdapter as Ai,createAdapterRegistry as fi,AdapterError as Ii}from"./adapters.js";import{linkifyCitations as Oi,repairCitedLinks as Ni,markdownUrl as gi,sourcesFromToolText as Ci,createCitationCollector as Pi,RETRIEVAL_TOOLS as Mi}from"./citations.js";import{buildTrajectory as hi,phasesOf as xi,lanesOf as Di,filterEntries as Fi,displayName as ki,ENTRY_KINDS as yi,threadsOf as bi,threadTitle as Ui,promptEntries as vi,turnsOf as Ki,threadTree as Bi}from"./trajectory.js";import{createTurnRunner as wi,createStepRecorder as Hi,argsShape as Vi,defineLoop as Wi,LOOP_KINDS as Xi,LoopError as Yi,abortCause as zi,errorFacts as Ji}from"./loop.js";import{defineModel as Qi,defineMiddleware as qi,defineRouteStrategy as Zi,createModelRouter as $i,signalsFrom as es,requirementsFor as rs,requirementsForStep as os,preferenceFor as ts,failoverOrder as as,pinnedOrderOf as is,FAILOVER_CLASS_GAP as ss,FAILOVER_CAPABILITY_GAP as ns,sameModelKey as Ss,RouterError as ls}from"./router.js";import{makeSourceStore as ms,manifestText as cs,shortUrl as ps,readSource as Ts,sourceId as ds}from"./sources-retrieval.js";import{classifySource as Rs,extractUrls as As,hostMatches as fs,meetReach as Is,sourcePolicyFor as us,sourceUrlsOf as Os,DEFAULT_INTERNAL_PATTERNS as Ns,INTERNAL_PATTERN_CATALOG as gs}from"./sources.js";import{defineRule as Ps,createRuleEngine as Ms,SUPPRESSED as Ls,RuleError as hs}from"./rules.js";import{VAULT_VERSION as Ds,KDF_ITERATIONS as Fs,KDF_HASH as ks,DEFAULT_LOCK_MS as ys,VaultError as bs,MAX_TITLE_CHARS as Us,MAX_NOTE_CHARS as vs,MAX_SECRET_CHARS as Ks,MAX_ENTRIES as Bs,createVault as Gs,unlockVault as ws,deriveKey as Hs,sealEntry as Vs,openEntry as Ws,validateEntry as Xs,entryMeta as Ys,searchEntries as zs,isLocked as Js,lockedSummary as js,canAddEntry as Qs,toB64 as qs,fromB64 as Zs}from"./vault.js";import{SCHEDULE_KINDS as en,TRIGGER_KINDS as rn,JOB_ACTIONS as on,MISSED_POLICIES as tn,ScheduleError as an,validateSchedule as sn,nextFireAt as nn,occurrencesBetween as Sn,nextWakeAt as ln,parseCron as En,defineTrigger as mn,createTriggerRegistry as cn,BUILTIN_TRIGGERS as pn,timerTrigger as Tn,meetingStartedTrigger as dn,meetingEndedTrigger as _n,personJoinedTrigger as Rn,phraseTrigger as An,topicTrigger as fn,questionTrigger as In,voiceCommandTrigger as un,defineJob as On,dueJobs as Nn,jobsForEvent as gn,occurrenceKey as Cn,clipText as Pn,matchSummary as Mn}from"./schedule.js";import{defineMeetingAnalyzer as hn,createAnalyzerRegistry as xn,CADENCES as Dn,AnalyzerError as Fn}from"./meeting-analyzers.js";import{DEFAULT_WAKE as yn,ASSISTANT_NAME as bn,MAX_COMMANDS_PER_DELTA as Un,DAYPART_HOUR as vn,VoiceIntentError as Kn,compileWake as Bn,wakeFor as Gn,findWakeCommand as wn,parseCommand as Hn,commandsFromSegments as Vn,parseDuration as Wn,parseClock as Xn,parseWhen as Yn,parseNumberWords as zn,normalizeSpeech as Jn,tokenize as jn,editDistance as Qn,defineVoiceIntent as qn,createVoiceIntentRegistry as Zn,defaultVoiceIntents as $n,BUILTIN_VOICE_INTENTS as eS,timerIntent as rS,reminderIntent as oS,scheduleIntent as tS,noteIntent as aS,monitorIntent as iS,REFINEMENT_SCHEMA as sS,refinementPrompt as nS,refinementFormat as SS,parseRefinement as lS,refinementStream as ES,settleRefinement as mS,refineSpokenCommand as cS,isFillerSentence as pS,gistText as TS,gistOpening as dS,commandLooksFinished as _S,sameUtterance as RS,createUtteranceGate as AS,UTTERANCE_SETTLE_MS as fS,UTTERANCE_DANGLING_MS as IS}from"./voice-intents.js";import{MAX_TOPICS as OS,MAX_TOPIC_CHARS as NS,TOPICS_SCHEMA as gS,topicsSchema as CS,topicsPrompt as PS,topicsFormat as MS,parseTopics as LS,normalizeTopic as hS,normalizeTopics as xS,topicsStream as DS,ENTITY_TYPES as FS,ENTITIES_SCHEMA as kS,entitiesPrompt as yS,entitiesFormat as bS,parseEntities as US,coerceEntities as vS,entitiesStream as KS,MAX_SUGGESTIONS as BS,MAX_SUGGESTION_CHARS as GS,SUGGESTIONS_SCHEMA as wS,suggestionsPrompt as HS,suggestionsFormat as VS,parseSuggestions as WS,suggestionsStream as XS}from"./extraction.js";import{FIELD_TYPES as zS,RESPONSE_MODES as JS,StructuredError as jS,defineSchema as QS,describeSchema as qS,toJsonSchema as ZS,responseFormat as $S,unfence as el,findJson as rl,rewriteJson as ol,repairJson as tl,isNothing as al,coerce as il,parseStructured as sl,createStructuredStream as nl}from"./structured.js";import{explainMcpError as ll,packageFromArgs as El,isStaleMcpSession as ml,installHintFor as cl,missingCommandMessage as pl,missingCommandIn as Tl,normalizePlatform as dl}from"./mcp-errors.js";import{explainInstallFailure as Rl,gatewayNotBackAdvice as Al,adviceText as fl,npmInstallCommand as Il,standaloneInstallCommand as ul,nodeSatisfies as Ol,PUBLIC_REGISTRY as Nl}from"./install-advice.js";import{parseSignInPrompt as Cl,signInError as Pl,signInFromError as Ml,signInToolResult as Ll,MCP_SIGN_IN_CODE as hl}from"./mcp-signin.js";import{parseAuthChallenge as Dl,wellKnownUrls as Fl,canonicalResource as kl,readResourceMetadata as yl,readAuthServerMetadata as bl,registrationRequest as Ul,readRegistration as vl,authorizeUrl as Kl,tokenRequest as Bl,readTokenResponse as Gl,tokenExpired as wl,authHeader as Hl,discoverMcpAuth as Vl,registerMcpClient as Wl,fetchMcpToken as Xl,TOKEN_SKEW_MS as Yl,mcpAuthKey as zl,refreshedAuth as Jl}from"./mcp-oauth.js";import{toolTraits as Ql,bareToolName as ql,canRunConcurrently as Zl,isCacheable as $l,needsConfirmation as eE,traitsIndex as rE,effectiveToolName as oE,parallelEligible as tE,PARALLEL_LOCAL_RE as aE}from"./tool-traits.js";import{planToolRound as sE,runToolRound as nE}from"./tool-round.js";import{createToolLoopGuard as lE,roundSignature as EE,stableToolCallKey as mE,toolMadeProgress as cE,isLoopableTool as pE,blockedToolResult as TE,OBSERVATION_TOOLS as dE,INPUT_PROGRESS_TOOLS as _E}from"./tool-loop-guard.js";import{classifyFailure as AE,createModelHealth as fE,COOLDOWN_MS as IE,UNAVAILABLE_REASONS as uE,normModelName as OE}from"./model-health.js";import{runWithFailover as gE,failoverExhausted as CE,FAILOVER_MAX_ATTEMPTS as PE}from"./failover.js";import{sourcePolicySettings as LE,sourceGuardFor as hE,sourceGate as xE,isSourceGateError as DE,withinReach as FE}from"./source-gate.js";import{runTurnLoop as yE,createCallRunner as bE,roundCap as UE,withToolSystem as vE,describeCall as KE,stepResultText as BE,stepResultNote as GE,addUsage as wE,normalizeUsage as HE,openAiTranscript as VE,anthropicTranscript as WE,DEFAULT_MAX_ROUNDS as XE,DEFAULT_MAX_FINISH_TRIES as YE,FINISH_NUDGES as zE,LOOPING_NUDGE as JE,EXHAUSTED_NOTE as jE,ROUND_SEPARATOR as QE}from"./turn-loop.js";import{SHIMS as ZE,SHIM_IDS as $E,defineShim as em,createShimLog as rm,summarizeShims as om,retirableShims as tm,describeShims as am,ShimError as im}from"./shim.js";import{modelView as nm,modelSaid as Sm,stoppedText as lm,isClientNote as Em,STOPPED_MARK as mm}from"./model-view.js";import{createResultStore as pm,shieldToolResult as Tm,runResultQuery as dm,withResultShield as _m,describeShape as Rm,compactValue as Am,resultToolSpec as fm,RESULT_TOOL_NAME as Im,DEFAULT_SHIELD as um,DEFAULT_STORE as Om}from"./tool-result.js";import{PERMISSION_EVENT as gm,PERMISSION_ANSWERS as Cm,PERMISSION_TIMEOUT_MS as Pm,PERMISSION_TOOL_NAME as Mm,permissionToolSpec as Lm,isPermissionTool as hm,permissionRequestFromClaude as xm,permissionKeys as Dm,describePermission as Fm,permissionAnswer as km,permissionAllowed as ym,rememberPermission as bm,recallPermission as Um,claudePermissionResponse as vm,permissionLine as Km,permissionIcon as Bm,createPermissionDesk as Gm}from"./agent-permission.js";import{findTools as Hm,findToolsResult as Vm,findActionArgs as Wm,oneLiner as Xm,overlapRank as Ym,FIND_ACTION as zm}from"./tool-discovery.js";import{rankFused as jm,fusedRanker as Qm,rerankThrough as qm,toolDoc as Zm,FUSED_CANDIDATES as $m,FUSED_BUDGET_MS as ec}from"./tool-rank-fused.js";import{makeToolHub as oc,hubSpec as tc,HUB_TOOL_NAME as ac,withHint as ic,withLead as sc,lastUserText as nc}from"./tool-hub.js";import{withPromptedTools as lc,promptedTranscript as Ec,makePromptedTranscript as mc,promptedToolsSystem as cc,parseToolCalls as pc,visiblePrefix as Tc,toolChannel as dc,transcriptFor as _c}from"./prompted-tools.js";import{REVEAL as Ac,revealStep as fc,revealCut as Ic}from"./stream-reveal.js";import{buildToolset as Oc}from"./toolset.js";import{DESCRIBE_ACTION as gc,actionMenu as Cc,buildGroupDispatchSpec as Pc,validateAction as Mc,makeGroupDispatchExecutor as Lc,withGuidance as hc,makeDispatchProvider as xc,estimateTokens as Dc}from"./tool-dispatch.js";import{FIND_TOOL_NAME as kc,FIND_DESCRIPTION as yc,FIND_RESIDENT as bc,findDispatchProvider as Uc}from"./find-tool.js";import{WEB_SEARCH_TOOL_NAME as Kc,WEB_SEARCH_TOOL_SYSTEM as Bc,WEB_SEARCH_SPEC as Gc,searchResultsToText as wc,searchFailureOf as Hc,webSearchToolProvider as Vc}from"./web-search-tool.js";import{compressToolSpec as Xc,compressToolSpecs as Yc,compressionStats as zc,trimDescription as Jc,COMPRESSION_MODES as jc,DEFAULT_COMPRESSION as Qc}from"./tool-schema.js";import{validateRecipe as Zc,expandRecipe as $c,recipeParams as ep,mapInput as rp,dryRunRecipe as op,runPlan as tp,runRecipe as ap,RecipeError as ip,RECIPE_MODES as sp}from"./recipe.js";import{recipeToolProvider as Sp,recipeToolSpec as lp,describeRecipeForApproval as Ep,RECIPE_TOOL_NAME as mp}from"./recipe-tool.js";import{createBudget as pp,validateBudget as Tp,normalizeBudget as dp,usageOf as _p,BudgetError as Rp,BUDGET_DIMENSIONS as Ap}from"./budget.js";import{defineTeam as Ip,validateTeam as up,normalizeTeam as Op,normalizeGrants as Np,grantAllows as gp,scmAllows as Cp,describeRole as Pp,TeamError as Mp,ROLE_MODES as Lp,MERGE_POLICIES as hp,PLAN_MODES as xp,GRANTABLE as Dp,WORK_GRANTS as Fp,GRANT_RE as kp,AGENT_REF_RE as yp,STARTER_TEAMS as bp,starterTeams as Up,blankTeam as vp,teamFromForm as Kp,slugTeamName as Bp}from"./team.js";import{fixedPlan as wp,parsePlan as Hp,plannerPrompt as Vp,waves as Wp,breakCycles as Xp,TEAM_PLAN_SCHEMA as Yp}from"./team-plan.js";import{createBoard as Jp,parseFindings as jp,boardText as Qp,findingsInstruction as qp,toBriefClaims as Zp,FINDINGS_SCHEMA as $p,FINDING_KINDS as eT,THREAD_KINDS as rT,THREAD_STATUSES as oT,POST_KINDS as tT,POST_STATUSES as aT,ASK_TYPES as iT,emptyBoardState as sT,foldBoard as nT,findingsOf as ST}from"./team-board.js";import{boardToolProvider as ET,boardToolSpec as mT,createAnswerBox as cT,withBoardTool as pT,BOARD_TOOL_NAME as TT,DEFAULT_ASK_TIMEOUT_MS as dT}from"./board-tool.js";import{createRunCache as RT,withRunCache as AT}from"./team-cache.js";import{emptyRun as IT,foldRun as uT,runFromEvents as OT,checkpointFrom as NT,isResumable as gT,LIVE_RUN_STATUSES as CT,RESUMABLE_RUN_STATUSES as PT,spendOf as MT,describeSpend as LT,runState as hT,priorWorkFor as xT,STALLED_AFTER_MS as DT}from"./team-record.js";import{validateProject as kT,normalizeProject as yT,defineProject as bT,canTransition as UT,blankProject as vT,projectFromForm as KT,emptyProjectRecord as BT,foldProject as GT,projectProgress as wT,ProjectError as HT,PROJECT_STATUSES as VT,PROJECT_ID_RE as WT}from"./project.js";import{validateJob as YT,normalizeJob as zT,defineJob as JT,canTransition as jT,applyAll as QT,jobToRole as qT,readyJobs as ZT,blankJob as $T,jobFromForm as ed,JobError as rd,JOB_STATUSES as od,JOB_ID_RE as td}from"./job.js";import{validateGate as id,normalizeGate as sd,effectiveGate as nd,gateAllows as Sd,DEFAULT_GATE as ld,AUTONOMY as Ed,HUMAN_FLAGS as md,CHECKS as cd}from"./gate.js";import{runProject as Td,roundJobs as dd,teamForRound as _d,jobResults as Rd,roundBudget as Ad,parseJobs as fd,parseReview as Id,jobsPrompt as ud,reviewPrompt as Od,PROJECT_JOBS_SCHEMA as Nd,PROJECT_REVIEW_SCHEMA as gd,ProjectRunError as Cd,EXECUTIVE as Pd,MAX_JOBS_PER_ROUND as Md,MAX_ROUNDS as Ld,PROJECT_RUN_STATUSES as hd}from"./project-run.js";import{canonical as Dd,sha256 as Fd,makeEntry as kd,verifyChain as yd,attest as bd,verifyAttested as Ud,summarize as vd,fit as Kd,adjustSummary as Bd,normalizeEngine as Gd,engineKey as wd,normalizeScm as Hd,SCORECARD_ENTRY_KINDS as Vd,ROLE_KINDS as Wd,SCORECARD_VERSION as Xd,ENGINE_KINDS as Yd}from"./scorecard.js";import{ENGINE_KINDS as Jd,ROUTE_PREFERS as jd,normalizePolicy as Qd,normalizeEngineSpec as qd,validateEngineSpec as Zd,engineRef as $d,engineKeyOf as e_,describeEngine as r_,tierOf as o_}from"./engine.js";import{AGENT_ID_RE as a_,APPLIES_TO as i_,EGRESS_CLASSES as s_,ASSISTANT_ID as n_,AgentError as S_,validateAgent as l_,normalizeAgent as E_,defineAgent as m_,assistantAgent as c_,engineOf as p_,describeAgent as T_,slugAgentId as d_,resolveTeam as __,STARTER_AGENTS as R_,starterAgents as A_,blankAgent as f_,agentFromForm as I_,poolFor as u_}from"./agent.js";import{LEDGER_VERSION as N_,LEDGER_ENTRY_KINDS as g_,DECLINE_REASONS as C_,WITHDRAW_AFTER as P_,ledgerKey as M_,normalizeCall as L_,makeLedgerEntry as h_,summarizeEngine as x_}from"./model-ledger.js";import{RECRUIT_SCHEMA as F_,MIN_FIT as k_,engineRow as y_,engineRows as b_,needForJob as U_,routeFor as v_,engineWorth as K_,applications as B_,evaluatorPrompt as G_,parseEvaluation as w_,decide as H_,recruitForRun as V_,proposalFromNeeds as W_,proposalToAgent as X_,carveBudget as Y_,recruitEvents as z_,recruitJob as J_}from"./recruit.js";import{DEFAULT_MIN_CALLS as Q_,cardOverride as q_,applyCard as Z_}from"./model-candidates.js";import{SCM_KINDS as eR,validateConnection as rR,normalizeConnection as oR,parseRemote as tR,connectionFor as aR,branchFor as iR,worktreeDirFor as sR,credentialEnv as nR,describeConnection as SR,blankConnection as lR,connectionFromForm as ER}from"./scm-connection.js";import{messagesFor as cR,mergeTranscript as pR,clipTranscript as TR,clipMessage as dR,newSteps as _R,continuationNote as RR,createControl as AR,STEP_MAX_CHARS as fR,TASK_TRANSCRIPT_MAX_CHARS as IR}from"./team-task.js";import{runTeam as OR,resumeTeam as NR,dryRunTeam as gR,isModelUnavailable as CR,TeamRunError as PR,RUN_STATUSES as MR}from"./team-run.js";import{teamToolProvider as hR,teamToolSpec as xR,teamToolTimeoutMs as DR,describeTeamForApproval as FR,TEAM_TOOL_NAME as kR,TEAM_MANUAL as yR}from"./team-tool.js";import{workLogFor as UR,workLogText as vR,workLogEvidence as KR,describeCall as BR,WORKLOG_KINDS as GR}from"./team-worklog.js";import{normalizeRequest as HR,subtaskFromRequest as VR,takeUp as WR,takeUpLine as XR,holdsGrants as YR,jobFromSubtask as zR,extendDependents as JR,taskTree as jR,threadRows as QR,MAX_SUBTASKS as qR,MAX_DEPTH as ZR,MIN_TAKEUP_FIT as $R}from"./team-subtask.js";import{teamLine as rA,teamLanes as oA}from"./team-trail.js";import{promoteRoles as aA,starterTeam as iA,missingStarters as sA,teamHealth as nA,teamShape as SA,describeTeamShape as lA,whereItWorks as EA,rosterRows as mA,agentKind as cA,agentHue as pA,agentColor as TA,agentInitials as dA,roleCardId as _A,cardNumbers as RA,upsertAgents as AA,soloTeam as fA,teamsWithSolos as IA,builtinOrg as uA,isBuiltin as OA,grantChoices as NA,grantsFromChoices as gA,skillChoices as CA,GRANT_INFO as PA,SOLO_BUDGET as MA,TEAM_SHAPES as LA,ROSTER_KINDS as hA}from"./team-org.js";import{observeInbox as DA,observeStrip as FA,runLanes as kA,spendRows as yA,engineStrip as bA}from"./team-observe.js";import{mcpDispatchProvider as vA,MCP_TOOL_NAME as KA}from"./mcp-dispatch.js";import{createManifest as GA,ManifestError as wA,SOURCES as HA}from"./manifest.js";import{createKernel as WA,meetDecisions as XA,KernelError as YA,REQUIRED_PLUGINS as zA,ALLOW_ALL as JA}from"./kernel.js";import{replay as QA,formatReport as qA,parseJsonl as ZA,toJsonl as $A}from"./harness.js";import{compileQuery as rf,findMatches as of,matchIndexFor as tf,expandReplacement as af,replaceMatch as sf,replaceAll as nf,replaceAllInRange as Sf,MAX_MATCHES as lf}from"./text-search.js";import{DATA_SCOPES as mf}from"./scopes.js";import{MEMORY_VERSION as pf,MEMORY_KINDS as Tf,MEMORY_KIND_NAMES as df,AMBIENT_KINDS as _f,MAX_MEMORY_CHARS as Rf,MIN_MEMORY_CHARS as Af,DEFAULT_MAX_MEMORIES as ff,DEFAULT_BLOCK_CHARS as If,SAME_FACT as uf,MEMORY_TOOL_SPEC as Of,MEMORY_UPCASTERS as Nf,MemoryError as gf,normalizeMemory as Cf,isValidMemory as Pf,memoryKey as Mf,slotOf as Lf,similarity as hf,containment as xf,candidatesFrom as Df,reconcile as Ff,matchForForget as kf,recall as yf,saysWhere as bf,homePlace as Uf,needsWhere as vf,memoryBlock as Kf,markUsed as Bf,pruneMemories as Gf,memoryToolSystem as wf,upcastMemory as Hf,sameMemory as Vf,AMBIENT_MAX_WORDS as Wf}from"./memory.js";import{linksToRead as Yf,storyLinkOf as zf,linkAttachments as Jf,asksOnlyAboutPage as jf,pageInstruction as Qf}from"./message-links.js";import{frontPagesAskedAbout as Zf,frontPageInstruction as $f,FRONT_PAGES as eI}from"./site-pages.js";import{SOURCE_TRUST as oI,SkillSourceError as tI,defineSkillSource as aI,createSkillSourceRegistry as iI}from"./skill-sources.js";import{SKILL_MANIFEST_VERSION as nI,SKILL_CONTEXTS as SI,SKILL_HISTORY_SCOPES as lI,SKILL_MCP_MODES as EI,SKILL_TRUST as mI,SKILL_FILE_KINDS as cI,SKILL_UPCASTERS as pI,SkillManifestError as TI,isSafeSkillPath as dI,originOf as _I,trustOf as RI,skillFiles as AI,needsBridge as fI,declaredAccess as II,originLabel as uI,sameSkillOrigin as OI,skillIsStale as NI,validateSkill as gI,upcastSkill as CI,upcastSkills as PI,normalizeSkill as MI}from"./skill-manifest.js";import{SKILL_VARS as hI,SKILL_VAR_NAMES as xI,skillVar as DI,skillVarPattern as FI,parseSkillVars as kI,lintSkillPrompt as yI,suggestSkillVar as bI,substituteSkillVars as UI,expandSkillPrompt as vI,skillVarGuidance as KI,SkillVarError as BI}from"./skill-vars.js";import{lineAt as wI,writerAffordance as HI,INSTRUCTION_RE as VI,instructionOnLine as WI,GOAL_MIN_NEW as XI,goalDraftAllowed as YI,createSpendMeter as zI,writerTail as JI,draftSeparator as jI,groundingBlock as QI,writerRequest as qI,AUTOCOMPLETE_SYSTEM as ZI,AUTOCOMPLETE_MAX_TOKENS as $I,AUTOCOMPLETE_TEMPERATURE as eu,clipCompletion as ru,GEARS as ou,WRITER_PREFS as tu,WRITER_PREF_DEFAULTS as au,normalizeWriterPrefs as iu,normalizeIntent as su}from"./cowriter-writer.js";import{SLASH_TYPING_RE as Su,NEW_THREAD_SLASH_ITEMS as lu,parseNewThread as Eu,BUG_REPORT_SLASH_ITEMS as mu,parseBugCommand as cu,isSkillEnabled as pu,enabledSkills as Tu,slashCommandItems as du,matchSlashSkill as _u,matchSlashRecipe as Ru,recipeInvocationText as Au,matchSlashTeam as fu,teamInvocationText as Iu,slashCommandInsert as uu,skillInvocationOf as Ou,skillInvocationLabel as Nu}from"./slash-commands.js";import{outlineOf as Cu,parseListItem as Pu,continueList as Mu,indentSelection as Lu,toggleWrap as hu,toggleLinePrefix as xu,toggleTask as Du,toggleLink as Fu,docStats as ku,selectionStats as yu}from"./markdown-authoring.js";import{MAX_TAG_LENGTH as Uu,MAX_TAGS as vu,normalizeTag as Ku,normalizeTags as Bu,hasTag as Gu,addTag as wu,removeTag as Hu,toggleTag as Vu,sameTags as Wu,formatTag as Xu,parseTagQuery as Yu,hasTagTerms as zu,formatTagQuery as Ju,matchesTagFilter as ju,filterByTags as Qu,tagFacets as qu,suggestExistingTags as Zu,tagsSearchText as $u}from"./tags.js";import{UNTITLED_MEETING as rO,MAX_TITLE_LENGTH as oO,TITLE_RULES_VERSION as tO,cleanTitle as aO,isGenericTitle as iO,titleFromSummary as sO,titleFromTopics as nO,titleFromParticipants as SO,titleFromDate as lO,readableWhen as EO,deriveMeetingTitle as mO,shouldAutoTitle as cO,isBetterTitleSource as pO,meetingTitlePrompt as TO,parseTitleResponse as dO}from"./titles.js";import{RECORD_KINDS as RO,STRUCTURE_KINDS as AO,MAX_TITLE_LEN as fO,LibraryError as IO,parseRecordId as uO,makeRecordId as OO,isRecordId as NO,normalizeStoredRecord as gO,isValidStoredRecord as CO,toSearchRecord as PO,searchTextFor as MO,toIndexEntry as LO,deriveTitle as hO,snippetOf as xO,wordCount as DO,findRecordRefs as FO,linkRecordRefs as kO,repairAnswerMarkup as yO}from"./library.js";import{CLOCK_TOLERANCE_MS as UO,SyncError as vO,stampOf as KO,decide as BO,planSync as GO,isSettled as wO,forkConflict as HO,advanceBases as VO}from"./sync-plan.js";import{ENCRYPTED_TYPE as XO,COMPRESSIONS as YO,BackupError as zO,KDF_ITERATIONS as JO,encryptBackup as jO,decryptBackup as QO,isEncryptedBackup as qO,RECORD_TYPE as ZO,deriveBackupKey as $O,sealRecord as eN,openRecord as rN,isSealedRecord as oN,keyCache as tN,identityCodec as aN,streamCodec as iN,nodeCodec as sN,bestCodec as nN}from"./backup-envelope.js";import{recordsFromBackup as lN,backupFromRecords as EN}from"./backup-records.js";import{DEFAULT_POLICY as cN,SLOW_POLICY as pN,scalePolicy as TN,pickProfile as dN,adaptProfile as _N,policyFor as RN,SLOW_FLUSH_MS as AN,FAST_FLUSH_MS as fN,FAST_STREAK as IN,createJournal as uN,JournalError as ON,ENTRY_VERSION as NN,makeEntry as gN,tombstone as CN,isTombstone as PN,isEntry as MN,entryStamp as LN,supersedes as hN,BOUNDS as xN,createSegment as DN,applyEntry as FN,segmentBytes as kN,segmentEntries as yN,shouldRotate as bN,mergeSegments as UN,segmentName as vN,parseSegmentName as KN,SEGMENT_RE as BN,boundSegments as GN,segmentsFor as wN,overlay as HN,catchUpPlan as VN}from"./journal.js";import{OMNI_MODES as XN,OMNI_GRAMMAR as YN,parseOmni as zN,extractFilters as JN,resolveSince as jN,wantsModel as QN,isActionable as qN}from"./omni.js";import{THEMES as $N,LIGHT as eg,DARK as rg,PALETTES as og,SHAPE as tg,TOKEN_NAMES as ag,TOKEN_ROLES as ig,paletteFor as sg,cssVarName as ng,toCssVars as Sg,themeStylesheet as lg,resolveTheme as Eg}from"./theme.js";import{PLANS as cg,API_BASE as pg,ENDPOINTS as Tg,ENTITLEMENT_PUBLIC_JWK as dg,UPGRADE_URL as _g,FEATURE_TIER as Rg,PRO_FEATURES as Ag,TEAM_FEATURES as fg,FREE_LIMITS as Ig,COUNTED as ug,freeCap as Og,observeSince as Ng,RECHECK_INTERVAL_MS as gg,EntitlementError as Cg,checkoutUrl as Pg,planOf as Mg,planLabel as Lg,isPro as hg,isTeam as xg,can as Dg,tierFor as Fg,withinFreeLimit as kg,verifyEntitlement as yg,verifySignedToken as bg,licenseFromPayload as Ug,needsRecheck as vg}from"./entitlement.js";import{generateDeviceKey as Bg,exportDevicePublicKey as Gg,signChallenge as wg}from"./device-proof.js";import{renderMarkdown as Vg,defaultLinkPolicy as Wg,defaultImagePolicy as Xg}from"./markdown-render.js";import{NOTE_IMAGE_SCHEME as zg,MAX_NOTE_IMAGE_BYTES as Jg,NOTE_IMAGE_TYPES as jg,noteImageId as Qg,noteImageRef as qg,noteImageIds as Zg,noteImageRefs as $g,stripNoteImageRefs as eC,orphanNoteImages as rC,newNoteImageId as oC}from"./note-images.js";import{parseMeetingText as aC,speakerStats as iC,densityRibbon as sC}from"./meeting-text.js";import{speakerBreakdown as SC,speakerTimeline as lC,formatTalkTime as EC,SPEAKER_SLOTS as mC}from"./meeting-shape.js";import{isSpeakerImageValue as pC,speakerLabeller as TC}from"./meeting-shape.js";import{SORT_MODES as _C,SORT_LABELS as RC,sortStamp as AC,sortRecords as fC,filterRecords as IC,dayBucket as uC,rowTime as OC,groupRecords as NC}from"./record-list.js";import{DATE_PRESETS as CC,startOfDay as PC,addDays as MC,dayKey as LC,resolveDateValue as hC,dateRangeOf as xC,parseDateQuery as DC,hasDateTerms as FC,isSingleDay as kC,formatDateTerm as yC,setDateTerm as bC,matchesDateRange as UC,filterByDate as vC,describeDateRange as KC,dateFilterLabel as BC,activePreset as GC,pickDay as wC,shiftMonth as HC,monthGrid as VC,dayCounts as WC,nearbyDays as XC,localeWeekStart as YC}from"./date-filter.js";import{INSIGHT_KINDS as JC,summarySections as jC,insightKindOf as QC,meetingInsights as qC,hasInsights as ZC}from"./meeting-insights.js";import{demd as eP,NOTE_SECTIONS as rP,noteSectionKind as oP,MOMENT_BADGES as tP,momentBadge as aP,parseMeetingNotes as iP,groupActionsByOwner as sP}from"./meeting-insights.js";import{MEETING_INSIGHT_SECTIONS as SP,MEETING_INSIGHT_SYSTEM as lP,meetingInsightPrompt as EP,sectionMaxTokens as mP,composeMeetingInsightNotes as cP,insightTranscript as pP}from"./meeting-insight-prompts.js";import{PREF_SECTIONS as dP,PREF_SECTION_IDS as _P,DESKTOP_SECTION_IDS as RP,sectionSpec as AP,sectionValue as fP,pickSections as IP,applySections as uP,sectionHash as OP,mergeStamped as NP,changedSections as gP}from"./client-prefs.js";import{SETTINGS_GROUPS as PP,SETTINGS_PAGES as MP,REQUIREMENTS as LP,BOOKKEEPING_KEYS as hP,listRows as xP,findRow as DP,pageById as FP,groupById as kP,pagesOf as yP,quickRows as bP,breadcrumb as UP,linkTo as vP,linkToRow as KP,parseLink as BP,valueOf as GP,setValue as wP,effectiveValue as HP,describeValue as VP,SETTINGS_OPEN_DEFAULT as WP,settingsOpenMode as XP,searchSettings as YP,statusOf as zP,statusAll as JP,homeChecklist as jP,gateOf as QP,sectionOfRow as qP}from"./settings-registry.js";import{pointsAtGateway as $P,destinationFromEndpoint as eM,destinationFromAgent as rM,availableDestinations as oM,seedDestinations as tM,shouldSeedDestinations as aM,mergeEndpointDestinations as iM}from"./gateway-dests.js";import{McpClient as nM,mcpProvider as SM}from"./mcp-client.js";import{mcpSharedSystem as EM,mcpInventorySystem as mM,sourceCitationSystem as cM,combineSystemPrompt as pM,toolStatus as TM,widgetAuthoringSystem as dM,vaultWidgetSystem as _M,wantsVaultGuidance as RM}from"./tool-hints.js";import{adaptiveToolRetryHint as fM,createAdaptiveToolPolicy as IM,isInvalidToolParametersResult as uM}from"./adaptive-tool-policy.js";import{getMcpProviders as NM,testMcpServer as gM,resetMcp as CM,mcpBackoff as PM,mcpClientFor as MM}from"./mcp-manager.js";import{SIDELINE_COMMANDS as hM,BRINGBACK_COMMAND as xM,THREAD_TOOL_NAME as DM,SIDELINE_SLASH_ITEMS as FM,THREAD_TOOL_SPEC as kM,parseSideline as yM,parseBringBack as bM,resolveSidelineTarget as UM,threadManifest as vM,threadToolProvider as KM,readThread as BM,briefPrompt as GM,foldBackNote as wM,foldNotes as HM,nextSidelineIndex as VM,sourceOf as WM,noteUnits as XM,sidelinePath as YM,foldBackFor as zM,SIDELINE_TOOL_NAME as JM,SIDELINE_TOOL_SPEC as jM,sidelineToolProvider as QM}from"./sideline.js";import{WEATHER_TOOL_NAME as ZM,WEATHER_TOOL_SYSTEM as $M,weatherToolProvider as eL,weatherFromSearch as rL}from"./weather-tool.js";import{DECIDE_TOOL_NAME as tL,RERANK_TOOL_NAME as aL,CAPABILITY_TOOLS_SYSTEM as iL,capabilityToolsProvider as sL}from"./capability-tools.js";import{openDecision as SL,distributionConfidence as lL}from"./open-decision.js";import{IN_PROCESS_IDS as mL,inProcessView as cL,capabilityView as pL,choicePatch as TL,choiceNote as dL,inProcessPatch as _L}from"./runtime-in-process.js";import{renderContent as AL,toChatMessages as fL,toMultimodalMessages as IL,imageAttachmentsOf as uL,deferAttachedSources as OL,withSourceTool as NL,SOURCE_TOOL_SPEC as gL}from"./context-attachments.js";import{prefetchPlan as PL,prefetchAttachment as ML,lookupResult as LL,lookupLabel as hL,runResearchItem as xL,weatherPlace as DL,weatherFollowupPlace as FL,carriedPlace as kL,newsAsk as yL,pageAsk as bL,answeredByPrefetch as UL,webRedoAsk as vL,aboutOwnPast as KL,offeredSearch as BL,prefetchBudgetMs as GL}from"./prefetch.js";import{createFetchedStore as HL,withFetchedMemo as VL,fetchKey as WL,fetchTitle as XL,fetchedAsSources as YL,fetchedFacts as zL,defaultTtl as JL,exchangeOf as jL,FETCHED_TTL_MS as QL}from"./fetched.js";import{windowOf as ZL,fitFor as $L,keepRecentFor as eh,minWindowFor as rh,isContextLimitError as oh,FIT_HEADROOM as th,SMALL_WINDOW as ah,isSmallWindow as ih,SMALL_WINDOW_ROUNDS as sh}from"./context-window.js";import{planCompaction as Sh,compactionPrompt as lh,compactionRecord as Eh,messagesAfter as mh,systemWithSummary as ch,compactable as ph,COMPACTION_SYSTEM as Th}from"./compaction.js";import{selectContext as _h}from"./context-select.js";import{withoutOwnInstructions as Ah}from"./own-instructions.js";import{digest as Ih,needsWhole as uh}from"./digest.js";import{planRetrieval as Nh,toolsWanted as gh,worldAnswered as Ch,worldPlanned as Ph,toolPlan as Mh,contextPlan as Lh,historyContext as hh,HISTORY_NOTE as xh,placeItems as Dh,planTurn as Fh}from"./retrieval-plan.js";import{intentNeeds as yh,intentNeedOptions as bh,intentSchema as Uh,intentPrompt as vh,intentFromReply as Kh,intentItems as Bh,wantsIntent as Gh,wantsDecision as wh,decideIntent as Hh,questionsIn as Vh,partQueries as Wh,MAX_PARTS as Xh,EXPECTS as Yh,expectsOf as zh}from"./turn-intent.js";import{classifyIntent as jh,checkDecider as Qh,deciderFor as qh,decidedLine as Zh,DECIDER_CHECKS as $h,CHECK_REACH as ex}from"./lookup-decider.js";import{ENDPOINT_JOBS as ox,VENDOR_JOBS as tx,MODEL_TYPES as ax,OPENAI_VOICES as ix,vendorOf as sx,modelJobsOf as nx,endpointJobs as Sx,endpointEntry as lx,isEndpointRef as Ex,resolveEndpointRef as mx,servesChat as cx,presetServes as px,modelsOfType as Tx,isVoiceId as dx,voiceListRequest as _x,normalizeVoices as Rx}from"./endpoint-jobs.js";import{figuresIn as fx,unsupportedFigures as Ix,unsupportedNote as ux,groundingNote as Ox,turnGroundingNote as Nx,stripEchoedWrapper as gx}from"./answer-grounding.js";import{documentContext as Px,documentTerms as Mx,documentBudget as Lx,DOCUMENT_PREFETCH as hx,WHOLE_MAX_PAGES as xx,SCAN_MAX_PAGES as Dx}from"./document-context.js";import{threadMaterialOf as kx,materialReader as yx,isMaterial as bx,MATERIAL_PAGE_CHARS as Ux}from"./thread-material.js";import{turnFlow as Kx,turnFlowChart as Bx,flowWorthDrawing as Gx,stepAction as wx,stepState as Hx}from"./turn-flow.js";import{runTurnPipeline as Wx,runTurnPipelineAsking as Xx,finishTurn as Yx,routeByRule as zx,defineLane as Jx,listLanes as jx,TURN_STAGES as Qx}from"./turn-pipeline.js";import{gatherItems as Zx,isMiss as $x,isWebSearch as eD,GATHER_LIMITS as rD}from"./turn-gather.js";import{TURN_EVENTS as tD,createTurnEvents as aD,activityOf as iD,applyStateDelta as sD}from"./turn-events.js";import{QUESTION_PLAN_LIMITS as SD,SEARCH_UNAVAILABLE as lD,factSchema as ED,factSchemaFor as mD,partsOf as cD,plainEvidence as pD,evidenceFor as TD,rankedEvidence as dD,factPrompt as _D,fitsExpected as RD,snapQuote as AD,standsOn as fD,subjectsOf as ID,factFromReply as uD,carried as OD,againQuery as ND,pointsBack as gD,dependsOn as CD,partsPlan as PD,notFoundLines as MD,factsList as LD,sourcesOf as hD,finishAnswer as xD,gatherFacts as DD}from"./question-plan.js";import{createCassette as kD,gradeAnswer as yD,scoreRuns as bD,textKey as UD,ReplayMiss as vD}from"./turn-replay.js";import{asksIdentity as BD,identitySystem as GD,identityHint as wD}from"./identity.js";import{splitBlocks as VD,mergeNote as WD,syncNote as XD,conflictsIn as YD,resolveConflict as zD}from"./note-merge.js";import{makeFolder as jD,cleanFolderName as QD,repairFolders as qD,noteFolder as ZD,folderTree as $D,folderPath as eF,folderSubtree as rF,renameFolder as oF,moveFolder as tF,moveNote as aF,deleteFolderPlan as iF,findSourceFolder as sF,MAX_FOLDER_NAME as nF,MAX_FOLDER_DEPTH as SF}from"./folders.js";import{htmlToMarkdown as EF,decodeEntities as mF}from"./html-markdown.js";import{runImport as pF,decidePage as TF,decideUpdate as dF,IMPORT_SOURCES as _F,MAX_IMPORT_TITLE as RF}from"./notes-import.js";import{oneNoteSource as fF,toolValue as IF,oneNoteResourceId as uF,missingOneNoteTools as OF,ONENOTE_TOOLS as NF,MAX_PAGE_HTML as gF}from"./onenote-source.js";import{appleNotesSource as PF,appleScriptError as MF,APPLE_NOTES_SCRIPTS as LF,APPLE_NOTES_OPS as hF}from"./apple-notes-source.js";import{STITCH_LIMITS as DF,CUT_FINISH as FF,partChars as kF,splitForWindow as yF,partPrompt as bF,mapParts as UF,reduceNotes as vF,fitAttachments as KF,isNone as BF,continuationMessages as GF,trimOverlap as wF,withStitching as HF,CONTINUE_TEXT as VF}from"./stitch.js";import{presenceFor as XF,presenceDelta as YF,reachOf as zF,withPresence as JF,presenceBlock as jF,roundCount as QF,roundMinutes as qF,PRESENCE_BUDGET_TOKENS as ZF,PRESENCE_KINDS as $F}from"./presence.js";import{PolicyError as rk,POLICY_VERSION as ok,POLICY_TOKEN_TYPE as tk,REDACTION_TIERS as ak,LOCKABLE as ik,FEATURES as sk,PERMISSION_MODES as nk,PRODUCT_HOSTS as Sk,normalizeOrgPolicy as lk,endpointAllowed as Ek,modelAllowed as mk,agentAllowed as ck,permissionMode as pk,routeAllowed as Tk,redactionTier as dk,egressAllowed as _k,settingLocked as Rk,featureEnabled as Ak,applyPolicyToSettings as fk,policyLabel as Ik,policyHash as uk,verifyPolicyToken as Ok,globToRegExp as Nk}from"./policy.js";import{languageInstruction as Ck,RESPONSE_LANGUAGES as Pk}from"./response-language.js";import{NOTE_TOOL_SPECS as Lk,makeNoteToolExecutor as hk}from"./note-tool.js";import{memoryToolProvider as Dk}from"./memory-tool.js";import{captureFromMessage as kk}from"./memory-capture.js";import{skillRunFromSkill as bk,skillPackageFiles as Uk,filterMcpServersForSkill as vk,skillToolSystem as Kk,skillHandle as Bk,rankSkills as Gk,skillCatalogSystem as wk}from"./skill-runtime.js";import{skillFileProvider as Vk,SKILL_FILE_TOOL as Wk,skillEntry as Xk,skillDiscoveryProvider as Yk}from"./skill-files.js";import{SKILL_DRAFT_SCHEMA as Jk,MAX_SKILL_FILE_BYTES as jk,MAX_SKILL_PACKAGE_BYTES as Qk,skillCreatorPrompt as qk,skillIdFrom as Zk,admitPackage as $k,skillFromDraft as ey,packagesFromFiles as ry}from"./skill-creator.js";import{PATH_KIND as ty,FILES_TOOL as ay,checkAttachablePath as iy,secretReason as sy,isSecretPath as ny,pathAttachment as Sy,describeAttachedPath as ly,describePathSize as Ey,displayPath as my,pathAttachmentsOf as cy,withAbsolutePaths as py,attachedFilesProvider as Ty,attachedDocumentsOf as dy,documentReaderFor as _y,sniffType as Ry,normalizePath as Ay,collapseDots as fy,basenameOf as Iy,SKIP_DIR_NAMES as uy}from"./attached-paths.js";import{WRITE_FILE_TOOL as Ny,WRITE_MAX_BYTES as gy,writablePath as Cy,writableContent as Py,describeWrite as My,fileWriteProvider as Ly,diskWriter as hy}from"./file-write.js";import{EXTRACT_ROUTE as Dy,EXTRACT_PROVIDER_ID as Fy,MAX_DOCUMENT_BYTES as ky,PAGE_CHARS as yy,EXTRACT_TYPES as by,validateExtractRequest as Uy,validateExtractResponse as vy,EXTRACT_CONTEXT_ROUTE as Ky,EXTRACT_CONTEXT_MAX_DOCS as By,validateExtractContextRequest as Gy,validateExtractContextResponse as wy,paginateText as Hy,gatewayExtractor as Vy,extractorChain as Wy}from"./extract-capability.js";import{KB_CHUNK_CHARS as Yy,KB_CHUNK_OVERLAP as zy,headingOf as Jy,blocksOf as jy,splitLong as Qy,chunkPages as qy,outlineOf as Zy,citeChunk as $y,pageText as eb}from"./kb-chunk.js";import{KB_NODE_KINDS as ob,KB_EDGE_KINDS as tb,entitiesIn as ab,buildKbGraph as ib,indexGraph as sb,resolveNode as nb,neighbours as Sb,pathBetween as lb,expandChunks as Eb,communities as mb,topEntities as cb,graphReport as pb}from"./kb-graph.js";import{KB_VERSION as db,KB_LIMITS as _b,KB_NOTE_STATUSES as Rb,KB_ACCESS_ALL as Ab,shortHash as fb,kbDocId as Ib,createKb as ub,addDocument as Ob,removeDocument as Nb,addNote as gb,setNoteStatus as Cb,setKbAccess as Pb,kbMayUse as Mb,refreshKb as Lb,chunkById as hb,kbStatus as xb,embedMissing as Db,searchKb as Fb,readPage as kb,serializeKb as yb,deserializeKb as bb}from"./kb-index.js";import{KB_RESEARCH_LIMITS as vb,frameKbQuestion as Kb,spreadOf as Bb,groupByDoc as Gb,kbResearch as wb,kbAttachment as Hb}from"./kb-research.js";import{KB_TOOL as Wb,KB_ACTIONS as Xb,kbResident as Yb,kbToolProvider as zb,localKbClient as Jb,gatewayKbClient as jb,renderSearch as Qb,renderOutline as qb,renderGraph as Zb,renderStatus as $b,renderAdded as eU}from"./kb-tool.js";import{KB_ROUTE as oU,KB_ID_RE as tU,KB_SUBS as aU,KB_SOURCE_KINDS as iU,KB_AGENT_HEADER as sU,routeKb as nU,validateKbCreate as SU,validateKbAdd as lU,validateKbSearch as EU,validateKbResearch as mU,validateKbGraph as cU,validateKbNote as pU,validateKbNoteStatus as TU,validateKbAccess as dU,kbAttachment as _U,kbAttachmentsOf as RU}from"./kb-capability.js";import{MCP_REGISTRY_API as fU,MCP_CATALOG as IU,registryListUrl as uU,fetchMcpRegistryPage as OU,normalizeRegistryPage as NU,normalizeRegistryEntry as gU,mcpServerFromCatalogItem as CU}from"./mcp-registry.js";import{CE_SPECVERSION as MU,CE_TYPE_PREFIX as LU,CE_SOURCE_PREFIX as hU,rfc3339 as xU,ceSourceOf as DU,ceHostOf as FU,toCloudEvent as kU,fromCloudEvent as yU,toCloudEventLines as bU,fromCloudEventLines as UU,toCloudEventBatch as vU}from"./cloudevents.js";import{PUSH_LIMITS as BU,planEventPush as GU,ingestCloudEvents as wU,cursorOf as HU}from"./event-sync.js";import{eventStats as WU,projectYear as XU}from"./event-stats.js";import{SEALED_TYPE as zU,SEALED_VERSION as JU,SealError as jU,webCryptoSealer as QU,nodeSealer as qU,newDeviceKey as ZU,sealBlob as $U,openBlob as ev,shredBlob as rv,isSealedBlob as ov,isShredded as tv}from"./blob-envelope.js";import{USAGE_RING_MAX as iv,COST_BASES as sv,usageRecord as nv,usageFromEvent as Sv,usageFromOpenAi as lv,rollupKey as Ev,applyUsage as mv,summarizeUsage as cv,formatTurnUsage as pv,describeTurnUsage as Tv,promptTokensOf as dv}from"./usage.js";import{rateFor as Rv,costFor as Av,formatUsd as fv,PRICING_BASES as Iv,PRICING_LABELS as uv,normalizePricing as Ov,priceUsage as Nv}from"./usage-pricing.js";import{FACTCHECK_SCHEMA as Cv,FACTCHECK_VERDICTS as Pv,lastClaimOf as Mv,factcheckPrompt as Lv,factcheckVerdict as hv,factcheckKey as xv}from"./cowriter-factcheck.js";import{createVoiceLoop as Fv,VOICE_STATES as kv,MUTE_GRACE_MS as yv,MAX_PENDING_CHARS as bv,CONTINUATION_WINDOW_MS as Uv,ECHO_OVERLAP as vv,ECHO_TAIL_MS as Kv,MIN_BARGE_IN_WORDS as Bv,looksLikeEcho as Gv}from"./voice-loop.js";import{voiceStep as Hv,initialVoiceState as Vv,voiceSpeaker as Wv,isFarewell as Xv,ANOTHER_VOICE as Yv}from"./voice-brain.js";import{speakStream as Jv,speakable as jv,SPOKEN_REPLY_HINT as Qv}from"./speak-stream.js";import{createVad as Zv,lowBandEnergy as $v,pcmEnergy as eK,VAD_DEFAULTS as rK}from"./voice-vad.js";import{HF_API as tK,TTS_ARCH_LABEL as aK,ttsArchOf as iK,partitionTtsModels as sK,modelSearchUrl as nK,searchModels as SK,normalizeModel as lK,formatDownloads as EK,describeSearchResult as mK}from"./model-registry.js";import{SAMPLE_RATE as pK,MIN_SECONDS as TK,TARGET_SECONDS as dK,MAX_SECONDS as _K,PROMPT_TEXT as RK,sampleSeconds as AK,sampleTooShort as fK,defaultVoiceName as IK,microphoneError as uK,webMedia as OK,startRecording as NK}from"./voice-sample.js";import{TIER_LABEL as CK,modelRows as PK,catalogStatus as MK,dtypePicker as LK,voicePicker as hK,voiceListRows as xK,diarizeRows as DK,switchOutcome as FK,saveVoiceFailure as kK,saveTimedOut as yK,catalogUnavailable as bK}from"./voice-models.js";import{dictToText as vK,textToDict as KK}from"./redaction-dictionary.js";import{groupRuns as GK,summarizeRun as wK,findRepeats as HK,withCost as VK,verdict as WK,toSanitizedReport as XK}from"./run-details.js";import{RELAYED_HOST as zK,linkSurfaceOf as JK,surfaceLabel as jK,isRelayedTurn as QK,usageFromRelayedTurn as qK,summarizeRelayedUsage as ZK,mergeUsageSummaries as $K,relayedRunsOf as eB,relayedThreadTitle as rB,pullRelayedEvents as oB}from"./link-activity.js";import{parseMcpConfig as aB,parseArgsInput as iB,argsToText as sB,parseEnvInput as nB,envToText as SB,envLikeArgs as lB}from"./mcp-config-import.js";import{mutableRef as mB,refreshArgs as cB,canRefresh as pB,describeRuntime as TB}from"./mcp-launcher.js";import{defaultMcpServers as _B,isDefaultMcpServer as RB,upgradeShippedMcpPins as AB,msGraphMcpArgs as fB,MS_GRAPH_MCP_ENV as IB,MS_GRAPH_MCP_PIN as uB,MS_GRAPH_MCP_FORK as OB}from"./default-mcp-servers.js";import{MONITOR_SOURCES as gB,DEFAULT_MONITOR_PROFILE as CB,monitorProfile as PB,monitorWindowMs as MB,monitorNeedsTools as LB,filterMonitorTools as hB,recentFindings as xB,describeMonitorProfile as DB}from"./monitor-profile.js";import{NOTHING_NEW as kB,isNothingNew as yB,accumulates as bB,priorFindingsText as UB,deltaInstruction as vB,monitorPrompt as KB,applyMonitorReply as BB}from"./monitor-turn.js";import{defaultSkills as wB,meetingNotesSkill as HB,discussionSkill as VB,backfillBuiltinSkills as WB}from"./default-skills.js";import{SURFACES as YB,FEATURES as zB,listFeatures as JB,featureIds as jB}from"./feature-map.js";import{ISSUE_REPO as qB,NEW_ISSUE_BASE as ZB,ISSUE_SEARCH_API as $B,MAX_ISSUE_URL as eG,scrubReportText as rG,diagnosticsText as oG,buildBugReport as tG,newIssueUrl as aG,titleTerms as iG,issueSearchUrl as sG,matchIssues as nG,findExistingIssues as SG,issueCommentText as lG}from"./bug-report.js";import{WEB_RESEARCH_LIMITS as mG,WEB_TASK_DOMAINS as cG,researchAsk as pG,refineQueries as TG,parseSearchText as dG,cleanUrl as _G,pageKey as RG,passagesOf as AG,webResearch as fG,researchBrief as IG,researchCall as uG,runResearch as OG}from"./web-research.js";import{parseAmount as gG,moneyIn as CG,basisAt as PG,qualifierAt as MG,quoteAround as LG,offersIn as hG,rankOffers as xG,comparable as DG,basisLabel as FG,formatValue as kG,unverifiedAmounts as yG,quoteFormIn as bG}from"./offers.js";import{isSecretField as vG,maskSecretFields as KG,isPersonalField as BG,commitKind as GG,commitQuestion as wG,captchaIn as HG,captchaHandoff as VG,fenceUntrusted as WG,isFenced as XG}from"./page-guard.js";import{BROWSER_RELAY as zG,BROWSER_KINDS as JG,validateBrowserCall as jG,validateBrowserAnnounce as QG,validateBrowserResult as qG,createBrowserRelay as ZG,browserRelaySystem as $G}from"./browser-relay.js";import{settingsChatProvider as rw,chatReachOf as ow,coerceValue as tw,rankForMessage as aw,changeCard as iw,openCard as sw,applyChanges as nw,settingsLinkFor as Sw,SETTINGS_GROUP as lw,SETTINGS_FIND as Ew,SETTINGS_CHANGE as mw,SETTINGS_RUN as cw,SETTINGS_EVENTS as pw,LOOK_ONLY_ACTIONS as Tw,TYPE_TO_RUN as dw,isStricter as _w}from"./settings-chat.js";export{Si as ACCESS_LOG_MAX,ni as ACCESS_LOG_VERSION,i as ACTOR_KINDS,a_ as AGENT_ID_RE,yp as AGENT_REF_RE,JA as ALLOW_ALL,a as ALL_TYPES,_f as AMBIENT_KINDS,Wf as AMBIENT_MAX_WORDS,Yv as ANOTHER_VOICE,pg as API_BASE,hF as APPLE_NOTES_OPS,LF as APPLE_NOTES_SCRIPTS,i_ as APPLIES_TO,iT as ASK_TYPES,n_ as ASSISTANT_ID,bn as ASSISTANT_NAME,$I as AUTOCOMPLETE_MAX_TOKENS,ZI as AUTOCOMPLETE_SYSTEM,eu as AUTOCOMPLETE_TEMPERATURE,Ed as AUTONOMY,Ii as AdapterError,S_ as AgentError,Fn as AnalyzerError,JO as BACKUP_KDF_ITERATIONS,TT as BOARD_TOOL_NAME,hP as BOOKKEEPING_KEYS,wt as BRIEF_STATES,xM as BRINGBACK_COMMAND,JG as BROWSER_KINDS,zG as BROWSER_RELAY,Ap as BUDGET_DIMENSIONS,mu as BUG_REPORT_SLASH_ITEMS,pn as BUILTIN_TRIGGERS,eS as BUILTIN_VOICE_INTENTS,zO as BackupError,Rp as BudgetError,Dn as CADENCES,iL as CAPABILITY_TOOLS_SYSTEM,hU as CE_SOURCE_PREFIX,MU as CE_SPECVERSION,LU as CE_TYPE_PREFIX,cd as CHECKS,ex as CHECK_REACH,Ht as CLAIM_KINDS,n as CLASSES,UO as CLOCK_TOLERANCE_MS,Th as COMPACTION_SYSTEM,YO as COMPRESSIONS,jc as COMPRESSION_MODES,Uv as CONTINUATION_WINDOW_MS,VF as CONTINUE_TEXT,IE as COOLDOWN_MS,sv as COST_BASES,ug as COUNTED,hr as COWRITER_SYSTEM,xr as COWRITER_TEMPERATURE,o as CURRENT_VERSION,FF as CUT_FINISH,rg as DARK,mf as DATA_SCOPES,CC as DATE_PRESETS,vn as DAYPART_HOUR,$h as DECIDER_CHECKS,tL as DECIDE_TOOL_NAME,C_ as DECLINE_REASONS,ar as DEFAULT_API_ENGINES,dT as DEFAULT_ASK_TIMEOUT_MS,If as DEFAULT_BLOCK_CHARS,Qc as DEFAULT_COMPRESSION,ld as DEFAULT_GATE,Ns as DEFAULT_INTERNAL_PATTERNS,ys as DEFAULT_LOCK_MS,YE as DEFAULT_MAX_FINISH_TRIES,ff as DEFAULT_MAX_MEMORIES,XE as DEFAULT_MAX_ROUNDS,Q_ as DEFAULT_MIN_CALLS,CB as DEFAULT_MONITOR_PROFILE,cN as DEFAULT_POLICY,um as DEFAULT_SHIELD,Om as DEFAULT_STORE,Nt as DEFAULT_THRESHOLD,yn as DEFAULT_WAKE,gc as DESCRIBE_ACTION,RP as DESKTOP_SECTION_IDS,hx as DOCUMENT_PREFETCH,vv as ECHO_OVERLAP,Kv as ECHO_TAIL_MS,S as EFFECTS,l as EGRESS,s_ as EGRESS_CLASSES,XO as ENCRYPTED_TYPE,Tg as ENDPOINTS,ox as ENDPOINT_JOBS,Do as ENGINES_REV,Lo as ENGINE_KINDS,Jd as ENGINE_SPEC_KINDS,kS as ENTITIES_SCHEMA,dg as ENTITLEMENT_PUBLIC_JWK,FS as ENTITY_TYPES,yi as ENTRY_KINDS,NN as ENTRY_VERSION,t as EVENT_TYPES,Pd as EXECUTIVE,jE as EXHAUSTED_NOTE,Yh as EXPECTS,By as EXTRACT_CONTEXT_MAX_DOCS,Ky as EXTRACT_CONTEXT_ROUTE,Fy as EXTRACT_PROVIDER_ID,Dy as EXTRACT_ROUTE,by as EXTRACT_TYPES,Cg as EntitlementError,E as EventError,Cv as FACTCHECK_SCHEMA,Pv as FACTCHECK_VERDICTS,ns as FAILOVER_CAPABILITY_GAP,ss as FAILOVER_CLASS_GAP,PE as FAILOVER_MAX_ATTEMPTS,fN as FAST_FLUSH_MS,IN as FAST_STREAK,sk as FEATURES,zB as FEATURE_MAP,YB as FEATURE_SURFACES,Rg as FEATURE_TIER,QL as FETCHED_TTL_MS,zS as FIELD_TYPES,ay as FILES_TOOL,$p as FINDINGS_SCHEMA,eT as FINDING_KINDS,zm as FIND_ACTION,yc as FIND_DESCRIPTION,bc as FIND_RESIDENT,kc as FIND_TOOL_NAME,zE as FINISH_NUDGES,th as FIT_HEADROOM,Ig as FREE_LIMITS,eI as FRONT_PAGES,ec as FUSED_BUDGET_MS,$m as FUSED_CANDIDATES,rD as GATHER_LIMITS,ou as GEARS,XI as GOAL_MIN_NEW,Dp as GRANTABLE,PA as GRANT_INFO,kp as GRANT_RE,tK as HF_API,xh as HISTORY_NOTE,ac as HUB_TOOL_NAME,md as HUMAN_FLAGS,_F as IMPORT_SOURCES,_E as INPUT_PROGRESS_TOOLS,JC as INSIGHT_KINDS,VI as INSTRUCTION_RE,gs as INTERNAL_PATTERN_CATALOG,_o as INVARIANTS,mL as IN_PROCESS_IDS,qB as ISSUE_REPO,$B as ISSUE_SEARCH_API,on as JOB_ACTIONS,td as JOB_POST_ID_RE,od as JOB_POST_STATUSES,xN as JOURNAL_BOUNDS,rd as JobPostError,ON as JournalError,Ab as KB_ACCESS_ALL,Xb as KB_ACTIONS,sU as KB_AGENT_HEADER,Yy as KB_CHUNK_CHARS,zy as KB_CHUNK_OVERLAP,tb as KB_EDGE_KINDS,tU as KB_ID_RE,_b as KB_LIMITS,ob as KB_NODE_KINDS,Rb as KB_NOTE_STATUSES,vb as KB_RESEARCH_LIMITS,oU as KB_ROUTE,iU as KB_SOURCE_KINDS,aU as KB_SUBS,Wb as KB_TOOL,db as KB_VERSION,ks as KDF_HASH,Fs as KDF_ITERATIONS,YA as KernelError,g_ as LEDGER_ENTRY_KINDS,N_ as LEDGER_VERSION,eg as LIGHT,CT as LIVE_RUN_STATUSES,ik as LOCKABLE,JE as LOOPING_NUDGE,Xi as LOOP_KINDS,IO as LibraryError,Yi as LoopError,Ux as MATERIAL_PAGE_CHARS,Yt as MAX_BRIEF_CHARS,Xt as MAX_BRIEF_RECORDS,Vt as MAX_CLAIMS,Wt as MAX_CLAIM_REFS,Un as MAX_COMMANDS_PER_DELTA,ZR as MAX_DEPTH,ky as MAX_DOCUMENT_BYTES,Bs as MAX_ENTRIES,la as MAX_EXCERPTS,Ea as MAX_EXCERPT_CHARS,SF as MAX_FOLDER_DEPTH,nF as MAX_FOLDER_NAME,Ar as MAX_GRAPH_NODES,RF as MAX_IMPORT_TITLE,eG as MAX_ISSUE_URL,Md as MAX_JOBS_PER_ROUND,lf as MAX_MATCHES,Rf as MAX_MEMORY_CHARS,vs as MAX_NOTE_CHARS,Jg as MAX_NOTE_IMAGE_BYTES,gF as MAX_PAGE_HTML,Xh as MAX_PARTS,bv as MAX_PENDING_CHARS,Ld as MAX_ROUNDS,_K as MAX_SECONDS,Ks as MAX_SECRET_CHARS,jk as MAX_SKILL_FILE_BYTES,Qk as MAX_SKILL_PACKAGE_BYTES,gt as MAX_SUBJECTS,Ct as MAX_SUBJECT_CHARS,qR as MAX_SUBTASKS,BS as MAX_SUGGESTIONS,GS as MAX_SUGGESTION_CHARS,Sa as MAX_SYNTHESIS_CLAIMS,vu as MAX_TAGS,Uu as MAX_TAG_LENGTH,Us as MAX_TITLE_CHARS,fO as MAX_TITLE_LEN,oO as MAX_TITLE_LENGTH,OS as MAX_TOPICS,NS as MAX_TOPIC_CHARS,IU as MCP_CATALOG,fU as MCP_REGISTRY_API,hl as MCP_SIGN_IN_CODE,KA as MCP_TOOL_NAME,SP as MEETING_INSIGHT_SECTIONS,lP as MEETING_INSIGHT_SYSTEM,Tf as MEMORY_KINDS,df as MEMORY_KIND_NAMES,Of as MEMORY_TOOL_SPEC,Nf as MEMORY_UPCASTERS,pf as MEMORY_VERSION,hp as MERGE_POLICIES,Bv as MIN_BARGE_IN_WORDS,k_ as MIN_FIT,Af as MIN_MEMORY_CHARS,TK as MIN_SECONDS,$R as MIN_TAKEUP_FIT,tn as MISSED_POLICIES,ax as MODEL_TYPES,tP as MOMENT_BADGES,gB as MONITOR_SOURCES,IB as MS_GRAPH_MCP_ENV,OB as MS_GRAPH_MCP_FORK,uB as MS_GRAPH_MCP_PIN,yv as MUTE_GRACE_MS,wA as ManifestError,nM as McpClient,gf as MemoryError,ba as NEAR_TITLE_DISTANCE,ZB as NEW_ISSUE_BASE,lu as NEW_THREAD_SLASH_ITEMS,w as NOTE_ACTIONS,W as NOTE_ACTION_ERRORS,H as NOTE_ACTION_ORDER,V as NOTE_ACTION_TEMPERATURE,X as NOTE_COMMANDS,z as NOTE_COMMAND_MAX_TOKENS,Y as NOTE_COMMAND_TEMPERATURE,zg as NOTE_IMAGE_SCHEME,jg as NOTE_IMAGE_TYPES,rP as NOTE_SECTIONS,Lk as NOTE_TOOL_SPECS,kB as NOTHING_NEW,dE as OBSERVATION_TOOLS,YN as OMNI_GRAMMAR,XN as OMNI_MODES,NF as ONENOTE_TOOLS,ix as OPENAI_VOICES,Xe as PACER_DEFAULTS,yy as PAGE_CHARS,og as PALETTES,aE as PARALLEL_LOCAL_RE,ty as PATH_KIND,Ka as PDF_MAX_CHARS,Cm as PERMISSION_ANSWERS,gm as PERMISSION_EVENT,nk as PERMISSION_MODES,Pm as PERMISSION_TIMEOUT_MS,Mm as PERMISSION_TOOL_NAME,cg as PLANS,wr as PLAN_AUTHORS,Vr as PLAN_DECOMPOSE_MAX_TOKENS,Hr as PLAN_DECOMPOSE_SYSTEM,Wr as PLAN_DECOMPOSE_TEMPERATURE,xp as PLAN_MODES,Gr as PLAN_ROLES,Xr as PLAN_SECTION_MAX_TOKENS,Yr as PLAN_SECTION_TEMPERATURE,tk as POLICY_TOKEN_TYPE,ok as POLICY_VERSION,tT as POST_KINDS,aT as POST_STATUSES,dP as PREF_SECTIONS,_P as PREF_SECTION_IDS,ZF as PRESENCE_BUDGET_TOKENS,$F as PRESENCE_KINDS,Iv as PRICING_BASES,uv as PRICING_LABELS,Sk as PRODUCT_HOSTS,WT as PROJECT_ID_RE,Nd as PROJECT_JOBS_SCHEMA,gd as PROJECT_REVIEW_SCHEMA,hd as PROJECT_RUN_STATUSES,VT as PROJECT_STATUSES,RK as PROMPT_TEXT,ca as PROPOSAL_STATES,Ag as PRO_FEATURES,Nl as PUBLIC_REGISTRY,BU as PUSH_LIMITS,rk as PolicyError,HT as ProjectError,Cd as ProjectRunError,SD as QUESTION_PLAN_LIMITS,eo as REACH,Oe as RECALL_LIMIT,ue as RECALL_MIN_TERMS,gg as RECHECK_INTERVAL_MS,sp as RECIPE_MODES,mp as RECIPE_TOOL_NAME,Yd as RECORD_ENGINE_KINDS,RO as RECORD_KINDS,ZO as RECORD_TYPE,F_ as RECRUIT_SCHEMA,ak as REDACTION_TIERS,yt as REDACTION_TOKEN_TYPES,sS as REFINEMENT_SCHEMA,d as REF_KINDS,No as REGISTRY_STATES,zK as RELAYED_HOST,zA as REQUIRED_PLUGINS,LP as REQUIREMENTS,aL as RERANK_TOOL_NAME,_ as RESOLUTION,Pk as RESPONSE_LANGUAGES,JS as RESPONSE_MODES,be as RESULTS_PER_ENGINE,Im as RESULT_TOOL_NAME,PT as RESUMABLE_RUN_STATUSES,Mi as RETRIEVAL_TOOLS,Ac as REVEAL,Wd as ROLE_KINDS,Lp as ROLE_MODES,hA as ROSTER_KINDS,QE as ROUND_SEPARATOR,jd as ROUTE_PREFERS,MR as RUN_STATUSES,ip as RecipeError,vD as ReplayMiss,ls as RouterError,hs as RuleError,uf as SAME_FACT,pK as SAMPLE_RATE,Dx as SCAN_MAX_PAGES,en as SCHEDULE_KINDS,eR as SCM_KINDS,s as SCOPE_KINDS,Vd as SCORECARD_ENTRY_KINDS,Xd as SCORECARD_VERSION,zU as SEALED_TYPE,JU as SEALED_VERSION,qe as SEARCH_API_PRESETS,ye as SEARCH_ENGINES,mr as SEARCH_STATUS,lD as SEARCH_UNAVAILABLE,BN as SEGMENT_RE,Ut as SELF_LABELS,mw as SETTINGS_CHANGE,pw as SETTINGS_EVENTS,Ew as SETTINGS_FIND,lw as SETTINGS_GROUP,PP as SETTINGS_GROUPS,Tw as SETTINGS_LOOK_ONLY_ACTIONS,WP as SETTINGS_OPEN_DEFAULT,MP as SETTINGS_PAGES,cw as SETTINGS_RUN,dw as SETTINGS_TYPE_TO_RUN,tg as SHAPE,ZE as SHIMS,$E as SHIM_IDS,hM as SIDELINE_COMMANDS,FM as SIDELINE_SLASH_ITEMS,JM as SIDELINE_TOOL_NAME,jM as SIDELINE_TOOL_SPEC,SI as SKILL_CONTEXTS,Jk as SKILL_DRAFT_SCHEMA,cI as SKILL_FILE_KINDS,Wk as SKILL_FILE_TOOL,lI as SKILL_HISTORY_SCOPES,nI as SKILL_MANIFEST_VERSION,EI as SKILL_MCP_MODES,mI as SKILL_TRUST,pI as SKILL_UPCASTERS,hI as SKILL_VARS,xI as SKILL_VAR_NAMES,uy as SKIP_DIR_NAMES,Su as SLASH_TYPING_RE,AN as SLOW_FLUSH_MS,pN as SLOW_POLICY,ah as SMALL_WINDOW,sh as SMALL_WINDOW_ROUNDS,MA as SOLO_BUDGET,RC as SORT_LABELS,_C as SORT_MODES,HA as SOURCES,gL as SOURCE_TOOL_SPEC,oI as SOURCE_TRUST,Ua as SPAN_MIN_TERMS,de as SPARE_BLANK_MS,mC as SPEAKER_SLOTS,Qv as SPOKEN_REPLY_HINT,DT as STALLED_AFTER_MS,R_ as STARTER_AGENTS,bp as STARTER_TEAMS,fR as STEP_MAX_CHARS,DF as STITCH_LIMITS,mm as STOPPED_MARK,AO as STRUCTURE_KINDS,Ot as SUBJECT_KINDS,wS as SUGGESTIONS_SCHEMA,pa as SUPERSEDE_OVERLAP,Ls as SUPPRESSED,Me as SWARM_ROLES,ia as SYNTHESIS_SCHEMA,an as ScheduleError,jU as SealError,Ze as SearchApiError,ho as SearchEngineError,im as ShimError,TI as SkillManifestError,tI as SkillSourceError,BI as SkillVarError,jS as StructuredError,vO as SyncError,dK as TARGET_SECONDS,IR as TASK_TRANSCRIPT_MAX_CHARS,fg as TEAM_FEATURES,yR as TEAM_MANUAL,Yp as TEAM_PLAN_SCHEMA,LA as TEAM_SHAPES,kR as TEAM_TOOL_NAME,$N as THEMES,rT as THREAD_KINDS,oT as THREAD_STATUSES,DM as THREAD_TOOL_NAME,kM as THREAD_TOOL_SPEC,CK as TIER_LABEL,tO as TITLE_RULES_VERSION,ag as TOKEN_NAMES,ig as TOKEN_ROLES,Yl as TOKEN_SKEW_MS,gS as TOPICS_SCHEMA,za as TRANSCRIPT_MAX_CHARS,rn as TRIGGER_KINDS,aK as TTS_ARCH_LABEL,tD as TURN_EVENTS,Qx as TURN_STAGES,Mp as TeamError,PR as TeamRunError,Xo as ToolGroupError,uE as UNAVAILABLE_REASONS,_e as UNTITLED,rO as UNTITLED_MEETING,ao as UPCASTERS,_g as UPGRADE_URL,iv as USAGE_RING_MAX,IS as UTTERANCE_DANGLING_MS,fS as UTTERANCE_SETTLE_MS,rK as VAD_DEFAULTS,Ds as VAULT_VERSION,tx as VENDOR_JOBS,kv as VOICE_STATES,bs as VaultError,Kn as VoiceIntentError,Bo as WEATHER_HOST,Go as WEATHER_TIMEOUT_MS,ZM as WEATHER_TOOL_NAME,$M as WEATHER_TOOL_SYSTEM,mG as WEB_RESEARCH_LIMITS,Gc as WEB_SEARCH_SPEC,Kc as WEB_SEARCH_TOOL_NAME,Bc as WEB_SEARCH_TOOL_SYSTEM,cG as WEB_TASK_DOMAINS,xx as WHOLE_MAX_PAGES,_t as WIDGET_SURFACES,P_ as WITHDRAW_AFTER,GR as WORKLOG_KINDS,Fp as WORK_GRANTS,tu as WRITER_PREFS,au as WRITER_PREF_DEFAULTS,Ny as WRITE_FILE_TOOL,gy as WRITE_MAX_BYTES,wo as WeatherError,Ya as YOUTUBE_HOSTS,zi as abortCause,KL as aboutOwnPast,da as accept,bB as accumulates,Cc as actionMenu,GC as activePreset,iD as activityOf,_N as adaptProfile,fM as adaptiveToolRetryHint,MC as addDays,Ob as addDocument,gb as addNote,wu as addTag,wE as addUsage,Bd as adjustSummary,$k as admitPackage,VO as advanceBases,fl as adviceText,ND as againQuery,ck as agentAllowed,TA as agentColor,I_ as agentFromForm,pA as agentHue,dA as agentInitials,cA as agentKind,oe as agentMentionAt,xt as aliasMap,UL as answeredByPrefetch,WE as anthropicTranscript,tr as apiEngine,ir as apiEnginesFrom,lr as apiTrialVerdict,PF as appleNotesSource,MF as appleScriptError,QT as applyAll,Z_ as applyCard,Lr as applyEdits,FN as applyEntry,BB as applyMonitorReply,fk as applyPolicyToSettings,uP as applySections,nw as applySettingChanges,sD as applyStateDelta,mv as applyUsage,De as appoint,vo as areaLabel,Vi as argsShape,sB as argsToText,BD as asksIdentity,jf as asksOnlyAboutPage,c_ as assistantAgent,dy as attachedDocumentsOf,Ty as attachedFilesProvider,Mo as attemptOrder,bd as attest,Hl as authHeader,Kl as authorizeUrl,oM as availableDestinations,WB as backfillBuiltinSkills,EN as backupFromRecords,ql as bareToolName,Iy as basenameOf,PG as basisAt,FG as basisLabel,nN as bestCodec,f_ as blankAgent,lR as blankConnection,Te as blankFirst,$T as blankJobPost,pe as blankNotes,vT as blankProject,vp as blankTeam,TE as blockedToolResult,jy as blocksOf,Qp as boardText,ET as boardToolProvider,mT as boardToolSpec,GN as boundSegments,iR as branchFor,UP as breadcrumb,Xp as breakCycles,Jt as briefId,qt as briefLinks,GM as briefPrompt,Qt as briefTerms,jt as briefToText,$G as browserRelaySystem,rr as buildApiRequest,tG as buildBugReport,Pc as buildGroupDispatchSpec,ib as buildKbGraph,fr as buildNoteGraph,Wa as buildPdfDocument,Ue as buildSearchUrl,Oc as buildToolset,hi as buildTrajectory,ai as buildTranscriptDocument,uA as builtinOrg,Dg as can,Qs as canAddEntry,jT as canJobPostTransition,UT as canProjectTransition,pB as canRefresh,Zl as canRunConcurrently,Eo as canSatisfy,Df as candidatesFrom,Dd as canonical,kl as canonicalResource,sL as capabilityToolsProvider,pL as capabilityView,VG as captchaHandoff,HG as captchaIn,Qa as captionTracksFromPlayerResponse,kk as captureFromMessage,RA as cardNumbers,q_ as cardOverride,OD as carried,kL as carriedPlace,Y_ as carveBudget,MK as catalogStatus,bK as catalogUnavailable,VN as catchUpPlan,N as causesAreWellFormed,FU as ceHostOf,DU as ceSourceOf,gP as changedSections,ge as chapPageLink,iy as checkAttachablePath,Qh as checkDecider,To as checkInvariants,Zt as checkKnowledgeInvariants,Pg as checkoutUrl,NT as checkpointFrom,B as chipText,dL as choiceNote,TL as choicePatch,hb as chunkById,qy as chunkPages,$y as citeChunk,na as claimsFromSynthesis,Ye as classifyAnswer,AE as classifyFailure,jh as classifyIntent,he as classifyModel,Rs as classifySource,vm as claudePermissionResponse,QD as cleanFolderName,aO as cleanTitle,_G as cleanUrl,ru as clipCompletion,dR as clipMessage,Pn as clipText,TR as clipTranscript,il as coerce,vS as coerceEntities,tw as coerceSettingValue,fy as collapseDots,pM as combineSystemPrompt,Z as commandLineAt,_S as commandLooksFinished,Vn as commandsFromSegments,GG as commitKind,wG as commitQuestion,mb as communities,Am as compactValue,ph as compactable,lh as compactionPrompt,Eh as compactionRecord,DG as comparable,O as compareEvents,rf as compileQuery,Bn as compileWake,cP as composeMeetingInsightNotes,K as composerChips,Xc as compressToolSpec,Yc as compressToolSpecs,zc as compressionStats,aR as connectionFor,ER as connectionFromForm,xf as containment,zt as contentHash,Lh as contextPlan,GF as continuationMessages,RR as continuationNote,Mu as continueList,Aa as converge,Av as costFor,mi as createAccessLog,fi as createAdapterRegistry,IM as createAdaptiveToolPolicy,xn as createAnalyzerRegistry,cT as createAnswerBox,p as createAppender,Io as createBlobStore,Jp as createBoard,ZG as createBrowserRelay,pp as createBudget,bE as createCallRunner,kD as createCassette,Pi as createCitationCollector,AR as createControl,ze as createEnginePacer,HL as createFetchedStore,uN as createJournal,ub as createKb,WA as createKernel,fo as createLogStore,GA as createManifest,Ao as createMemoryAdapter,fE as createModelHealth,$i as createModelRouter,Gm as createPermissionDesk,Oo as createRegistry,pm as createResultStore,Ms as createRuleEngine,RT as createRunCache,DN as createSegment,rm as createShimLog,iI as createSkillSourceRegistry,zI as createSpendMeter,Hi as createStepRecorder,nl as createStructuredStream,Wo as createToolGroupRegistry,lE as createToolLoopGuard,cn as createTriggerRegistry,aD as createTurnEvents,wi as createTurnRunner,AS as createUtteranceGate,Zv as createVad,Gs as createVault,Zn as createVoiceIntentRegistry,Fv as createVoiceLoop,nR as credentialEnv,ng as cssVarName,HU as cursorOf,BC as dateFilterLabel,xC as dateRangeOf,uC as dayBucket,WC as dayCounts,LC as dayKey,BO as decide,Hh as decideIntent,TF as decidePage,H_ as decideRecruit,dF as decideUpdate,Zh as decidedLine,qh as deciderFor,II as declaredAccess,mF as decodeEntities,QO as decryptBackup,Xg as defaultImagePolicy,Wg as defaultLinkPolicy,_B as defaultMcpServers,k as defaultModelId,wB as defaultSkills,JL as defaultTtl,$n as defaultVoiceIntents,IK as defaultVoiceName,OL as deferAttachedSources,Ai as defineAdapter,m_ as defineAgent,On as defineJob,JT as defineJobPost,Jx as defineLane,Wi as defineLoop,hn as defineMeetingAnalyzer,qi as defineMiddleware,Qi as defineModel,bT as defineProject,Zi as defineRouteStrategy,Ps as defineRule,QS as defineSchema,$e as defineSearchApi,Co as defineSearchEngine,em as defineShim,aI as defineSkillSource,Ip as defineTeam,Vo as defineToolGroup,mn as defineTrigger,qn as defineVoiceIntent,iF as deleteFolderPlan,vB as deltaInstruction,eP as demd,sC as densityRibbon,CD as dependsOn,M as dequeue,$O as deriveBackupKey,ra as deriveBrief,oa as deriveBriefs,Hs as deriveKey,mO as deriveMeetingTitle,hO as deriveTitle,T_ as describeAgent,ly as describeAttachedPath,BR as describeCall,SR as describeConnection,KC as describeDateRange,r_ as describeEngine,DB as describeMonitorProfile,Ey as describePathSize,Fm as describePermission,Ep as describeRecipeForApproval,Pp as describeRole,TB as describeRuntime,qS as describeSchema,mK as describeSearchResult,VP as describeSettingValue,Rm as describeShape,am as describeShims,LT as describeSpend,FR as describeTeamForApproval,lA as describeTeamShape,KE as describeToolCall,Tv as describeTurnUsage,My as describeWrite,bb as deserializeKb,rM as destinationFromAgent,eM as destinationFromEndpoint,oG as diagnosticsText,DK as diarizeRows,vK as dictToText,Ra as diffProposal,Ih as digest,Vl as discoverMcpAuth,VB as discussionSkill,hy as diskWriter,ki as displayName,my as displayPath,lL as distributionConfidence,ku as docStats,Lx as documentBudget,Px as documentContext,_y as documentReaderFor,Mx as documentTerms,jI as draftSeparator,ta as driftedRefs,op as dryRunRecipe,gR as dryRunTeam,LK as dtypePicker,Nn as dueJobs,La as duplicateTitles,Ft as earnsBrief,Qn as editDistance,Mr as editKey,nd as effectiveGate,Tt as effectiveGrants,HP as effectiveSettingValue,oE as effectiveToolName,Ir as egoGraph,_k as egressAllowed,Db as embedMissing,sT as emptyBoardState,BT as emptyProjectRecord,IT as emptyRun,Tu as enabledSkills,jO as encryptBackup,Ek as endpointAllowed,lx as endpointEntry,Sx as endpointJobs,wd as engineKey,e_ as engineKeyOf,dr as engineLabel,p_ as engineOf,we as engineOrder,$d as engineRef,y_ as engineRow,b_ as engineRows,bA as engineStrip,K_ as engineWorth,bS as entitiesFormat,ab as entitiesIn,yS as entitiesPrompt,KS as entitiesStream,Ys as entryMeta,LN as entryStamp,lB as envLikeArgs,SB as envToText,jo as equipmentFor,Ji as errorFacts,Dc as estimateTokens,G_ as evaluatorPrompt,WU as eventStats,TD as evidenceFor,jL as exchangeOf,Eb as expandChunks,$c as expandRecipe,af as expandReplacement,vI as expandSkillPrompt,zh as expectsOf,Rl as explainInstallFailure,ll as explainMcpError,Gg as exportDevicePublicKey,JR as extendDependents,JN as extractFilters,As as extractUrls,Wy as extractorChain,uD as factFromReply,_D as factPrompt,ED as factSchema,mD as factSchemaFor,xv as factcheckKey,Lv as factcheckPrompt,hv as factcheckVerdict,LD as factsList,CE as failoverExhausted,as as failoverOrder,Ak as featureEnabled,jB as featureIds,WG as fenceUntrusted,WL as fetchKey,OU as fetchMcpRegistryPage,Xl as fetchMcpToken,XL as fetchTitle,YL as fetchedAsSources,zL as fetchedFacts,fx as figuresIn,Ly as fileWriteProvider,vC as filterByDate,Qu as filterByTags,Fi as filterEntries,vk as filterMcpServersForSkill,hB as filterMonitorTools,q as filterNoteActions,IC as filterRecords,F as filterSections,Pr as filterTypoEdits,Wm as findActionArgs,Uc as findDispatchProvider,SG as findExistingIssues,rl as findJson,of as findMatches,FO as findRecordRefs,HK as findRepeats,DP as findRow,ie as findSkillByName,sF as findSourceFolder,se as findTargetByName,Hm as findTools,Vm as findToolsResult,wn as findWakeCommand,qp as findingsInstruction,ST as findingsOf,xD as finishAnswer,Yx as finishTurn,Kd as fit,KF as fitAttachments,$L as fitFor,RD as fitsExpected,wp as fixedPlan,Gx as flowWorthDrawing,zM as foldBackFor,wM as foldBackNote,nT as foldBoard,HM as foldNotes,GT as foldProject,uT as foldRun,eF as folderPath,rF as folderSubtree,$D as folderTree,HO as forkConflict,pi as formatBytes,yC as formatDateTerm,EK as formatDownloads,qA as formatReport,ya as formatSurvey,Xu as formatTag,Ju as formatTagQuery,EC as formatTalkTime,oi as formatTimestamp,ti as formatTranscript,pv as formatTurnUsage,fv as formatUsd,kG as formatValue,Uo as formatWeather,Kb as frameKbQuestion,J as frameNoteAction,Og as freeCap,Zs as fromB64,yU as fromCloudEvent,UU as fromCloudEventLines,$f as frontPageInstruction,Zf as frontPagesAskedAbout,At as fuseRRF,Qm as fusedRanker,Sd as gateAllows,Vy as gatewayExtractor,jb as gatewayKbClient,Al as gatewayNotBackAdvice,DD as gatherFacts,Zx as gatherItems,Bg as generateDeviceKey,NM as getMcpProviders,ko as getWeather,dS as gistOpening,TS as gistText,Nk as globToRegExp,YI as goalDraftAllowed,yD as gradeAnswer,gp as grantAllows,NA as grantChoices,gA as grantsFromChoices,Jo as grantsNeededFor,pb as graphReport,Or as graphStats,QI as groundingBlock,Ox as groundingNote,sP as groupActionsByOwner,Gb as groupByDoc,kP as groupById,D as groupModels,NC as groupRecords,GK as groupRuns,ri as groupSegments,FC as hasDateTerms,ZC as hasInsights,$o as hasSubstance,Gu as hasTag,zu as hasTagTerms,Jy as headingOf,hh as historyContext,YR as holdsGrants,jP as homeChecklist,Uf as homePlace,fs as hostMatches,Zo as housekeepingTarget,EF as htmlToMarkdown,tc as hubSpec,aN as identityCodec,wD as identityHint,GD as identitySystem,uL as imageAttachmentsOf,_L as inProcessPatch,cL as inProcessView,Lu as indentSelection,sb as indexGraph,wU as ingestCloudEvents,xo as inheritEngineDefaults,Vv as initialVoiceState,QC as insightKindOf,pP as insightTranscript,cl as installHintFor,WI as instructionOnLine,Kh as intentFromReply,Bh as intentItems,bh as intentNeedOptions,yh as intentNeeds,vh as intentPrompt,Uh as intentSchema,qN as isActionable,Ko as isAmbiguousLocation,pO as isBetterTitleSource,ce as isBlankNote,OA as isBuiltin,$l as isCacheable,Em as isClientNote,oh as isContextLimitError,RB as isDefaultMcpServer,qO as isEncryptedBackup,Ex as isEndpointRef,MN as isEntry,Xv as isFarewell,XG as isFenced,pS as isFillerSentence,iO as isGenericTitle,uM as isInvalidToolParametersResult,et as isLocalHelper,Js as isLocked,pE as isLoopableTool,bx as isMaterial,$x as isMiss,CR as isModelUnavailable,BF as isNoneNote,al as isNothing,yB as isNothingNew,hm as isPermissionTool,BG as isPersonalField,Qo as isPleasantry,hg as isPro,P as isQueued,NO as isRecordId,bt as isRedactionToken,A as isRef,QK as isRelayedTurn,Ke as isResultHost,gT as isResumable,dI as isSafeSkillPath,ov as isSealedBlob,oN as isSealedRecord,Ve as isSearchPage,vG as isSecretField,ny as isSecretPath,vt as isSelfLabel,wO as isSettled,tv as isShredded,kC as isSingleDay,pu as isSkillEnabled,ih as isSmallWindow,DE as isSourceGateError,pC as isSpeakerImageValue,ml as isStaleMcpSession,_w as isStricterSetting,ht as isSubjectCandidate,rt as isSystemModel,xg as isTeam,PN as isTombstone,c as isValidEvent,Pf as isValidMemory,CO as isValidStoredRecord,dx as isVoiceId,eD as isWebSearch,ja as isYouTubeUrl,lG as issueCommentText,sG as issueSearchUrl,B_ as jobApplications,zR as jobFromSubtask,ed as jobPostFromForm,Rd as jobResults,qT as jobToRole,gn as jobsForEvent,ud as jobsPrompt,_U as kbAttachment,RU as kbAttachmentsOf,Ib as kbDocId,Mb as kbMayUse,Zy as kbOutlineOf,wb as kbResearch,Hb as kbResearchAttachment,Yb as kbResident,xb as kbStatus,zb as kbToolProvider,eh as keepRecentFor,tN as keyCache,Di as lanesOf,Ck as languageInstruction,Mv as lastClaimOf,nc as lastUserText,it as layoutFlowchart,M_ as ledgerKey,Ug as licenseFromPayload,ot as lightestLocalHelper,wI as lineAt,u as linearize,Ba as linesFromItems,Jf as linkAttachments,fa as linkClaims,kO as linkRecordRefs,JK as linkSurfaceOf,vP as linkTo,KP as linkToRow,Oi as linkifyCitations,Yf as linksToRead,yI as lintSkillPrompt,gr as lintText,JB as listFeatures,jx as listLanes,xP as listRows,Jb as localKbClient,YC as localeWeekStart,js as lockedSummary,Gv as looksLikeEcho,Va as looksScanned,hL as lookupLabel,LL as lookupResult,$v as lowBandEnergy,Ei as makeAccessEvent,xc as makeDispatchProvider,kd as makeEntry,jD as makeFolder,Lc as makeGroupDispatchExecutor,gN as makeJournalEntry,h_ as makeLedgerEntry,hk as makeNoteToolExecutor,mc as makePromptedTranscript,OO as makeRecordId,R as makeRef,ms as makeSourceStore,ci as makeStorageTier,oc as makeToolHub,cs as manifestText,rp as mapInput,UF as mapParts,Bf as markUsed,gi as markdownUrl,KG as maskSecretFields,kf as matchForForget,tf as matchIndexFor,nG as matchIssues,Ru as matchSlashRecipe,_u as matchSlashSkill,fu as matchSlashTeam,Mn as matchSummary,UC as matchesDateRange,ju as matchesTagFilter,yx as materialReader,zl as mcpAuthKey,PM as mcpBackoff,MM as mcpClientFor,vA as mcpDispatchProvider,mM as mcpInventorySystem,SM as mcpProvider,CU as mcpServerFromCatalogItem,EM as mcpSharedSystem,XA as meetDecisions,Is as meetReach,_n as meetingEndedTrigger,EP as meetingInsightPrompt,qC as meetingInsights,HB as meetingNotesSkill,dn as meetingStartedTrigger,TO as meetingTitlePrompt,Kf as memoryBlock,Mf as memoryKey,Dk as memoryToolProvider,wf as memoryToolSystem,ne as mentionAnswerPrefix,xa as mentionsFrom,iM as mergeEndpointDestinations,Ge as mergeEngineResults,WD as mergeNote,Kr as mergeResearchLanes,UN as mergeSegments,ae as mergeSkillPrompt,NP as mergeStamped,pR as mergeTranscript,$K as mergeUsageSummaries,mh as messagesAfter,cR as messagesFor,uK as microphoneError,rh as minWindowFor,Tl as missingCommandIn,pl as missingCommandMessage,OF as missingOneNoteTools,sA as missingStarters,er as missingVars,mk as modelAllowed,nx as modelJobsOf,PK as modelRows,Sm as modelSaid,nK as modelSearchUrl,y as modelSummary,nm as modelView,Tx as modelsOfType,aP as momentBadge,CG as moneyIn,iS as monitorIntent,LB as monitorNeedsTools,PB as monitorProfile,KB as monitorPrompt,MB as monitorWindowMs,VC as monthGrid,tF as moveFolder,aF as moveNote,L as moveQueued,fB as msGraphMcpArgs,It as multiSearch,mB as mutableRef,XC as nearbyDays,U_ as needForJob,fI as needsBridge,eE as needsConfirmation,vg as needsRecheck,vf as needsWhere,uh as needsWhole,Sb as neighbours,ZU as newDeviceKey,aG as newIssueUrl,oC as newNoteImageId,_R as newSteps,yL as newsAsk,nn as nextFireAt,VM as nextSidelineIndex,ln as nextWakeAt,sN as nodeCodec,Ol as nodeSatisfies,qU as nodeSealer,OE as normModelName,E_ as normalizeAgent,dp as normalizeBudget,L_ as normalizeCall,oR as normalizeConnection,Gd as normalizeEngine,qd as normalizeEngineSpec,sd as normalizeGate,Np as normalizeGrants,su as normalizeIntent,zT as normalizeJobPost,Cf as normalizeMemory,lK as normalizeModel,lk as normalizeOrgPolicy,Ay as normalizePath,dl as normalizePlatform,Qd as normalizePolicy,Ov as normalizePricing,yT as normalizeProject,ua as normalizeRecord,Oa as normalizeRecords,gU as normalizeRegistryEntry,NU as normalizeRegistryPage,HR as normalizeRequest,Hd as normalizeScm,MI as normalizeSkill,Jn as normalizeSpeech,gO as normalizeStoredRecord,Pt as normalizeSubject,Ku as normalizeTag,Bu as normalizeTags,Op as normalizeTeam,hS as normalizeTopic,xS as normalizeTopics,HE as normalizeUsage,Rx as normalizeVoices,iu as normalizeWriterPrefs,MD as notFoundLines,Q as noteActionItems,j as noteActionLabel,YD as noteConflictsIn,ZD as noteFolder,Qg as noteImageId,Zg as noteImageIds,qg as noteImageRef,$g as noteImageRefs,aS as noteIntent,oP as noteSectionKind,XM as noteUnits,Il as npmInstallCommand,DA as observeInbox,Ng as observeSince,FA as observeStrip,Cn as occurrenceKey,Sn as occurrencesBetween,He as offTopic,BL as offeredSearch,hG as offersIn,Xm as oneLiner,uF as oneNoteResourceId,fF as oneNoteSource,IF as oneNoteToolValue,VE as openAiTranscript,ev as openBlob,SL as openDecision,Ws as openEntry,rN as openRecord,Ga as orderLines,uI as originLabel,_I as originOf,rC as orphanNoteImages,Ma as orphanRecords,Cu as outlineOf,Ym as overlapRank,HN as overlayEntries,El as packageFromArgs,ry as packagesFromFiles,bL as pageAsk,FP as pageById,Qf as pageInstruction,RG as pageKey,eb as pageText,Ha as pageTextFromItems,yP as pagesOf,Hy as paginateText,sg as paletteFor,Ae as paragraphAt,wa as paragraphsFromLines,tE as parallelEligible,re as parseAgentMention,gG as parseAmount,iB as parseArgsInput,Dl as parseAuthChallenge,$t as parseBriefText,bM as parseBringBack,cu as parseBugCommand,Xn as parseClock,Hn as parseCommand,En as parseCron,DC as parseDateQuery,Wn as parseDuration,US as parseEntities,nB as parseEnvInput,w_ as parseEvaluation,jp as parseFindings,at as parseFlowchart,fd as parseJobs,ZA as parseJsonl,BP as parseLink,Pu as parseListItem,aB as parseMcpConfig,iP as parseMeetingNotes,aC as parseMeetingText,Eu as parseNewThread,zn as parseNumberWords,zN as parseOmni,Hp as parsePlan,Jr as parsePlanTasks,uO as parseRecordId,lS as parseRefinement,tR as parseRemote,Id as parseReview,dG as parseSearchText,KN as parseSegmentName,yM as parseSideline,Cl as parseSignInPrompt,te as parseSkillMention,kI as parseSkillVars,sl as parseStructured,WS as parseSuggestions,Yu as parseTagQuery,ei as parseTimedText,dO as parseTitleResponse,pc as parseToolCalls,LS as parseTopics,bo as parseWeather,Yn as parseWhen,Ja as parseYouTubeUrl,kF as partChars,bF as partPrompt,Wh as partQueries,sK as partitionTtsModels,cD as partsOf,PD as partsPlan,AG as passagesOf,sr as patchApiEntries,Sy as pathAttachment,cy as pathAttachmentsOf,lb as pathBetween,eK as pcmEnergy,C as pendingQueue,ym as permissionAllowed,km as permissionAnswer,Bm as permissionIcon,Dm as permissionKeys,Km as permissionLine,pk as permissionMode,xm as permissionRequestFromClaude,Lm as permissionToolSpec,Rn as personJoinedTrigger,xi as phasesOf,An as phraseTrigger,Za as pickCaptionTrack,wC as pickDay,Ce as pickLinkTarget,dN as pickProfile,Be as pickResults,IP as pickSections,is as pinnedOrderOf,Dh as placeItems,pD as plainEvidence,Zr as planAttribution,qr as planBody,Sh as planCompaction,GU as planEventPush,Lg as planLabel,Mg as planOf,Qr as planParts,ft as planQueries,Nh as planRetrieval,zr as planSectionSystem,GO as planSync,jr as planTitleFor,sE as planToolRound,Fh as planTurn,Vp as plannerPrompt,$P as pointsAtGateway,gD as pointsBack,RN as policyFor,uk as policyHash,Ik as policyLabel,u_ as poolFor,ts as preferenceFor,ML as prefetchAttachment,GL as prefetchBudgetMs,PL as prefetchPlan,jF as presenceBlock,YF as presenceDelta,XF as presenceFor,px as presetServes,Nv as priceUsage,UB as priorFindingsText,xT as priorWorkFor,_i as projectChain,KT as projectFromForm,wT as projectProgress,XU as projectYear,h as promoteQueued,aA as promoteRoles,vi as promptEntries,dv as promptTokensOf,cc as promptedToolsSystem,Ec as promptedTranscript,W_ as proposalFromNeeds,X_ as proposalToAgent,Ta as propose,Gf as pruneMemories,oB as pullRelayedEvents,MG as qualifierAt,In as questionTrigger,Vh as questionsIn,bP as quickRows,LG as quoteAround,bG as quoteFormIn,jm as rankFused,Ee as rankLinkTargets,xG as rankOffers,vr as rankResearchCards,aw as rankSettingsForMessage,Gk as rankSkills,kt as rankSubjects,dD as rankedEvidence,Rv as rateFor,zF as reachOf,ro as reachRank,oo as reachSatisfies,or as readApiResponse,bl as readAuthServerMetadata,kb as readPage,vl as readRegistration,yl as readResourceMetadata,Ts as readSource,BM as readThread,Gl as readTokenResponse,EO as readableWhen,ZT as readyJobs,yf as recall,Um as recallPermission,Ie as recallPicks,fe as recallQuery,xB as recentFindings,Au as recipeInvocationText,ep as recipeParams,Sp as recipeToolProvider,lp as recipeToolSpec,Ff as reconcile,Po as reconcileEngines,lN as recordsFromBackup,z_ as recruitEvents,V_ as recruitForRun,J_ as recruitJob,li as redactAccessArgs,ga as redactedTokensIn,Ca as redactionCost,dk as redactionTier,vF as reduceNotes,TG as refineQueries,cS as refineSpokenCommand,SS as refinementFormat,nS as refinementPrompt,ES as refinementStream,cB as refreshArgs,Lb as refreshKb,Jl as refreshedAuth,Wl as registerMcpClient,Ul as registrationRequest,uU as registryListUrl,_a as reject,eB as relayedRunsOf,rB as relayedThreadTitle,bm as rememberPermission,U as rememberRecent,oS as reminderIntent,Nb as removeDocument,Hu as removeTag,oF as renameFolder,eU as renderAdded,AL as renderContent,st as renderFlowchartSvg,Zb as renderGraph,Vg as renderMarkdown,qb as renderOutline,Qb as renderSearch,$b as renderStatus,yO as repairAnswerMarkup,Ni as repairCitedLinks,qD as repairFolders,tl as repairJson,nf as replaceAll,Sf as replaceAllInRange,sf as replaceMatch,QA as replay,rs as requirementsFor,os as requirementsForStep,qm as rerankThrough,pG as researchAsk,IG as researchBrief,uG as researchCall,yr as researchRelevance,Ur as researchSnippet,CM as resetMcp,hC as resolveDateValue,mx as resolveEndpointRef,nb as resolveNode,zD as resolveNoteConflict,f as resolveRef,UM as resolveSidelineTarget,jN as resolveSince,Dt as resolveSubjects,__ as resolveTeam,Eg as resolveTheme,$S as responseFormat,fm as resultToolSpec,NR as resumeTeam,tm as retirableShims,je as retryAfterMs,Ic as revealCut,fc as revealStep,Od as reviewPrompt,ol as rewriteJson,xU as rfc3339,Le as roleById,_A as roleCardId,Ev as rollupKey,mA as rosterRows,Ad as roundBudget,UE as roundCap,QF as roundCount,dd as roundJobs,qF as roundMinutes,EE as roundSignature,Tk as routeAllowed,zx as routeByRule,v_ as routeFor,di as routeGraph,nU as routeKb,Fe as routeTeam,OC as rowTime,OT as runFromEvents,pF as runImport,kA as runLanes,tp as runPlan,Td as runProject,ap as runRecipe,OG as runResearch,xL as runResearchItem,dm as runResultQuery,hT as runState,OR as runTeam,nE as runToolRound,yE as runTurnLoop,Wx as runTurnPipeline,Xx as runTurnPipelineAsking,gE as runWithFailover,Fr as salientTerms,Vf as sameMemory,Ss as sameModelKey,OI as sameSkillOrigin,Wu as sameTags,RS as sameUtterance,AK as sampleSeconds,fK as sampleTooShort,yK as saveTimedOut,kK as saveVoiceFailure,bf as saysWhere,TN as scalePolicy,tS as scheduleIntent,Cp as scmAllows,bD as scoreRuns,rG as scrubReportText,$U as sealBlob,Vs as sealEntry,eN as sealRecord,Sr as searchApiChoices,zs as searchEntries,Hc as searchFailureOf,Fb as searchKb,SK as searchModels,Je as searchPolitely,wc as searchResultsToText,YP as searchSettings,Tr as searchStatus,MO as searchTextFor,sy as secretReason,OP as sectionHash,mP as sectionMaxTokens,qP as sectionOfRow,AP as sectionSpec,fP as sectionValue,tM as seedDestinations,kN as segmentBytes,yN as segmentEntries,vN as segmentName,wN as segmentsFor,_h as selectContext,yu as selectionStats,yb as serializeKb,cx as servesChat,bC as setDateTerm,Pb as setKbAccess,Cb as setNoteStatus,wP as setSettingValue,Rk as settingLocked,GP as settingValue,iw as settingsChangeCard,rw as settingsChatProvider,ow as settingsChatReachOf,QP as settingsGateOf,Sw as settingsLinkFor,sw as settingsOpenCard,XP as settingsOpenMode,JP as settingsStatusAll,zP as settingsStatusOf,mS as settleRefinement,Fd as sha256,Tm as shieldToolResult,HC as shiftMonth,fb as shortHash,ps as shortUrl,cO as shouldAutoTitle,bN as shouldRotate,aM as shouldSeedDestinations,rv as shredBlob,YM as sidelinePath,QM as sidelineToolProvider,wg as signChallenge,Pl as signInError,Ml as signInFromError,Ll as signInToolResult,es as signalsFrom,hf as similarity,wk as skillCatalogSystem,CA as skillChoices,qk as skillCreatorPrompt,Yk as skillDiscoveryProvider,Xk as skillEntry,Vk as skillFileProvider,AI as skillFiles,ey as skillFromDraft,Bk as skillHandle,Zk as skillIdFrom,Nu as skillInvocationLabel,Ou as skillInvocationOf,NI as skillIsStale,Uk as skillPackageFiles,bk as skillRunFromSkill,Kk as skillToolSystem,DI as skillVar,KI as skillVarGuidance,FI as skillVarPattern,uu as slashCommandInsert,du as slashCommandItems,Lf as slotOf,d_ as slugAgentId,Bp as slugTeamName,AD as snapQuote,Ry as sniffType,xO as snippetOf,fA as soloTeam,fC as sortRecords,AC as sortStamp,cM as sourceCitationSystem,xE as sourceGate,hE as sourceGuardFor,ds as sourceId,WM as sourceOf,us as sourcePolicyFor,LE as sourcePolicySettings,Os as sourceUrlsOf,Ci as sourcesFromToolText,hD as sourcesOf,Da as spanningQuestions,Jv as speakStream,jv as speakable,SC as speakerBreakdown,TC as speakerLabeller,iC as speakerStats,lC as speakerTimeline,MT as spendOf,yA as spendRows,yF as splitForWindow,Qy as splitLong,VD as splitNoteBlocks,Bb as spreadOf,mE as stableToolCallKey,KO as stampOf,ul as standaloneInstallCommand,fD as standsOn,PC as startOfDay,NK as startRecording,A_ as starterAgents,iA as starterTeam,Up as starterTeams,wx as stepAction,GE as stepResultNote,BE as stepResultText,Hx as stepState,lm as stoppedText,zf as storyLinkOf,iN as streamCodec,gx as stripEchoedWrapper,eC as stripNoteImageRefs,Kt as stripQualifiers,Mt as subjectKey,Lt as subjectTokens,ID as subjectsOf,UI as substituteSkillVars,VR as subtaskFromRequest,Zu as suggestExistingTags,Bt as suggestMerges,bI as suggestSkillVar,VS as suggestionsFormat,HS as suggestionsPrompt,XS as suggestionsStream,vd as summarize,x_ as summarizeEngine,ZK as summarizeRelayedUsage,wK as summarizeRun,_r as summarizeSearch,om as summarizeShims,cv as summarizeUsage,jC as summarySections,hN as supersedes,xe as supportsSubagents,jK as surfaceLabel,Fa as surveyCorpus,FK as switchOutcome,XD as syncNote,sa as synthesisPrompt,ch as systemWithSummary,qu as tagFacets,pr as tagResults,$u as tagsSearchText,WR as takeUp,XR as takeUpLine,jR as taskTree,_d as teamForRound,Kp as teamFromForm,nA as teamHealth,Iu as teamInvocationText,oA as teamLanes,rA as teamLine,SA as teamShape,hR as teamToolProvider,xR as teamToolSpec,DR as teamToolTimeoutMs,IA as teamsWithSolos,gM as testMcpServer,UD as textKey,KK as textToDict,lg as themeStylesheet,vM as threadManifest,kx as threadMaterialOf,QR as threadRows,Ui as threadTitle,KM as threadToolProvider,Bi as threadTree,bi as threadsOf,ka as thresholdSweep,Fg as tierFor,o_ as tierOf,$a as timedTextUrl,rS as timerIntent,Tn as timerTrigger,lO as titleFromDate,SO as titleFromParticipants,sO as titleFromSummary,nO as titleFromTopics,iG as titleTerms,qs as toB64,Zp as toBriefClaims,fL as toChatMessages,kU as toCloudEvent,vU as toCloudEventBatch,bU as toCloudEventLines,Sg as toCssVars,LO as toIndexEntry,ZS as toJsonSchema,$A as toJsonl,mo as toModelSchema,co as toModelSchemas,IL as toMultimodalMessages,XK as toSanitizedReport,PO as toSearchRecord,xu as toggleLinePrefix,Fu as toggleLink,Vu as toggleTag,Du as toggleTask,hu as toggleWrap,wl as tokenExpired,Bl as tokenRequest,jn as tokenize,CN as tombstone,dc as toolChannel,Zm as toolDoc,cE as toolMadeProgress,zo as toolNeedFor,Mh as toolPlan,TM as toolStatus,Ql as toolTraits,gh as toolsWanted,cb as topEntities,kr as topicTerms,fn as topicTrigger,MS as topicsFormat,PS as topicsPrompt,CS as topicsSchema,DS as topicsStream,rE as traitsIndex,_c as transcriptFor,ii as transcriptFromTracks,$ as triggerQueryAt,Jc as trimDescription,ur as trimGraph,wF as trimOverlap,RI as trustOf,iK as ttsArchOf,Kx as turnFlow,Bx as turnFlowChart,Nx as turnGroundingNote,Ki as turnsOf,el as unfence,ws as unlockVault,Ix as unsupportedFigures,ux as unsupportedNote,yG as unverifiedAmounts,ve as unwrapRedirect,io as upcast,so as upcastAll,Hf as upcastMemory,CI as upcastSkill,PI as upcastSkills,AB as upgradeShippedMcpPins,AA as upsertAgents,Sv as usageFromEvent,lv as usageFromOpenAi,qK as usageFromRelayedTurn,_p as usageOf,nv as usageRecord,Mc as validateAction,l_ as validateAgent,QG as validateBrowserAnnounce,jG as validateBrowserCall,qG as validateBrowserResult,Tp as validateBudget,So as validateCapability,rR as validateConnection,Zd as validateEngineSpec,Xs as validateEntry,m as validateEvent,Gy as validateExtractContextRequest,wy as validateExtractContextResponse,Uy as validateExtractRequest,vy as validateExtractResponse,id as validateGate,lo as validateInvocation,YT as validateJobPost,dU as validateKbAccess,lU as validateKbAdd,SU as validateKbCreate,cU as validateKbGraph,pU as validateKbNote,TU as validateKbNoteStatus,mU as validateKbResearch,EU as validateKbSearch,kT as validateProject,Zc as validateRecipe,sn as validateSchedule,gI as validateSkill,up as validateTeam,St as validateView,lt as validateViewInvocation,ct as validateWidget,pt as validateWidgetMessage,_M as vaultWidgetSystem,sx as vendorOf,WK as verdict,Ud as verifyAttested,yd as verifyChain,yg as verifyEntitlement,Ok as verifyPolicyToken,bg as verifySignedToken,cr as viaOf,qa as videoMetaFromPlayerResponse,nr as viewApiEntries,Et as viewResult,Tc as visiblePrefix,ha as vocabularyDrift,un as voiceCommandTrigger,_x as voiceListRequest,xK as voiceListRows,hK as voicePicker,Wv as voiceSpeaker,Hv as voiceStep,Gn as wakeFor,Pa as wantedPages,wh as wantsDecision,Gh as wantsIntent,QN as wantsModel,RM as wantsVaultGuidance,Wp as waves,FL as weatherFollowupPlace,rL as weatherFromSearch,DL as weatherPlace,eL as weatherToolProvider,yo as weatherUrl,QU as webCryptoSealer,OK as webMedia,br as webQuery,vL as webRedoAsk,fG as webResearch,Vc as webSearchToolProvider,Fl as wellKnownUrls,EA as whereItWorks,dM as widgetAuthoringSystem,dt as widgetIcon,le as wikiQueryAt,Na as wikilinksIn,ZL as windowOf,py as withAbsolutePaths,pT as withBoardTool,VK as withCost,VL as withFetchedMemo,hc as withGuidance,ic as withHint,sc as withLead,JF as withPresence,lc as withPromptedTools,b as withRecent,_m as withResultShield,AT as withRunCache,NL as withSourceTool,HF as withStitching,vE as withToolSystem,kg as withinFreeLimit,FE as withinReach,Ah as withoutOwnInstructions,DO as wordCount,Cr as wordDiff,KR as workLogEvidence,UR as workLogFor,vR as workLogText,sR as worktreeDirFor,Ch as worldAnswered,Ph as worldPlanned,Py as writableContent,Cy as writablePath,HI as writerAffordance,qI as writerRequest,JI as writerTail};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatpanel/events",
3
- "version": "0.433.0",
3
+ "version": "0.435.0",
4
4
  "description": "The canonical ChatPanel event-log and capability contracts — typed durable facts, clock-free deterministic linearization, schema upcasting, and the invariants the replay harness asserts. Pure, dependency-free ESM shared by the ChatPanel extension, gateway and bridge.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -69,6 +69,7 @@
69
69
  "./client-prefs.js": "./client-prefs.js",
70
70
  "./composer-chips.js": "./composer-chips.js",
71
71
  "./settings-registry.js": "./settings-registry.js",
72
+ "./settings-chat.js": "./settings-chat.js",
72
73
  "./feature-map.js": "./feature-map.js",
73
74
  "./context-attachments.js": "./context-attachments.js",
74
75
  "./context-breakdown.js": "./context-breakdown.js",
@@ -422,6 +423,7 @@
422
423
  "client-prefs.js",
423
424
  "composer-chips.js",
424
425
  "settings-registry.js",
426
+ "settings-chat.js",
425
427
  "feature-map.js",
426
428
  "context-attachments.js",
427
429
  "context-breakdown.js",
@@ -0,0 +1,4 @@
1
+ import{listRows as be,findRow as X,rowsFor as Se,breadcrumb as _,linkToRow as ke,setValue as $e,effectiveValue as ve,describeValue as Ne,gateOf as Y}from"./settings-registry.js";import{makeDispatchProvider as Oe}from"./tool-dispatch.js";import{exprLit as S}from"./a2ui-tool-cards.js";const oe="settings",z="settings_find",H="settings_change",ie="settings_run",K=Object.freeze({allow:"chap.settings.allow",deny:"chap.settings.deny",open:"chap.settings.open"}),M=6,xe=new Set(["bridge-url","bridge-token","gw-url","gw-token","ch-token"]),Te=new Set(["internal-restore","license-deactivate","backup-import","btn-subscribe-pro","btn-check-purchase","btn-restore","gw-pro-activate","link-pair","link-partner-pair","ch-pair","ch-connect","drive-connect"]),Ce=Object.freeze({"memory-clear":"forget","activity-clear":"clear","obs-clear":"clear","usage-clear":"clear","reset-skills":"reset","drive-disconnect":"disconnect","ch-disconnect":"disconnect","drive-backup-restore":"restore","drive-backup-restore-all":"restore"}),_e=new Set(["local-recheck","bridge-test","priv-ner-check","gw-check","gw-ner-check","gw-logs-refresh","rt-recheck","obs-refresh","check-updates","plugins-refresh","skill-sources-refresh"]),se=new Set(["toggle","select","text","number","textarea","picker"]),Ee=500,Ae=8e3;function Re(e,{bound:t={},actions:s={},choices:n=null}={}){const o=e?.row;return!o||o.composer?"none":o.type==="secret"||xe.has(o.id)||o.consent?"open":e.page?.id==="plan"||e.group?.id==="privacy"&&!(o.stricter&&se.has(o.type))?o.type==="status"?"read":"open":o.type==="status"?"read":o.type==="link"?"open":o.type==="action"?Te.has(o.id)?"open":typeof s[o.id]?.run=="function"?"run":"open":typeof s[o.id]?.run=="function"?"run":se.has(o.type)?o.store==="local"||o.store==="gateway"||!o.key?typeof t[o.id]?.write=="function"?"change":"open":o.type==="picker"&&typeof n!="function"?"open":"change":"open"}const A=e=>String(e??"").trim().toLowerCase(),Je=new Set(["true","on","yes","1","enable","enabled"]),je=new Set(["false","off","no","0","disable","disabled"]);function ae(e,t){return e.type==="secret"?t?"set":"not set":Ne(e,t)||(t==null||t===""?"not set":String(t))}function Ie(e,t,{options:s=e.options}={}){switch(e.type){case"toggle":{if(typeof t=="boolean")return{ok:!0,value:t};const n=A(t);return Je.has(n)?{ok:!0,value:!0}:je.has(n)?{ok:!0,value:!1}:{ok:!1,why:`"${e.label}" is on or off`}}case"select":case"picker":{const n=Array.isArray(s)?s:[];if(!n.length)return{ok:!1,why:`there are no choices for "${e.label}" here`};const o=n.find(l=>String(l[0])===String(t))||n.find(l=>A(l[0])===A(t)||A(l[1])===A(t));return o?{ok:!0,value:o[0]}:{ok:!1,why:`"${t}" is not one of the choices for "${e.label}": ${n.slice(0,12).map(l=>l[1]||l[0]).join(", ")}`}}case"number":{const n=typeof t=="number"?t:Number(String(t??"").trim());return!Number.isFinite(n)||String(t??"").trim()===""?{ok:!1,why:`"${e.label}" takes a number`}:n<0?{ok:!1,why:`"${e.label}" cannot be negative`}:Number.isFinite(e.min)&&n<e.min?{ok:!1,why:`"${e.label}" is at least ${e.min}`}:Number.isFinite(e.max)&&n>e.max?{ok:!1,why:`"${e.label}" is at most ${e.max}`}:{ok:!0,value:n}}case"text":case"textarea":{if(typeof t!="string"&&typeof t!="number")return{ok:!1,why:`"${e.label}" takes text`};const n=String(t),o=e.type==="text"?Ee:Ae;return n.length>o?{ok:!1,why:`"${e.label}" takes at most ${o} characters`}:/[\u0000-\u0008\u000b\u000c\u000e-\u001f]/.test(n)||e.type==="text"&&/[\r\n]/.test(n)?{ok:!1,why:`"${e.label}" takes plain text on one line`}:{ok:!0,value:e.type==="text"?n.trim():n}}default:return{ok:!1,why:`"${e.label}" is not set by value`}}}function Le(e,t,s){const n=e?.stricter;if(!n)return!1;if(n===!0){const b=t==null?e.default===!0:t===!0;return s===!0||s===b}const o=Array.isArray(n.order)?n.order.map(String):[],l=o.indexOf(String(t==null||t===""?n.unset:t)),p=o.indexOf(String(s));return l!==-1&&p!==-1&&p>=l}const f=(e,t=160)=>{const s=String(e??"");return s.length>t?`${s.slice(0,t-1)}…`:s};function ce({title:e,items:t=[],reason:s="",ticket:n="",allowLabel:o="Apply",note:l="",mustType:p=""}){const b=t.map(y=>({l:f(y.label,60),w:f(y.where,80),f:f(y.from,60),t:f(y.to,80)}));return[`$/c = ${S({title:f(e,80),reason:s?`Chap says: ${f(s,200)}`:"",note:f(l,200),warn:p?"This cannot be undone":"",typeLabel:p?`Type “${p}” to confirm`:""})}`,...p?['$/typed = ""']:[],`$/items = ${S(b)}`,'head = Row([Icon("settings"), Text($/c/title, "h3")])','items = List(_template($/items, Column([Text($l), Text($w, "caption"), Row([Badge($f), Text("→"), Badge($t, "info")])])))',...s?['why = Text($/c/reason, "caption")']:[],...l?['note = Text($/c/note, "caption")']:[],...p?['warn = Badge($/c/warn, "bad")',"typed = TextField($/c/typeLabel, $/typed, "+S(p)+', "shortText")']:[],`allow = Button(Text(${S(o)}), "primary", Event(${S(K.allow)}, {ticket: ${S(n)}${p?", typed: $/typed":""}}))`,`deny = Button(Text("Not now"), _, Event(${S(K.deny)}, {ticket: ${S(n)}}))`,`root = Card(Column([head, items, ${s?"why, ":""}${l?"note, ":""}${p?"warn, typed, ":""}Row([allow, deny])]))`].join(`
2
+ `)}function Fe({items:e=[],why:t=""}){const s=e.slice(0,M).map(o=>({l:f(o.label,60),w:f(o.where,80),id:o.id}));return[`$/c = ${S({why:f(t||"You change these in Settings yourself.",200)})}`,`$/items = ${S(s)}`,'head = Row([Icon("settings"), Text("In Settings", "h3")])',`items = List(_template($/items, Row([Column([Text($l), Text($w, "caption")]), Button(Text("Open"), "borderless", Event(${S(K.open)}, {row: $id}))])))`,'root = Card(Column([head, Text($/c/why, "caption"), items]))'].join(`
3
+ `)}const Pe=new Set("the a an and or but to of in on at by for with from into onto my me i you your we our it its this that these those is are was were be been am do does did can could would should will shall may might must please hey chap just also so then than there here what which who whom how why when where all any some each every not no yes ok okay get got make made let use using want need like".split(" ")),qe=e=>e.length>4&&e.endsWith("s")&&!e.endsWith("ss")?e.slice(0,-1):e,L=e=>String(e||"").toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g,"").split(/[^a-z0-9]+/).filter(t=>t.length>=3&&!Pe.has(t)).map(qe);let Q=null;function De(e){const{row:t}=e;return{name:new Set([t.label,...t.synonyms||[]].flatMap(L)),names:[t.label,...t.synonyms||[]].map(L).filter(s=>s.length),opts:new Set((t.options||[]).flatMap(s=>L(s[1]))),place:new Set([e.page.label,e.section.label].flatMap(L))}}function Ge(){return Q||(Q=new Map(be().map(e=>[e.row.id,De(e)]))),Q}function Ue(e,t){let s=e.indexOf(t[0]);for(;s!==-1;){let n=s,o=!0;for(const l of t.slice(1))if(e[n+1]===l)n+=1;else if(e[n+2]===l)n+=2;else{o=!1;break}if(o)return!0;s=e.indexOf(t[0],s+1)}return!1}function le(e,{rows:t=null,min:s=10,limit:n=3}={}){const o=L(e),l=[...new Set(o)];if(!l.length)return[];const p=t?new Set(t):null,b=[];for(const[x,y]of Ge()){if(p&&!p.has(x))continue;let v=0,F=0;for(const k of l){const E=y.name.has(k)?3:y.opts.has(k)?2:y.place.has(k)?1:0;E&&(v+=E,F+=1)}const R=y.names.filter(k=>Ue(o,k));R.length&&(v+=4);const T=R.some(k=>k.length>1);v>=s&&(F>=2||T)&&b.push({id:x,score:v})}return b.sort((x,y)=>y.score-x.score).slice(0,n)}const Me={name:z,description:"Look up Chap's own settings — models and which model does what, voices, search engines, backups, updates, privacy, everything on the Settings pages — and their current values.",parameters:{type:"object",properties:{query:{type:"string",description:'What the setting is about, in a few words ("title model", "dark mode", "backup").'}},required:["query"]},annotations:{readOnlyHint:!0}},Ve={name:H,description:"Propose a change to one or more of Chap's settings. The person sees a card and decides; nothing changes until they apply it.",parameters:{type:"object",properties:{changes:{type:"array",description:`Up to ${M}, applied together on one card.`,items:{type:"object",properties:{id:{type:"string",description:"The setting id from settings_find."},value:{description:"The new value: true/false, a choice's value, a number or text."}},required:["id","value"]}},reason:{type:"string",description:"One short sentence the person reads on the card: why this change."}},required:["changes"]}},Be={name:ie,description:"Run one of Chap's settings actions (back up now, check for updates, download a model…). One that changes something shows the person a card first.",parameters:{type:"object",properties:{id:{type:"string",description:"The action id from settings_find."},args:{type:"object",description:"The action's own arguments, when settings_find lists any."},reason:{type:"string",description:"One short sentence the person reads on the card."}},required:["id"]}},We='Chap\'s own settings: `settings_find` looks them up with their values and what you may do with each (`can`): "change" → propose with `settings_change` (the person decides on a card); "run" → `settings_run`; "open" → the person changes it in Settings — say so, Chap shows them the way. Never claim a setting changed unless the result says it did.';let Xe=0;const he=e=>(typeof e=="string"?e:e?.decision)==="allow"?"allow":"deny";function Ke({client:e="browser",read:t=()=>({}),write:s=null,bound:n={},choices:o=null,actions:l={},runtime:p=()=>({}),confirm:b=null,record:x=null,newTicket:y=()=>`s${Date.now().toString(36)}${Xe+=1}`}={}){const v=new Set(Se(e)),F={bound:n,actions:l,choices:o},R=r=>{const h=X(String(r||""));return h&&v.has(h.row.id)?h:null},T=r=>Re(r,F),k=(r,h)=>n[r.row.id]?.read?n[r.row.id].read():ve(h,r.row),E=(r,h)=>r.row.type==="picker"?typeof o=="function"?o(r.row.id,h):null:r.row.options,V=r=>{try{x?.(r)}catch{}};function ue(r,h){const g=T(r),a=g==="change"?E(r,h):null,d=Y(r.row,p()||{});return{id:r.row.id,label:r.row.label,where:_(r),...r.row.key||n[r.row.id]?.read?{value:ae(r.row,k(r,h))}:{},can:g,type:r.row.type,...a?.length?{choices:a.slice(0,12).map($=>$[0])}:{},...l[r.row.id]?.args?{args:l[r.row.id].args}:{},...d.ok?{}:{blocked:d.reason},...r.row.pro?{pro:!0}:{},...r.row.help?{help:f(r.row.help,140)}:{}}}function de({query:r=""}={}){const h=t()||{},g=le(r,{rows:[...v],min:3,limit:8}).map(a=>a.id);return g.length?JSON.stringify({matches:g.map(a=>ue(X(a),h)).filter(a=>a.can!=="none")}):JSON.stringify({matches:[],hint:"Nothing matched — try other words for the setting (what it does, or where it lives in Settings)."})}const Z=(r,h)=>({text:JSON.stringify({changed:!1,open:r.map(g=>g.id),say:`${h} Chap shows the person a card that opens it in Settings; do not say it changed.`}),card:{lang:"a2ui",source:Fe({items:r,why:h})}});async function pe({changes:r,reason:h="",id:g,value:a}={}){const d=Array.isArray(r)?r:g?[{id:g,value:a}]:[];if(!d.length)return JSON.stringify({error:'No change given. Pass {"changes":[{"id":"<from settings_find>","value":…}]}.'});if(d.length>M)return JSON.stringify({error:`At most ${M} changes on one card.`});const $=t()||{},J=p()||{},w=[],u=[],m=[];for(const c of d){const i=R(c?.id);if(!i){u.push({id:c?.id,why:"no such setting here — look it up with settings_find"});continue}const B=T(i);if(B==="open"){m.push({id:i.row.id,label:i.row.label,where:_(i)});continue}if(B!=="change"){u.push({id:i.row.id,why:B==="run"?"this is an action — use settings_run":"this one is shown, not set"});continue}const D=Y(i.row,J);if(!D.ok){u.push({id:i.row.id,why:`${D.reason}${D.fix?` (${D.fix})`:""}`});continue}const C=Ie(i.row,c.value,{options:E(i,$)});if(!C.ok){u.push({id:i.row.id,why:C.why});continue}const G=k(i,$),W=(G==null||G==="")&&i.row.stricter?.unset!==void 0?i.row.stricter.unset:G;if(JSON.stringify(W)===JSON.stringify(C.value))continue;if(i.group?.id==="privacy"&&!Le(i.row,W,C.value)){m.push({id:i.row.id,label:i.row.label,where:_(i)}),u.push({id:i.row.id,why:"that loosens privacy — the person changes it in Settings"});continue}const te=E(i,$);if(te?.find(U=>String(U[0])===String(C.value))?.[2]?.leaves===!0){m.push({id:i.row.id,label:i.row.label,where:_(i)}),u.push({id:i.row.id,why:"that choice sends your words off this device"});continue}const ne=U=>{const re=te?.find(me=>String(me[0])===String(U));return re?re[1]:ae(i.row,U)};w.push({e:i,value:C.value,item:{id:i.row.id,label:i.row.label,where:_(i),from:ne(W),to:ne(C.value)}})}if(m.length&&!w.length)return Z(m,u.length?`Not changed from the chat: ${u.map(c=>c.why).join("; ")}.`:"These are changed by the person in Settings, not from the chat.");if(!w.length)return u.length?JSON.stringify({changed:!1,refused:u}):JSON.stringify({changed:!1,unchanged:!0,say:"Already set that way — nothing to change."});if(typeof b!="function"||typeof s!="function"&&w.some(c=>!n[c.e.row.id]?.write))return JSON.stringify({changed:!1,error:"Settings cannot be changed from this chat here — the person can change them in Settings."});const j=y(),I=w.map(c=>c.item.id),N=w.length===1?`Change ${w[0].item.label}?`:`Change ${w.length} settings?`,O=w.map(c=>`${c.item.label}: ${c.item.from} → ${c.item.to}`).join(`
4
+ `),P=m.length?`Not on this card — change in Settings: ${m.map(c=>c.label).join(", ")}.`:"";let q="deny";try{q=he(await b({kind:"change",title:N,detail:O,reason:f(h,200),card:ce({title:N,items:w.map(c=>c.item),reason:h,ticket:j,note:P}),ticket:j,ids:I}))}catch{q="deny"}if(V({kind:"change",ids:I,decision:q==="allow"?"allow":"deny"}),q!=="allow")return JSON.stringify({changed:!1,declined:I,say:"The person kept their settings as they were. Do not propose this again unless they ask."});try{const c=w.filter(i=>!n[i.e.row.id]?.write);c.length&&await s(c.map(i=>({id:i.e.row.id,key:i.e.row.key,value:i.value})));for(const i of w)n[i.e.row.id]?.write&&await n[i.e.row.id].write(i.value)}catch(c){return JSON.stringify({changed:!1,error:`Could not save: ${f(c?.message||c,160)}`})}return JSON.stringify({changed:!0,now:w.map(c=>({id:c.item.id,label:c.item.label,value:c.item.to})),...u.length?{refused:u}:{},...m.length?{open:m.map(c=>c.id)}:{}})}async function fe({id:r,args:h={},reason:g=""}={}){const a=R(r);if(!a)return JSON.stringify({error:"No such action here — look it up with settings_find."});const d=T(a);if(d==="open")return Z([{id:a.row.id,label:a.row.label,where:_(a)}],`"${a.row.label}" is done by the person in Settings, not from the chat.`);if(d!=="run")return JSON.stringify({error:d==="change"?"This is a setting — propose it with settings_change.":"This one is shown, not run."});const $=Y(a.row,p()||{});if(!$.ok)return JSON.stringify({ran:!1,why:`${$.reason}${$.fix?` (${$.fix})`:""}`});const J=l[a.row.id],w=h&&typeof h=="object"?h:{};if(_e.has(a.row.id))V({kind:"run",ids:[a.row.id],decision:"look"});else{if(typeof b!="function")return JSON.stringify({ran:!1,error:"Actions cannot be run from this chat here — the person can run it in Settings."});let u="";try{u=J.preview?String(J.preview(w)||""):""}catch{u=""}const m=y(),j=`${a.row.label}?`,I={id:a.row.id,label:a.row.label,where:_(a),from:"now",to:f(u||a.row.help||a.row.label,80)},N=Ce[a.row.id]||"";let O="deny";try{const P=await b({kind:"run",title:j,detail:u||a.row.help||"",reason:f(g,200),card:ce({title:j,items:[I],reason:g,ticket:m,allowLabel:a.row.label,mustType:N}),ticket:m,ids:[a.row.id],...N?{mustType:N}:{}});O=he(P),N&&O==="allow"&&A(P?.typed)!==N&&(O="deny")}catch{O="deny"}if(V({kind:"run",ids:[a.row.id],decision:O==="allow"?"allow":"deny"}),O!=="allow")return JSON.stringify({ran:!1,declined:a.row.id,say:"The person chose not to. Do not ask again unless they do."})}try{const u=await J.run(w);return JSON.stringify({ran:!0,id:a.row.id,result:f(typeof u=="string"?u:JSON.stringify(u??""),1500)})}catch(u){return JSON.stringify({ran:!1,id:a.row.id,error:f(u?.message||u,200)})}}const ee=Object.keys(l).some(r=>typeof l[r]?.run=="function"&&v.has(r)),ge=[Me,Ve,...ee?[Be]:[]],we=Oe({name:oe,description:"Chap's own settings — look up, propose a change (the person approves), run an action.",resident:We,inner:{specs:ge,async execute(r,h={}){return r===z?de(h):r===H?pe(h):r===ie&&ee?fe(h):JSON.stringify({error:`Unknown settings action: ${r}`})}}});function ye(r,{small:h=!1}={}){const g=le(r,{rows:[...v],min:h?12:10,limit:3}).map(d=>X(d.id)).filter(d=>d&&T(d)!=="none");return g.length?`[Chap] This may be about Chap's own settings: ${g.map(d=>`${d.row.label} (\`${d.row.id}\`, ${T(d)})`).join("; ")}. Through \`tools\`: {"action":"${z}","args":{"query":"…"}} for values and choices, then {"action":"${H}","args":{"changes":[{"id":"…","value":…}]}} — the person approves on a card.`:""}return{...we,id:oe,quiet:!0,hint:ye}}const Qe=e=>ke(e);function Ze(e,t=[]){return(t||[]).filter(s=>s?.key).reduce((s,n)=>$e(s,n.key,n.value),e||{})}export{_e as LOOK_ONLY_ACTIONS,M as MAX_CHANGES,H as SETTINGS_CHANGE,K as SETTINGS_EVENTS,z as SETTINGS_FIND,oe as SETTINGS_GROUP,ie as SETTINGS_RUN,Ce as TYPE_TO_RUN,Ze as applyChanges,ce as changeCard,Re as chatReachOf,Ie as coerceValue,Le as isStricter,Fe as openCard,le as rankForMessage,Ke as settingsChatProvider,Qe as settingsLinkFor,ae as shownValue};
@@ -1 +1 @@
1
- import{PREF_SECTIONS as A}from"./client-prefs.js";const S=Object.freeze([{id:"chat",label:"Chat"},{id:"extend",label:"Extend"},{id:"privacy",label:"Privacy"},{id:"workspace",label:"Workspace"},{id:"data",label:"Data"},{id:"account",label:"Account"}]),C=Object.freeze({gateway:{fact:"gateway",reason:"Needs the gateway running on this machine",fix:"Install or start it",page:"gateway"},bridge:{fact:"bridge",reason:"Needs the local runtime (bridge) running",fix:"Install or start it",page:"agent-tools"},pro:{fact:"pro",reason:"A Pro feature",fix:"See plans",page:"plan"},pageActions:{fact:"pageActions",reason:"Only applies once Act on page is on",fix:"Turn on Act on page",page:"chat"},cdp:{fact:"cdp",reason:"Needs High-reliability page control",fix:"Turn it on",page:"chat"},chromium:{fact:"chromium",reason:"Chromium browsers only — elsewhere Chap falls back automatically",fix:"",page:""},drive:{fact:"drive",reason:"Connect Google Drive first",fix:"Connect",page:"backup-sync"},telegram:{fact:"telegram",reason:"Connect a Telegram bot first",fix:"Connect",page:"link"}}),L=Object.freeze(["removedBuiltinAgents"]),m=Object.freeze([{id:"home",group:null,label:"Home",blurb:"What is set up, what needs attention, and how to get more out of Chap",sections:[]},{id:"general",group:"chat",label:"General",blurb:"How Chap looks and answers",sections:[{id:"appearance",label:"Appearance",rows:[{id:"pref-theme",key:"ui.theme",section:"general",type:"select",label:"Theme",help:"Light, dark or follow the system.",synonyms:["dark mode","light mode","appearance","colour","color"],quick:!0,options:[["system","System"],["light","Light"],["dark","Dark"]]},{id:"pref-language",key:"ui.language",section:"general",type:"select",label:"Response language",help:"Enforced for every model — answers come back in this language whatever you type.",synonyms:["locale","translate","reply language"],quick:!0,options:[["","Auto (match me)"],["English","English"],["Spanish","Spanish"],["French","French"],["German","German"],["Portuguese","Portuguese"],["Italian","Italian"],["Hindi","Hindi"],["Chinese (Simplified)","Chinese (Simplified)"],["Japanese","Japanese"],["Korean","Korean"],["Arabic","Arabic"],["Russian","Russian"]]},{id:"settings-open",key:"ui.settingsView",section:"general",type:"select",label:"Open settings",help:"What the gear opens: the full page, or Settings inside the panel. Either can reach the other.",synonyms:["inline","expanded","gear","settings page","full page","in the panel"],options:[["expanded","Expanded — the full page"],["inline","Inline — in the panel"]]},{id:"pref-launcher-mode",key:"launcher.mode",store:"local",type:"select",label:"Floating button",help:"A Chap button on every page: click to chat right there, drag it anywhere, ✕ hides it on a site. From the float, open the side panel or a full tab.",synonyms:["float","floating button","floating icon","launcher","bubble","chat bubble","icon on every page","button on every page","fab","overlay","widget","hide button","show button","distraction","unpinned"],browserOnly:!0,options:[["always","Always"],["unpinned","Only while ChatPanel is not pinned to the toolbar"],["never","Never"]]},{id:"launcher-hidden-sites",store:"local",type:"list",label:"Sites where the floating button is hidden",help:"Closed with ✕ on the page. Bring it back from here.",synonyms:["hidden sites","bring back the button","show again","floating button","float"],browserOnly:!0}]},{id:"you",label:"You",rows:[{id:"self-name",key:"selfName",section:"identity",type:"text",label:"Your name",help:"How briefs and meeting notes refer to you.",synonyms:["identity","my name","who am I"]}]}]},{id:"chat",group:"chat",label:"Chat",blurb:"The composer, acting on a page, and how far one message may go",sections:[{id:"composer",label:"Composer",rows:[{id:"pref-enter",key:"ui.sendOnEnter",section:"general",type:"toggle",label:"Send on Enter",help:"Enter sends, Shift+Enter makes a newline.",synonyms:["keyboard","return key","newline","submit"],quick:!0,default:!0},{id:"pref-stream",key:"ui.streamResponses",section:"general",type:"toggle",label:"Stream responses",help:"Show the answer as it arrives instead of waiting for the whole reply.",synonyms:["streaming","typing","live"],default:!0},{id:"auto-attach-tab",key:"ui.autoAttachActiveTab",section:"general",type:"toggle",label:"Attach the current page by default",help:"New chats start with the page you are viewing as context. Toggle per chat from the composer.",synonyms:["page context","active tab","use page","attach"],browserOnly:!0,composer:!0,default:!0},{id:"pref-suggestions-enabled",key:"ui.suggestions.enabled",section:"suggestions",type:"toggle",label:"Smart suggestions",help:"Prompt ideas tailored to the page on an empty chat — only the URL, title and description are sent, never the page body.",synonyms:["prompt ideas","starters","suggested prompts"]},{id:"pref-suggestions-target",key:"ui.suggestions.targetId",section:"suggestions",type:"picker",label:"Suggestions model",help:"Which model writes the suggestions and autocomplete. Blank: a model on this device when there is one (Apple on-device on a Mac), otherwise the active model.",synonyms:["suggestion model","generate with"]},{id:"pref-autocomplete",key:"ui.autocomplete",section:"general",type:"toggle",label:"Autocomplete my prompts",help:"A small, fast model suggests a continuation as you pause; Tab accepts. Set an endpoint’s autocomplete model to use it.",synonyms:["ghost text","prompt completion","tab to accept"],pro:!0}]},{id:"page-actions",label:"Act on page",rows:[{id:"pref-pageact-mode",key:"ui.pageActions",section:"pageActions",type:"select",label:"Act on page",help:"Where the agent may fill forms, click and draw. Ask offers it per site; Every readable tab arms it everywhere.",synonyms:["page actions","automation","fill forms","click","drive the page","browser agent"],browserOnly:!0,quick:!0,options:[["off","Off — never"],["ask","Ask on known apps"],["allowlist","Only sites I allowed"],["always","Every readable tab"]]},{id:"pref-pageact-confirm",key:"ui.pageActionConfirm",section:"pageActions",type:"toggle",label:"Confirm before page actions",help:"Ask before the agent fills, clicks or types, so a page or tool cannot quietly steer it. On by default.",synonyms:["approve","confirmation","safety"],browserOnly:!0,requires:"pageActions",default:!0},{id:"pref-pageact-cdp",key:"ui.pageActionsCdp",section:"pageActions",type:"toggle",label:"High-reliability page control",help:"Trusted browser events instead of synthetic ones — needed for canvas apps and keyboard-driven controls. Shows a debugging banner while acting.",synonyms:["cdp","debugger","trusted events","canvas"],browserOnly:!0,requires:"chromium",default:!0},{id:"pref-pageact-devjs",key:"ui.pageActionsDevJs",section:"pageActions",type:"toggle",label:"Let the agent run JavaScript on the page",help:"For developers. Every call is shown and approved individually; that prompt cannot be waived.",synonyms:["developer","javascript","eval","script"],browserOnly:!0,requires:"cdp"},{id:"pref-pageact-sites",key:"ui.pageSites",section:"pageActions",type:"list",label:"Sites you answered",help:"Where you allowed or declined Act on page. Forget one to be asked again.",synonyms:["allowed sites","per-site","remembered","forget site"],browserOnly:!0}]},{id:"watch",label:"Watch a page",rows:[{id:"watch-interval",key:"ui.watch.intervalMs",section:"watch",type:"number",label:"Check every",help:"How often a watched page is re-read.",synonyms:["poll","interval","monitor page","page changes"],browserOnly:!0,composer:!0},{id:"watch-only-changed",key:"ui.watch.onlyWhenChanged",section:"watch",type:"toggle",label:"Only when the page changed",help:"Skip the model call when nothing on the page moved.",synonyms:["changes only","diff"],browserOnly:!0,composer:!0,default:!0},{id:"watch-instruction",key:"ui.watch.instruction",section:"watch",type:"textarea",label:"What to do on a change",help:"The instruction each check runs with.",synonyms:["watch prompt"],browserOnly:!0,composer:!0}]},{id:"turn-limits",label:"Turn limits",advanced:!0,rows:[{id:"pref-max-tools",key:"ui.maxToolsPerTurn",section:"tools",type:"number",label:"Max tools per turn",help:"Beyond this many, remote tools are dropped by relevance; local tools are always kept. 0 = no limit.",synonyms:["tool cap","narrow tools","too many tools"]},{id:"pref-max-rounds",key:"ui.maxToolRoundsPerTurn",section:"tools",type:"number",label:"Max model requests per turn",help:"How many times one message may go back to the model while it uses tools. Up to 60; an endpoint’s own limit wins.",synonyms:["rounds","tool loop","iterations","requests per turn"]},{id:"mcp-tools-mode",key:"ui.mcpToolsMode",section:"tools",type:"select",label:"MCP tools per turn",help:"Auto offers the servers whose tools match the message; Always offers every enabled server; Off never does.",synonyms:["tools mode","auto tools","mcp policy"],quick:!0,composer:!0,options:[["auto","Auto"],["on","Always"],["off","Off"]]},{id:"history-context-mode",key:"ui.historyContextMode",section:"tools",type:"select",label:"History context",help:"Whether past chats, notes and meetings are pulled into a turn automatically.",synonyms:["rag","history rag","context from history","past chats"],quick:!0,composer:!0,options:[["off","Off"],["chats","Past chats"],["meetings","Meetings"],["all","Chats, meetings & notes"]]},{id:"history-tools",key:"ui.historyTools",section:"tools",type:"toggle",label:"History tools",help:"Let the model search your past chats, notes and meetings when a question depends on them.",synonyms:["history search","find tool"],default:!0},{id:"data-dispatch",key:"ui.dataDispatch",section:"tools",type:"toggle",label:"Group data tools behind one find",help:"One registered tool instead of six schemas on every turn. Turn off only for a model that handles a flat toolset better.",synonyms:["find dispatcher","flat tools"],default:!0},{id:"turn-cards",key:"ui.turn.cards",section:"tools",type:"toggle",label:"Answer with cards",help:"Replies can include a card, table, chart or choice that the panel draws itself (A2UI), and look-ups such as the weather show their result as a card the model does not repeat. Nothing runs — a card is data from Chap’s own list of widgets. Costs about 370 tokens a turn; off, replies are plain text as before.",synonyms:["a2ui","cards","rich replies","widgets","generative ui","tables","charts","weather card"],browserOnly:!0,default:!0},{id:"turn-pipeline",key:"ui.turn.pipeline",section:"tools",type:"toggle",label:"Look up each part of a question",help:"An experiment, for a small on-device model asked several things at once: each part is searched, its answer read from the source and checked, and the reply is the sourced facts themselves — with what was not found said plainly — instead of the model’s own summary of everything. Slower, and it needs the gateway’s reranker. Off: each part is searched and the model answers from the results.",synonyms:["turn pipeline","research lane","multi-part question","facts","checked answer","small model","on-device"],default:!1,requires:"gateway"},{id:"tool-result-max",key:"ui.toolResultMaxChars",section:"tools",type:"number",label:"Largest tool result",help:"A result over this many characters is stored and previewed; the model pages it. Lower for small local models.",synonyms:["result size","truncate","shield","max chars"]}]}]},{id:"models",group:"chat",label:"Models",blurb:"Your endpoints, the models on this machine, and every model Chap uses by type",sections:[{id:"endpoints",label:"Endpoints",rows:[{id:"endpoints",key:"endpoints",section:"endpoints",type:"list",label:"Endpoints",help:"Any OpenAI- or Anthropic-compatible API, local or hosted, with its model, key and system prompt.",synonyms:["api","api key","openai","anthropic","ollama","lm studio","openrouter","base url","model","provider","system prompt"]},{id:"add-endpoint",type:"action",label:"Add endpoint",help:"Connect a new API or local server.",synonyms:["new model","connect api"]},{id:"free-endpoint",key:"freeEndpointId",section:"freeSlots",type:"picker",label:"Free plan endpoint",help:"The one endpoint Free unlocks — your pick.",synonyms:["free slot","free pick"]},{id:"webllm-background",key:"ui.webllmBackground",section:"webllm",type:"toggle",label:"Keep the in-browser model loaded",help:"Stays warm across panel open/close so there is no reload wait; uses memory while idle.",synonyms:["webllm","stay warm","background model","webgpu"],browserOnly:!0},{id:"webllm-custom-models",key:"webllmCustomModels",section:"webllm",type:"list",label:"Custom in-browser models",help:"Extra WebLLM models added by id.",synonyms:["webllm","custom model","mlc"],browserOnly:!0}]},{id:"this-machine",label:"On this machine",rows:[{id:"runtime-models",type:"status",label:"Models on this machine",help:"Download, set up and use a model on this computer, in one place: each one the Runtime runs by name with its engine and what it is doing, Use in chat, and Run a model — the engine (llama.cpp, MLX, vLLM, Apple on-device), a model from Hugging Face sized to this machine with its download progress, the context profile, thinking and sampling, extra flags.",synonyms:["local model","llama.cpp","mlx","vllm","gguf","download a model","run a model","hugging face","downloading","context","profile","thinking","reasoning","temperature","sampling","runtime models","on device","use in chat"],requires:"gateway"}]},{id:"model-types",label:"Every model, by type",rows:[{id:"model-catalog",type:"status",label:"Models by type",help:"Every kind of model Chap uses — chat, embeddings, rerank, decide, speech to text, text to speech, entities, web search — each with its providers in order, where each runs (in the gateway, this machine, a container, or a remote service by name) and what it is doing, with the page that sets it up.",synonyms:["model types","reranker","decision model","embedding model","speech model","voice model","entity model","ner","stt","tts","elevenlabs","providers","catalog"],requires:"gateway"},{id:"rt-services",type:"status",label:"Services and switches, by type",help:"Under each type on Models › Every model, by type: its built-in model’s on/off switch and the containers that can do the job — SearXNG for web search, the reranker, vLLM for embeddings or speech — each loopback-only. The first start pulls the image; stop keeps the container. They were a second list on the Runtime page; the Runtime keeps where things run, the container engine and what is running now.",synonyms:["searxng","metasearch","self-hosted search","search service","start searxng","stop searxng","reranker","rerank","decision model","opendecision","decisions","container services","services","turn off reranking","in-process"],requires:"gateway"}]},{id:"what-to-look-up",label:"Deciding what to look up",rows:[{id:"lookup-decider",type:"status",label:"What to look up — decided by",help:"Before a model with a small window answers, one model decides whether the message needs the web, the weather, your own notes and chats, or nothing — and what to search. Pick any model: a chat model (it also writes the search) or a decision model on the Decide job (it only picks the source; the message is searched as written). Blank: this device’s own model (Apple on-device), else the chat’s own. Test runs sixteen messages through it and shows each answer and the score. Every reply says who decided and what.",synonyms:["decider","decision model","decide","turn intent","what to look up","lookups","classifier","modernbert","zero-shot","test decider","decided by"]}]}]},{id:"routing",group:"chat",label:"Routing",blurb:"Every model in use, every model you can add, and which one Auto would pick",sections:[{id:"model-roles",label:"What runs where",rows:[{id:"model-roles",type:"status",label:"Every model in use, by job",help:"Chat, coding agents, entity detection, transcription, voice, speaker identification, ranking, embeddings, decisions — what is in use, where it runs (this device, your server, cloud), and where to change it.",synonyms:["model roles","what runs where","which model","swap model","cloud model","local model","in use","overview"]},{id:"capability-uses",key:"ui.capabilityUses",section:"capabilityUses",type:"list",label:"Where each model may be used",help:"Per job a model serves — dictation, meetings, redaction, routing, search — a switch; off keeps that job from calling it.",synonyms:["use for","model uses","which jobs","do not use for","capability uses"]}]},{id:"model-place",label:"All models",rows:[{id:"model-place",type:"status",label:"Every model, by type",help:"Chat, vision, embeddings, speech to text, text to speech, entity recognition, decisions, ranking — each model with where it runs (a server, in-process, a container, an agent), whether its data leaves the machine, and a way to change or remove it.",synonyms:["all models","model list","by type","vision model","embedding model","speech to text model","whisper","text to speech model","entity model","model registry","discover models"]},{id:"add-model",type:"action",label:"Add a model",help:"Pick what the model does, then where it runs — a server (local or hosted), weights in-process, a container the Runtime starts, or a coding agent — and the one form that follows.",synonyms:["add model","new model","connect model","hosted stt","remote transcription","elevenlabs","add embedding","run vllm"]}]},{id:"routing",label:"Routing",advanced:!0,rows:[{id:"routing-mode",key:"ui.routing.mode",section:"routing",type:"select",label:"Observation",help:"Whether the router records what it would have chosen when it is not the one answering. Visible in Activity.",synonyms:["auto route","model routing","observe","router"],options:[["observe","Record what it would choose"],["off","Off"]]},{id:"routing-decider",key:"ui.routing.decider",section:"routing",type:"toggle",label:"Decision model routes Auto",help:"An experiment: the local decision model picks among the eligible candidates from their cards, the reranker orders the shortlist it reads; the rules answer whenever it cannot. Needs the gateway with a decide provider ready.",synonyms:["decider","class M routing","model picks the model","judge"],default:!1},{id:"routing-models",key:"ui.routing.models",section:"routing",type:"list",label:"What each model is",help:"Cost, speed, reach and abilities per model — detected from name and URL, corrected here. Reset puts a row back.",synonyms:["model facts","reach","cost tier","latency","capabilities"]},{id:"routing-latency",type:"select",label:"Try: max wait",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route","what would auto choose"]},{id:"routing-cost",type:"select",label:"Try: max cost",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route"]},{id:"routing-reach",type:"select",label:"Try: request may reach",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route","device only","cloud"]},{id:"routing-tools",type:"toggle",label:"Try: needs tools",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route"]},{id:"routing-prefer",type:"select",label:"Try: prefer",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route","cheapest","fastest"]}]}]},{id:"agent-tools",group:"chat",label:"Coding Agents",blurb:"Claude Code, Codex, Antigravity and the other coding agents installed on this machine",sections:[{id:"runtime",label:"On this machine",rows:[{id:"local-runtime",type:"status",label:"Local runtime",help:"Whether the gateway and the bridge are installed and running, and which version.",synonyms:["bridge status","gateway status","install","running","version","update"]},{id:"local-recheck",type:"action",label:"Recheck the local runtime",help:"Ask the gateway and bridge again.",synonyms:["refresh status","reconnect"]}]},{id:"agents",label:"Installed agents",rows:[{id:"bridge-agents",key:"agents",section:"agentTools",type:"list",label:"Installed agents",help:"Each CLI the bridge found, with its enabled switch, permission mode, working directory and system prompt.",synonyms:["claude code","codex","antigravity","gemini cli","opencode","pi","aider","harness","agent tools","cli agent","permission mode","working directory"],requires:"bridge"},{id:"add-agent",type:"action",label:"Add agent",help:"Describe a CLI the bridge did not detect.",synonyms:["custom agent","new harness"]},{id:"free-agent",key:"freeAgentId",section:"freeSlots",type:"picker",label:"Free plan agent",help:"The one coding agent Free unlocks — your pick.",synonyms:["free slot","free pick"]}]},{id:"remote-bridge",label:"Remote bridge",advanced:!0,rows:[{id:"bridge-url",key:"bridgeUrl",store:"local",type:"text",label:"Bridge URL",help:"Where this client reaches the bridge. Leave the default for the bridge on this machine.",synonyms:["bridge address","localhost 4319","port"]},{id:"bridge-token",key:"bridgeToken",store:"local",type:"secret",label:"Bridge token",help:"Only for a bridge on another machine — the local one recognises the extension on sight.",synonyms:["remote bridge","auth token","bridge-token file"]},{id:"bridge-test",type:"action",label:"Test the bridge",help:"Reach the bridge at the URL above and list its agents.",synonyms:["check bridge","connect"]}]}]},{id:"tools-mcp",group:"extend",label:"Tools & MCP",blurb:"External tools your agents can call",sections:[{id:"servers",label:"MCP servers",rows:[{id:"mcp-list",key:"mcpServers",section:"mcpServers",type:"list",label:"MCP servers",help:"Streamable HTTP servers, or stdio servers run on your machine through the bridge, with their auth and env.",synonyms:["mcp","model context protocol","tool server","stdio","auth header","env vars"]},{id:"mcp-signins",key:"mcpAuth",section:"mcpAuth",type:"status",label:"Server sign-ins",help:"The remote servers you signed in to, on each server's card. One sign-in serves the extension and the desktop on this computer.",synonyms:["mcp sign in","oauth","mcp login","signed in","sign out","token"]},{id:"add-mcp",type:"action",label:"Add server",help:"Add an MCP server by URL or command.",synonyms:["new mcp"]},{id:"import-mcp",type:"action",label:"Import an MCP config",help:"Paste a Claude Desktop / Cursor / Codex mcpServers JSON block.",synonyms:["import json","claude_desktop_config","mcp.json","paste config"]}]},{id:"discover",label:"Discover",rows:[{id:"mcp-registry-search",type:"text",label:"Search the MCP registry",help:"The official registry and curated public servers, one click to add.",synonyms:["registry","catalog","public servers","find mcp"]}]}]},{id:"web-search",group:"extend",label:"Web search",blurb:"Live results as context for any model",sections:[{id:"search",label:"Search",rows:[{id:"pref-websearch-enabled",key:"ui.webSearch.enabled",section:"webSearch",type:"toggle",label:"Web search",help:"Type /search anywhere in a message, or let the model call it when a question needs the web.",synonyms:["internet","google","live results","/search","browse"],default:!0},{id:"websearch-engines",key:"ui.webSearch.engines",section:"webSearch",type:"list",label:"Search engines",help:"Engines use a %s or {q} placeholder and must return server-rendered HTML.",synonyms:["engine","duckduckgo","startpage","brave","bing","searx"]},{id:"add-websearch",type:"action",label:"Add engine",help:"Add a search engine by URL template.",synonyms:["new engine","custom search"]},{id:"websearch-apis",key:"ui.webSearch.apis",section:"webSearch",type:"list",label:"Search APIs",help:"Exa, Brave, Tavily, Serper, SerpApi, Google or Jina with your key, or any search API you describe. One you added a key for is asked first; Mwmbl needs no key and takes turns with the engines.",synonyms:["exa","tavily","serper","serpapi","brave api","google programmable search","jina search","mwmbl","search api","search key","api key"]},{id:"add-websearch-api",type:"action",label:"Add search API",help:"Pick a provider and paste its key, or describe your own: the URL, headers, body and where the results are in the answer.",synonyms:["new search api","custom search api","any search api"]},{id:"pref-websearch-per",key:"ui.webSearch.perEngine",section:"webSearch",type:"number",label:"Results per engine",help:"How many hits each engine contributes.",synonyms:["result count"]},{id:"pref-websearch-pages",key:"ui.webSearch.maxPages",section:"webSearch",type:"number",label:"Pages to read & rank",help:"How many result pages are fetched and ranked before the best are attached.",synonyms:["page count","fetch pages"]}]},{id:"reader",label:"Reader & fallback",advanced:!0,rows:[{id:"pref-websearch-reader",key:"ui.webSearch.reader.enabled",section:"webSearch",type:"toggle",label:"Use a reader service",help:"Fetch each result as LLM-ready Markdown instead of parsing site HTML. Anonymous Jina is blocked, so bring a key.",synonyms:["jina","markdown reader","r.jina.ai"]},{id:"pref-websearch-reader-url",key:"ui.webSearch.reader.url",section:"webSearch",type:"text",label:"Reader URL",help:"The reader service endpoint.",synonyms:["reader endpoint"]},{id:"pref-websearch-reader-key",key:"ui.webSearch.reader.key",section:"webSearch",type:"secret",label:"Reader API key",help:"Sent as a Bearer token; optional.",synonyms:["reader token","jina key"]},{id:"pref-websearch-tabfallback",key:"ui.webSearch.tabFallback",section:"webSearch",type:"toggle",label:"Background-tab render as a last resort",help:"A page that cannot be fetched is opened in a background tab so its JavaScript runs. Off by default.",synonyms:["render tab","javascript pages","serp fallback"],browserOnly:!0}]}]},{id:"skills",group:"extend",label:"Skills",blurb:"Reusable prompts, slash-commands and recipes",sections:[{id:"skills",label:"Skills",rows:[{id:"skills",key:"skills",section:"skills",type:"list",label:"Skills",help:"Prompts you drop into any chat with the button, by /command, or with #Skill in Notes. Editing the built-ins is free; your own are Pro.",synonyms:["slash command","prompt template","custom prompt","skill"]},{id:"skill-filter",type:"text",label:"Filter skills",help:"Narrow the list by name or command.",synonyms:["search skills","find skill"]},{id:"add-skill",type:"action",label:"Add skill",help:"Write a new skill.",synonyms:["new skill","create prompt"],pro:!0},{id:"reset-skills",type:"action",label:"Reset built-in skills",help:"Put every built-in back to its shipped prompt; yours are untouched.",synonyms:["restore defaults","reset prompts"]}]},{id:"recipes",label:"Recipes",rows:[{id:"recipes",key:"recipes",section:"recipes",type:"list",label:"Recipes",help:"Workflows written down once — proposed in chat, approved, run by /name.",synonyms:["workflow","macro","saved steps","recipe"]}]},{id:"machine",label:"On this machine",rows:[{id:"skill-source-search",type:"text",label:"Search skills on this machine",help:"Every skill installed for Claude Code, Codex, Copilot, Antigravity, Hermes and ~/.agents/skills, found by the bridge.",synonyms:["installed skills","local skills","agents skills","found by the bridge"],requires:"bridge"},{id:"skill-dirs-input",key:"ui.skillDirs",section:"skillDirs",type:"textarea",label:"Custom skill folders",help:"Folders the bridge serves alongside the built-in agent locations. Applied on the next rescan.",synonyms:["skill folder","skill directory","skill path"],requires:"bridge"},{id:"skill-sources-refresh",type:"action",label:"Rescan skill folders",help:"Ask the bridge to look again.",synonyms:["rescan","refresh skills"],requires:"bridge"}]}]},{id:"agent-teams",group:"extend",label:"Agent Teams",blurb:"The agents you define and the teams they work in",sections:[{id:"agents",label:"Agents",rows:[{id:"directory",key:"agentPool",section:"agents",type:"list",label:"Agents",help:"Cards with a name, a specialty, an engine and grants — the roster a team is staffed from.",synonyms:["agent pool","roster","directory","specialist","engine","grants"]}]},{id:"teams",label:"Teams",rows:[{id:"teams",key:"teams",section:"teams",type:"list",label:"Teams",help:"A named set of roles with prompts, tiers and grants, run by /team or from a note.",synonyms:["team","swarm","roles","multi-agent"]}]},{id:"dashboard",label:"Live",rows:[{id:"open-teams-dashboard",key:"projects",section:"projects",type:"link",label:"Agent Teams dashboard",help:"Projects, the board and Observe — where each run is, what it asked you, and what it did.",synonyms:["board","projects","observe","kanban","runs","in flight","inbox","trail","approvals","dashboard"]}]}]},{id:"link",group:"extend",label:"Link",blurb:"Reach this computer from your phone, a server you trust or a chat app",sections:[{id:"phones",label:"Phones",rows:[{id:"link-pair",type:"action",label:"Link a phone",help:"Shows a code to scan with Chap on your phone. The phone then reaches this computer’s models and agents from anywhere, end-to-end encrypted — no port is opened here.",synonyms:["pair phone","phone companion","qr code","connect phone","link","mobile","your phone"],requires:"gateway"},{id:"link-devices",type:"list",label:"Linked phones",help:"Each phone linked to this computer, whether it is connected now, and Remove to unlink it — the relay forgets it at once.",synonyms:["paired phones","unlink phone","remove phone"],requires:"gateway"},{id:"link-agent-sessions",store:"gateway",type:"toggle",label:"Agent sessions on your phone",help:"Let a linked phone list and continue this computer’s Claude Code and Codex sessions.",synonyms:["resume","claude code sessions","codex sessions","phone agents"],requires:"gateway"}]},{id:"servers",label:"Servers",rows:[{id:"link-partner-pair",type:"action",label:"Connect a server",help:"Let a service you use reach this computer’s models: name it, choose what it may reach, read exactly what it gets, then confirm for a one-use code to paste into it. Coding agents stay off unless you tick them.",synonyms:["partner","server","connect server","api access","remote access","server-side","pairing code","cplink"],requires:"gateway"},{id:"link-partners",type:"list",label:"Servers you let in",help:"Each server you let in, what it may reach, its route and when it was last seen. Revoke cuts it off at once: its key is forgotten and its connection closed.",synonyms:["partner servers","revoke server","remove server","who can reach this computer"],requires:"gateway"}]},{id:"route",label:"Route",rows:[{id:"link-route",store:"gateway",type:"select",label:"How devices reach this computer",help:"ChatPanel Link (the hosted relay), your Tailscale or Cloudflare Tunnel, or a relay you run — who can reach it, and who pays. Applies to phones and to servers connected from now on; a connected server keeps the route it was paired on.",synonyms:["tunnel","tailscale","cloudflare","relay","self-hosted","route"],requires:"gateway"}]},{id:"telegram",label:"Telegram",rows:[{id:"ch-token",store:"local",type:"secret",label:"Bot token",help:"From @BotFather. Checked with Telegram before it is stored — on this machine, in a file only you can read.",synonyms:["telegram","botfather","bot","phone","whatsapp","channels","chat app"],requires:"bridge"},{id:"ch-connect",type:"action",label:"Connect Telegram",help:"Start polling with the token above. Becomes Connected · Disconnect once it is.",synonyms:["start bot","link telegram"],requires:"bridge"},{id:"ch-agent",store:"gateway",type:"picker",label:"Agent that answers",help:"Which of your agents replies to paired phones.",synonyms:["telegram agent","answering agent"],requires:"telegram"},{id:"ch-privacy",store:"gateway",type:"select",label:"What comes back to Telegram",help:"Telegram is a third party: redact personal details on the way out, and mask credentials on the way back.",synonyms:["telegram redaction","channel privacy","mask secrets"],requires:"telegram"},{id:"ch-disconnect",type:"action",label:"Disconnect Telegram",help:"Stops polling, deletes the stored token and unpairs every phone.",synonyms:["stop bot","remove telegram"],requires:"telegram"},{id:"ch-pair",type:"action",label:"Pair a phone with the bot",help:"A single-use code, scanned once in Telegram; the phone can read your files and cannot write, run commands or reach the web.",synonyms:["pair","qr code","enroll phone","add phone"],requires:"telegram"}]}]},{id:"connections",group:"extend",label:"Connections",blurb:"The code hosts the bridge holds tokens for",sections:[{id:"hosts",label:"Code hosts",rows:[{id:"connections",key:"connections",section:"connections",type:"list",label:"Connections",help:"GitHub, GitLab and the other SCM hubs — kind and host travel, the token stays in this machine’s keychain.",synonyms:["github","gitlab","bitbucket","scm","source control","personal access token","repo access"],requires:"bridge"}]}]},{id:"redaction",group:"privacy",label:"Redaction",blurb:"PII replaced before it reaches a model, restored in the reply",sections:[{id:"mode",label:"Mode",rows:[{id:"priv-mode",key:"ui.piiRedaction.mode",section:"redaction",type:"select",label:"Redaction",help:"Off, patterns only (emails, phones, cards, keys, IPs + your dictionary), or patterns plus AI detection of names, orgs and locations.",synonyms:["pii","privacy","anonymize","mask","redact","sensitive","placeholder"],quick:!0,options:[["off","Off"],["deterministic","On — patterns + dictionary"],["model","On — + AI detection"]]},{id:"priv-applyto",key:"ui.piiRedaction.applyTo",section:"redaction",type:"select",label:"Redact for",help:"Every model, or remote only — a localhost model keeps data on-device already.",synonyms:["local models","remote only","cloud only","skip local"],options:[["all","All chat models"],["remote","Remote models only"]]}]},{id:"detection",label:"Detection",rows:[{id:"priv-det-backend",key:"ui.piiRedaction.detection.backend",section:"redaction",type:"select",label:"Detector",help:"What finds names, orgs and locations: the gateway’s bundled NER, a NER service by URL, or one of your models. Your text reaches the detector, so keep it local.",synonyms:["ner","entity detection","name detection","detector backend"],pro:!0,options:[["off","Off"],["bundled","Bundled NER (gateway)"],["endpoint","Custom PII service (URL)"],["agent","A configured API / agent"]]},{id:"priv-det-target",key:"ui.piiRedaction.detection.targetId",section:"redaction",type:"picker",label:"Detection model",help:"Which of your APIs or agents runs detection, when the detector is a model.",synonyms:["detector model","api / agent"],pro:!0},{id:"priv-det-tmodel",key:"ui.piiRedaction.detection.model",section:"redaction",type:"text",label:"Detection model name",help:"The model id an agent should use for detection.",synonyms:["detector model id"],pro:!0},{id:"priv-det-url",key:"ui.piiRedaction.detection.url",section:"redaction",type:"text",label:"Detector URL",help:'A NER service: POST {"text"} → {"entities":[{value,type}]}.',synonyms:["ner url","ner endpoint","ner service"],pro:!0},{id:"priv-det-timeout",key:"ui.piiRedaction.detection.timeoutMs",section:"redaction",type:"number",label:"Detector timeout",help:"Milliseconds before a slow detector is skipped for the turn.",synonyms:["ner timeout","detection timeout"],pro:!0},{id:"priv-ner-check",type:"action",label:"Check NER health",help:"Send a test sentence to the detector.",synonyms:["test detector","ner status"]},{id:"priv-strictness",key:"ui.piiRedaction.strictness",section:"redaction",type:"select",label:"Strictness",help:"Balanced checks the detections known to be wrong — a lowercase question read as a company name, an amount read as an address — and leaves them in. Strict redacts everything a detector finds, even when that hides part of your question.",synonyms:["strict","strict redaction","aggressive","paranoid","false positives","over-redaction","redaction level","sensitivity"],pro:!0,options:[["balanced","Balanced"],["strict","Strict"]]},{id:"priv-det-person",key:"ui.piiRedaction.detection.types.person",section:"redaction",type:"toggle",label:"Redact people (names)",help:"Person names become [[PERSON_n]].",synonyms:["names","person"],pro:!0,default:!0},{id:"priv-det-org",key:"ui.piiRedaction.detection.types.org",section:"redaction",type:"toggle",label:"Redact organizations",help:"Company and org names become [[ORG_n]].",synonyms:["companies","organisations","org"],pro:!0,default:!0},{id:"priv-det-location",key:"ui.piiRedaction.detection.types.location",section:"redaction",type:"toggle",label:"Redact locations",help:"Cities and places become [[LOCATION_n]].",synonyms:["places","cities","addresses","location"],pro:!0,default:!0},{id:"priv-det-number",key:"ui.piiRedaction.detection.types.number",section:"redaction",type:"toggle",label:"Redact numbers & IDs",help:"Account numbers, IDs and other numeric identifiers.",synonyms:["ids","account numbers","numeric"],pro:!0,default:!0}]},{id:"dictionary",label:"Dictionary",rows:[{id:"priv-dictionary",key:"ui.piiRedaction.dictionary",section:"redaction",type:"textarea",label:"Dictionary",help:"One entry per line: term => LABEL redacts reversibly, term -> alias pseudonymizes permanently, /regex/flags also works. Free applies the first 5.",synonyms:["custom terms","pseudonym","alias","regex","always redact","word list"]}]},{id:"scope",label:"Scope",rows:[{id:"priv-scope-chat",key:"ui.piiRedaction.scope.chat",section:"redaction",type:"toggle",label:"Redact chat messages",help:"What you type.",synonyms:["scope chat","messages"],default:!0},{id:"priv-scope-context",key:"ui.piiRedaction.scope.context",section:"redaction",type:"toggle",label:"Redact page & meeting context",help:"Attached pages and live captions.",synonyms:["scope page","scope meeting","context"],pro:!0,default:!0},{id:"priv-scope-history",key:"ui.piiRedaction.scope.history",section:"redaction",type:"toggle",label:"Redact history search results",help:"Past chats, notes and meetings pulled into a turn.",synonyms:["scope history"],pro:!0,default:!0},{id:"priv-scope-tools",key:"ui.piiRedaction.scope.toolResults",section:"redaction",type:"toggle",label:"Redact tool results",help:"What tools return before the model reads it.",synonyms:["scope tools","tool output"],pro:!0,default:!0},{id:"priv-tooldata",key:"ui.piiRedaction.toolData",section:"redaction",type:"select",label:"Tools receive",help:"Real values so lookups work, or the redacted token so PII never reaches a remote MCP server. Local tools always get real values.",synonyms:["tool arguments","mcp sees","real values","redact remote"],options:[["real","Real values"],["redactRemote","Redact for remote (MCP) tools"]]}]},{id:"ner-model",label:"NER model",rows:[{id:"gw-ner-search",store:"gateway",type:"picker",label:"NER model",help:"The on-device model behind Bundled NER — used by the panel’s redaction and the gateway’s. A bigger model is more accurate but a larger download.",synonyms:["ner model","download ner","multilingual ner","deid","hugging face"],requires:"gateway"}]},{id:"try",label:"Try it",advanced:!0,rows:[{id:"priv-flow-input",type:"textarea",label:"Test a prompt end-to-end",help:"See what is detected, what the model sees, what tools receive, and what you get back.",synonyms:["preview redaction","test redaction","what does the model see","pipeline"]},{id:"priv-flow-model",type:"picker",label:"Test with model",help:"Which model answers the test prompt.",synonyms:["test model"]},{id:"priv-flow-run",type:"action",label:"Run the redaction test",help:"Send the test prompt through the whole pipeline.",synonyms:["run test"]},{id:"priv-flow-preview",type:"action",label:"Preview redaction only",help:"Show what would be redacted without calling a model.",synonyms:["dry run","preview"]}]}]},{id:"internal-sites",group:"privacy",label:"Internal sites",blurb:"Content from these never leaves your machine",sections:[{id:"boundary",label:"Data boundary",rows:[{id:"internal-guard",key:"privacy.internalGuard",section:"internalSites",type:"toggle",label:"Keep content from internal sites on this device",help:"When a turn draws on an internal source, only a local model may answer it — whichever model is selected.",synonyms:["intranet","internal","private network","data boundary","on-device only","source gate"],default:!0},{id:"internal-ceiling",key:"privacy.internalCeiling",section:"internalSites",type:"select",label:"Where these may be answered",help:"On this device only, or also by an endpoint you marked trusted.",synonyms:["ceiling","trusted endpoint","allowed models"],options:[["device","This device only"],["trusted","My workspace (gateway or trusted endpoint)"]]}]},{id:"domains",label:"Domains",rows:[{id:"internal-catalog",key:"privacy.internalPatterns",section:"internalSites",type:"list",label:"Addresses treated as internal",help:"Private ranges, .local, .internal and the rest — on by default; untick any that are not internal for you.",synonyms:["localhost",".local",".internal","private ip","defaults"]},{id:"internal-patterns",key:"privacy.internalPatterns",section:"internalSites",type:"textarea",label:"My own internal domains",help:"One per line; a domain covers its subdomains.",synonyms:["custom domain","company domain","add domain"]},{id:"internal-restore",type:"action",label:"Restore all default internal addresses",help:"Tick every built-in pattern again.",synonyms:["reset internal","restore defaults"]}]}]},{id:"gateway",group:"privacy",label:"Gateway",blurb:"An optional local process: on-device models, routing, and redaction for tools outside the panel",sections:[{id:"install",label:"Install",rows:[{id:"gw-install",type:"status",label:"Install the gateway",help:"Whether the gateway is installed and running on this machine, which version, and the one command that installs or updates it. It brings the bridge (your local coding agents) with it.",synonyms:["install gateway","download gateway","update gateway","gateway version","setup","get started"]}]},{id:"connection",label:"Connection",rows:[{id:"gw-url",key:"gatewayUrl",store:"local",type:"text",label:"Gateway URL",help:"Where this client reaches the gateway. Leave the default for the gateway on this machine.",synonyms:["gateway address","localhost 4320","port","connect gateway"]},{id:"gw-check",type:"action",label:"Check the gateway",help:"Reach the gateway and read its version. Install → Running · Update once it is.",synonyms:["gateway status","install gateway","is the gateway running","install.sh"]}]},{id:"redaction",label:"Redaction for other clients",rows:[{id:"gw-tier",store:"gateway",type:"select",label:"Gateway redaction tier",help:"What the gateway redacts for traffic that does not go through the panel — OpenCode, Pi, aider.",synonyms:["gateway redaction","proxy redaction","opencode","aider"],requires:"gateway"},{id:"gw-redact-system",store:"gateway",type:"toggle",label:"Redact the system prompt too",help:"Apply redaction to the system message as well as user turns.",synonyms:["system prompt redaction"],requires:"gateway"},{id:"gw-det-backend",store:"gateway",type:"select",label:"Gateway detector",help:"The gateway’s own NER choice. Local options keep the raw text on your machine; a cloud one sends it there.",synonyms:["gateway ner","gateway detector"],requires:"gateway"},{id:"gw-det-url",store:"gateway",type:"text",label:"Gateway detector URL",help:"A NER service or model endpoint the gateway calls.",synonyms:["gateway ner url"],requires:"gateway"},{id:"gw-det-model",store:"gateway",type:"text",label:"Gateway detector model",help:"The model id, when the detector is an LLM.",synonyms:["gateway ner model"],requires:"gateway"},{id:"gw-det-key",store:"gateway",type:"secret",label:"Gateway detector API key",help:"Only for a hosted detector.",synonyms:["gateway ner key"],requires:"gateway"},{id:"gw-det-timeout",store:"gateway",type:"number",label:"Gateway detector timeout",help:"Milliseconds before a slow detector is skipped.",synonyms:["gateway ner timeout"],requires:"gateway"},{id:"gw-ner-check",type:"action",label:"Check the gateway’s NER health",help:"Send a test sentence through the gateway’s detector.",synonyms:["gateway ner test"],requires:"gateway"},{id:"gw-dictionary",store:"gateway",type:"textarea",label:"Gateway dictionary",help:"Separate from the panel’s — applies to traffic the gateway sees. Same grammar.",synonyms:["gateway terms","gateway alias"],requires:"gateway"},{id:"gw-dict-copy",type:"action",label:"Copy the panel’s dictionary to the gateway",help:"One click to keep both the same.",synonyms:["sync dictionary"],requires:"gateway"}]},{id:"routing",label:"Routing",rows:[{id:"gw-dest-trigger",store:"gateway",type:"picker",label:"Destinations",help:"Which of your APIs and agents the gateway routes to; clients pick one by model name via /v1/models.",synonyms:["gateway models","v1/models","route to","destinations"],requires:"gateway"},{id:"gw-tools-data",store:"gateway",type:"select",label:"Gateway tools receive",help:"Real values so a client’s tool works, or the redacted token for remote MCP tools.",synonyms:["gateway tool data","gateway mcp sees"],requires:"gateway"},{id:"gw-tools-narrow",store:"gateway",type:"toggle",label:"Auto-narrow to the most relevant tools",help:"When a client sends many MCP tools, forward only the top-K for this message. Core tools are always kept.",synonyms:["narrow tools","top-k tools"],requires:"gateway"},{id:"gw-tools-cap",store:"gateway",type:"number",label:"Max MCP tools per turn (gateway)",help:"The K in top-K.",synonyms:["gateway tool cap"],requires:"gateway"},{id:"gw-tools-narrowall",store:"gateway",type:"toggle",label:"Also narrow non-MCP tools",help:"Only if your client has no essential core tools.",synonyms:["narrow all tools"],requires:"gateway"}]},{id:"agents",label:"Agents through the gateway",rows:[{id:"gw-agent-perm",store:"gateway",type:"select",label:"Permissions for agents through the gateway",help:"What a CLI agent may do when another client — the desktop, OpenCode — reaches it through the gateway. The panel’s own agents use their card’s setting.",synonyms:["gateway permissions","permission mode","accept edits","bypass"],requires:"gateway"},{id:"gw-agent-workdir",store:"gateway",type:"text",label:"Working directory for agents through the gateway",help:"Where those agents start.",synonyms:["gateway workdir","cwd"],requires:"gateway"}]},{id:"monitoring",label:"Monitoring",rows:[{id:"gw-log",store:"gateway",type:"toggle",label:"Log requests",help:"Counts and per-stage latency, no values.",synonyms:["gateway log","request log","observability"],requires:"gateway"},{id:"gw-log-detail",store:"gateway",type:"toggle",label:"Capture redaction detail",help:"Expand a request to see what was redacted — types and tokens only, or real values kept in memory.",synonyms:["redaction detail","what was redacted","log values"],requires:"gateway"},{id:"gw-logs-refresh",type:"action",label:"Recent gateway requests",help:"The last requests the gateway handled.",synonyms:["recent requests","gateway history"],requires:"gateway"},{id:"gw-test-input",type:"textarea",label:"Test a prompt through the gateway",help:"What is detected, what the destination sees, and the restored reply.",synonyms:["gateway test","try gateway"],requires:"gateway"}]},{id:"advanced",label:"Advanced",advanced:!0,rows:[{id:"gw-origins",store:"gateway",type:"textarea",label:"Allowed browser origins",help:"Only if a web app should call the gateway. Local CLI tools need nothing here.",synonyms:["cors","origins","allow origin","browser app"],requires:"gateway"},{id:"gw-token",key:"gatewayToken",store:"local",type:"secret",label:"Gateway admin token",help:"Only for older gateways — a current one authorizes the extension automatically.",synonyms:["gateway-token","admin token","auth"]},{id:"gw-pro-activate",type:"action",label:"Activate Pro on the gateway",help:"Hands your ChatPanel Pro to the gateway — nothing to paste.",synonyms:["gateway pro","entitlement"],requires:"gateway"},{id:"gw-pro-token",store:"gateway",type:"secret",label:"Entitlement token",help:"Paste a token manually if activation cannot reach the gateway.",synonyms:["entitlement token","license token"],requires:"gateway"},{id:"gw-save",type:"action",label:"Save to gateway",help:"Write the gateway settings above.",synonyms:["save gateway"],requires:"gateway"}]}]},{id:"runtime",group:"privacy",label:"Runtime",blurb:"What each process Chap runs for you may touch: the sandbox, its network, and what is running now",sections:[{id:"sandbox",label:"Access & sandbox",rows:[{id:"rt-sandbox-status",type:"status",label:"Process sandbox",help:"Whether the agents, MCP servers and workers started for you run inside the sandbox runtime, and why not when they do not.",synonyms:["sandbox status","srt","seatbelt","isolation","sandboxed"],requires:"bridge"},{id:"rt-sandbox-mode",store:"gateway",type:"select",label:"Network",help:"Open lets a process reach any public host through the sandbox proxy (never your machine, your network or a cloud metadata address). Allow list lets it reach only its own service, the developer hosts and what you add below or on the agent, server or skill. Off runs processes outside the sandbox.",synonyms:["sandbox mode","network mode","allowlist","egress","outbound","firewall"],requires:"gateway",options:[["open","Open (any public host)"],["allowlist","Allow list"],["off","Off (no sandbox)"]]},{id:"rt-sandbox-hosts",store:"gateway",type:"textarea",label:"Services agents may reach",help:"Added to every allow list: one host per line, or comma separated — graph.microsoft.com, *.example.com, host:port. An agent, an MCP server or a skill adds its own on its card.",synonyms:["allowed hosts","extra hosts","allow host","allow service","allow a service","grant access","give access","access","domain allowlist","outlook","jira"],requires:"gateway"},{id:"rt-sandbox-runtime",store:"gateway",type:"select",label:"Sandbox",help:"What isolates every agent, MCP server and worker. ChatPanel’s sandbox (the default) needs nothing else installed. A container runs each one from an image you name, with Podman or Docker. Your own sandbox command wraps each one in the tool you choose — firejail, nsjail, gVisor, your company’s — with {cmd} where the command goes. Managed by your organisation: your agents already run inside your company’s sandbox, so ChatPanel does not add a second one.",synonyms:["sandbox runtime","srt","container","docker","podman","firejail","nsjail","gvisor","bubblewrap","own sandbox","company sandbox","managed sandbox","bring your own sandbox"],requires:"gateway",options:[["srt","ChatPanel’s sandbox"],["container","A container (Podman or Docker)"],["command","Your own sandbox command"],["managed","Managed by your organisation"]]},{id:"rt-sandbox-command",store:"gateway",type:"text",label:"Sandbox command",help:"Your sandbox tool, with {cmd} where the command goes — e.g. firejail --quiet --private={workdir} -- {cmd}. Also {workdir}, {home}, {hosts}, {mode}. Words are split on spaces; a JSON array keeps a word with a space whole. Never run through a shell.",synonyms:["wrapper","sandbox wrapper","firejail","nsjail","runsc","custom sandbox"],requires:"gateway"},{id:"rt-sandbox-image",store:"gateway",type:"text",label:"Container image",help:"The image each process runs in — it must carry the agent CLIs you use (Claude Code, Codex). Signed-in sessions on this computer are not carried in: an agent in a container uses an API key.",synonyms:["image","docker image","podman image","container image"],requires:"gateway"},{id:"rt-sandbox-required",store:"gateway",type:"toggle",label:"Require the sandbox",help:"Refuse to run an agent, MCP server or worker the sandbox cannot be applied to — instead of running it as you and saying so. An agent you allowed to run outside the sandbox still may, unless your organisation requires the sandbox.",synonyms:["required","fail closed","never unsandboxed","strict sandbox","refuse unsandboxed"],requires:"gateway"},{id:"rt-sandbox-reads",store:"gateway",type:"select",label:"What agents may read",help:"Everything but your secrets (the default): a process may read most of this computer, except ~/.ssh, ~/.aws, the ChatPanel store, the rest of the built-in list and the folders below. Only their own folder: your home folder is closed to it, except its working folder, the tools it runs with, the folders you let agents use and the sign-ins you allowed — the choice for agents a partner server drives. A tool installed under your home folder may then need its folder added under Folders agents may use.",synonyms:["sandbox reads","read access","read only working folder","restrict reads","inverted","home folder","privacy","partner agents"],requires:"gateway",options:[["enumerated","Everything but your secrets"],["inverted","Only their own folder (and the tools they use)"]]},{id:"rt-sandbox-write",store:"gateway",type:"textarea",label:"Folders agents may use",help:"Beyond the working directory, the temp dir and the tool caches. One path per line; ~ is your home. A folder listed here is passed to the coding agent itself as well as to the sandbox, so the agent can actually write there — add it once and it stays until you remove it. Credential folders (~/.ssh, ~/.aws, the ChatPanel store) can never be added.",synonyms:["writable paths","allow write","write access","allow folder","allow a folder","allow directory","give access to a folder","grant access","give access","folder access","project folder","access","permission","revoke access","stop asking"],requires:"gateway"},{id:"rt-sandbox-deny",store:"gateway",type:"textarea",label:"Folders no agent may read",help:"Added to the built-in secrets: ~/.ssh, ~/.aws, ~/.kube, the ChatPanel store and the rest. One path per line.",synonyms:["deny read","protected paths","secrets","hide folder","block folder","deny folder","revoke access"],requires:"gateway"}]},{id:"processes",label:"Running now",rows:[{id:"rt-processes",type:"status",label:"Processes",help:"Every agent turn, warm agent session, MCP server, probe and worker running for you right now, with how each is isolated: the layer, the runtime, the kit, and any hosts it was granted beyond its own.",synonyms:["running processes","mcp servers running","what is running","process list","srt processes","sandboxed processes"],requires:"bridge"},{id:"rt-containers",type:"status",label:"Containers",help:"Every container the engine on this machine has, running or not — ChatPanel’s marked, the rest yours.",synonyms:["containers","podman ps","docker ps","running containers"],requires:"gateway"},{id:"rt-refused",type:"status",label:"Refused hosts",help:"The hosts a process tried to reach and the sandbox refused, most recent first — each with a one-click allow: for that server or agent, or for every process.",synonyms:["refused","blocked host","denied host","allow host","one-click allow","violations"],requires:"bridge"},{id:"rt-recheck",type:"action",label:"Refresh",help:"Ask the bridge again.",synonyms:["refresh processes"]}]},{id:"services",label:"Engines & services",rows:[{id:"rt-engine",type:"status",label:"Container engine",help:"Whether Podman (or Docker) is on this machine and can run a container now. Without one, the command to install Podman for this platform — you run it, the gateway never does.",synonyms:["podman","docker","container","install podman","engine"],requires:"gateway"},{id:"rt-engine-start",type:"action",label:"Start the engine",help:"Podman on macOS and Windows runs containers in a machine: made on first start, then started.",synonyms:["podman machine","start podman"],requires:"gateway"}]}]},{id:"memory",group:"workspace",label:"Memory",blurb:"What every model already knows about you",sections:[{id:"memory",label:"Memory",rows:[{id:"memory-enabled",key:"ui.memory.enabled",section:"memory",type:"toggle",label:"Memory",help:'Short, durable facts carried into every conversation and offered to any MCP client through the gateway. Say "remember that…" to add one.',synonyms:["remember","facts about me","personalization","long-term memory"],default:!0},{id:"memory-inprompt",key:"ui.memory.inPrompt",section:"memory",type:"select",label:"In the prompt",help:"How much of your memory rides in the system prompt on every turn versus being fetched by the memory tool.",synonyms:["system prompt memory","memory tool","in-prompt"],options:[["preferences","Only how I want answers"],["all","Everything relevant"],["off","Nothing — the model asks the memory tool"]]},{id:"memory-offers",key:"ui.memory.offers",section:"memory",type:"toggle",label:"Offer to remember things I mention in passing",help:"A one-tap Remember chip above the composer; nothing is saved without your tap.",synonyms:["remember chip","suggest memory","offers"],default:!0}]},{id:"stored",label:"Stored memories",rows:[{id:"memory-list",type:"list",label:"Stored memories",help:"Every fact, in full, with where it came from — edit in place or forget.",synonyms:["memories","what does it know","forget","edit memory"]},{id:"memory-add",type:"action",label:"Add a memory",help:"Write a fact yourself.",synonyms:["new memory"]},{id:"memory-clear",type:"action",label:"Forget all memories",help:"Delete every stored memory.",synonyms:["clear memory","delete all","forget everything"]}]}]},{id:"notes",group:"workspace",label:"Notes",blurb:"Your private, on-device writing workspace",sections:[{id:"cowriter",label:"Co-writer",rows:[{id:"notes-cowriter-enabled",store:"local",type:"toggle",label:"Co-writer",help:"An editor fixes typos on a pause, a researcher surfaces related material, a writer drafts ahead on ⌘↵. Off by default — it calls models as you type.",synonyms:["cowriter","writing assistant","grammar","draft ahead","swarm"]}]},{id:"autocomplete",label:"Inline autocomplete",rows:[{id:"notes-ac-enabled",key:"ui.notes.autocomplete.enabled",section:"notes",type:"toggle",label:"Inline autocomplete in notes",help:"Grey ghost text on a pause; Tab accepts. Accepted text is attributed to the model.",synonyms:["ghost text","notes completion","tab to accept"]},{id:"notes-ac-model",key:"ui.notes.autocomplete.agentId",section:"notes",type:"picker",label:"Notes autocomplete model",help:"A small, fast one; uses its autocomplete model when set.",synonyms:["notes model","completion model"]}]},{id:"commands",label:"Note commands",rows:[{id:"notes-tool-websearch",key:"ui.notes.tools.webSearch",section:"notes",type:"toggle",label:"@insert may use web search",help:"Fetch live results for @insert, @table and @list.",synonyms:["@insert","note tools","web in notes"],default:!0},{id:"notes-tool-mcp",key:"ui.notes.tools.mcp",section:"notes",type:"toggle",label:"@insert may use MCP tools",help:"Your connected external tools, from a note.",synonyms:["@insert","mcp in notes"],default:!0},{id:"notes-tool-history",key:"ui.notes.tools.history",section:"notes",type:"toggle",label:"@insert may search history",help:"Your own notes, chats and meetings, from a note.",synonyms:["@insert","history in notes"],default:!0}]},{id:"dashboard",label:"Open",rows:[{id:"open-notes-dashboard",type:"link",label:"Open the notes dashboard",help:"The full-screen notes workspace.",synonyms:["notes page","open notes"]}]}]},{id:"meetings",group:"workspace",label:"Meetings",blurb:"Live scribe for Zoom, Meet, Teams and Webex — captions only, never audio",sections:[{id:"live-notes",label:"Live notes",rows:[{id:"pref-live-notes",key:"ui.liveNotesIntervalMin",section:"meetings",type:"select",label:"Auto-refresh notes",help:"How often new captions are merged into the running summary and saved.",synonyms:["live summary","refresh interval","scribe"],pro:!0,options:[["0","Off — summarize only when I ask"],["1","Every 1 minute"],["2","Every 2 minutes"],["5","Every 5 minutes"],["10","Every 10 minutes"]]},{id:"pref-meeting-window",key:"ui.meetingWindowMin",section:"meetings",type:"select",label:"Transcript sent per question",help:"The full transcript for short calls, a window for long ones — keeps the prompt and cost from growing.",synonyms:["transcript window","context window","minutes"],pro:!0,options:[["0","Full transcript so far"],["5","Last 5 minutes"],["10","Last 10 minutes"],["20","Last 20 minutes"],["30","Last 30 minutes"]]},{id:"pref-meeting-summary-style",key:"ui.meetingSummaryStyle",section:"meetings",type:"select",label:"Live summary style",help:"Concise keeps it short and cheap; Detailed produces full minutes. Either can be regenerated per meeting.",synonyms:["concise","detailed","minutes","summary length"],pro:!0,options:[["concise","Concise"],["detailed","Detailed — full minutes"]]},{id:"pref-meeting-auto-open",key:"ui.meetingAutoOpen",section:"meetings",type:"toggle",label:"Open Chap when a meeting starts",help:"The side panel opens once you are in a Zoom, Meet, Teams or Webex call — not on their home pages or waiting rooms. If the browser holds it back, it opens on your first click in the call. Chrome and Edge.",synonyms:["auto open","open automatically","open on meeting","side panel on join","pop up","meeting opens chap"],browserOnly:!0,default:!0},{id:"pref-alert-sound",key:"ui.alertSound",section:"meetings",type:"toggle",label:"Sound an alert when a timer or reminder fires",help:"A notification is something you look at; a timer needs to reach you when you are not looking.",synonyms:["alert","chime","timer sound","reminder sound","beep"],default:!0}]},{id:"languages",label:"Languages",rows:[{id:"meeting-languages",key:"ui.capture.languages",section:"speech",type:"picker",label:"Languages spoken in your meetings",help:"Each line is detected among these, so a call that moves between Telugu, Hindi and English is transcribed as all three. Empty: any language. Indian languages switch the speech model to Whisper — Parakeet hears only European ones.",synonyms:["language","multilingual","hindi","telugu","tamil","spanish","portuguese","code switching","hinglish","mixed languages","detect language"]},{id:"meeting-translate",key:"ui.capture.translate",section:"speech",type:"toggle",label:"Translate meetings into English",help:"Lines in another language get an English version, made on this computer — IndicTrans2 for Indian languages, a general translator for the rest; nothing leaves. Summaries read the English; the words as spoken stay one click away.",synonyms:["translate","translation","english transcript","subtitles","interpret"],default:!0},{id:"meeting-on-computer",key:"ui.capture.onComputer",section:"speech",type:"toggle",label:"Transcribe on my computer",help:"When this phone is linked to your computer, meetings and dictation are transcribed by the computer’s models — Telugu, Hindi and other Indian languages, a language per line, an English version — and this phone’s own recogniser takes over whenever the computer cannot be reached. Pro.",synonyms:["computer transcription","link transcription","indian languages on phone","telugu","hindi","use my computer"],default:!0,phoneOnly:!0,pro:!0},{id:"meeting-translate-with",key:"ui.capture.translateWith",section:"speech",type:"picker",label:"Translate with",help:"Blank: the translators on this computer. Pick one of your models to translate instead — it reads mixed speech (Hinglish) and the lines around each line better; a cloud model sees them redacted, like any message.",synonyms:["translation model","translator","indictrans","translate using"]}]},{id:"monitors",label:"Live monitors",rows:[{id:"pref-monitor-model",key:"ui.monitors.targetId",section:"monitors",type:"picker",label:"Answer monitors with",help:"A monitor re-answers its question every time the transcript grows — a fast model keeps it live.",synonyms:["monitor model","/monitor","/tldr","live monitor"],pro:!0},{id:"pref-monitor-window",key:"ui.monitors.windowMin",section:"monitors",type:"select",label:"Monitor transcript window",help:"How many minutes of transcript a monitor reads.",synonyms:["monitor window"],pro:!0,options:[["2","Last 2 minutes"],["5","Last 5 minutes"],["10","Last 10 minutes"],["15","Last 15 minutes"],["30","Last 30 minutes"]]},{id:"pref-monitor-summary",key:"ui.monitors.sources.summary",section:"monitors",type:"toggle",label:"Monitors read the running summary",help:"Adds the live summary to each monitor prompt.",synonyms:["monitor sources"],pro:!0,default:!0},{id:"pref-monitor-findings",key:"ui.monitors.sources.findings",section:"monitors",type:"toggle",label:"Monitors read what they already found",help:"Stops a monitor repeating itself.",synonyms:["monitor findings","dedupe"],pro:!0,default:!0},{id:"pref-monitor-web",key:"ui.monitors.sources.web",section:"monitors",type:"toggle",label:"Monitors may search the web",help:"Adds a tool call before it can answer.",synonyms:["monitor web search"],pro:!0},{id:"pref-monitor-history",key:"ui.monitors.sources.history",section:"monitors",type:"toggle",label:"Monitors may read past chats, meetings & notes",help:"Your history as a source for a monitor.",synonyms:["monitor history"],pro:!0},{id:"pref-monitor-mcp",key:"ui.monitors.sources.mcp",section:"monitors",type:"toggle",label:"Monitors may use MCP tools",help:"The slowest option — every server is described in the prompt.",synonyms:["monitor mcp"],pro:!0}]},{id:"capture",label:"This computer’s audio",rows:[{id:"scribe-hear",key:"ui.capture.hear",section:"speech",type:"picker",label:"What the scribe hears",help:"One meeting app, or everything this computer plays except Chap.",synonyms:["meeting app","system audio","zoom audio","capture app","transcribe a call"],desktopOnly:!0,composer:!0},{id:"scribe-noise",key:"ui.capture.noise",section:"speech",type:"select",label:"Microphone noise suppression",help:"Auto cleans the mic for a room and leaves it alone with headphones.",synonyms:["noise","denoise","background noise"],desktopOnly:!0,composer:!0,options:[["auto","Auto"],["standard","Standard"],["off","Off"]]},{id:"scribe-headphones",key:"ui.capture.headphones",section:"speech",type:"select",label:"Headphones",help:"With headphones the speakers cannot leak into the mic, so no echo guard is needed. Auto asks the system.",synonyms:["echo","earbuds","speakers"],desktopOnly:!0,composer:!0,options:[["auto","Auto"],["yes","Yes"],["no","No"]]},{id:"scribe-live",key:"ui.scribeLive",section:"speech",type:"toggle",label:"Live phrases",help:"Re-decode a phrase as it grows, so monitors and questions see words sooner. More CPU.",synonyms:["live transcription","partial words","streaming captions"],desktopOnly:!0,composer:!0}]},{id:"spoken",label:"Spoken commands",advanced:!0,rows:[{id:"pref-voice-enabled",key:"ui.voice.enabled",section:"voice",type:"toggle",label:"Spoken commands during a meeting",help:'Say "Hey Chap, keep an eye on the pricing question" to start a monitor. Matched on-device against the captions — no audio, no model call.',synonyms:["wake word","voice commands","hey chap","hey chatpanel","say"],pro:!0,default:!0},{id:"pref-voice-wake",key:"ui.voice.wakeWord",section:"voice",type:"text",label:"Wake word",help:"Chap always answers to “Hey Chap”; add your own here, several separated by commas.",synonyms:["trigger word","hotword","hey chap"],pro:!0},{id:"pref-voice-wake-listen",key:"ui.voice.wakeListen",section:"voice",type:"toggle",label:"Listen for the wake word while the app is open",help:"Say “Hey Chap” (or your wake word) to start a voice conversation. Heard on the phone only while Chap is on screen; nothing leaves it.",synonyms:["hey chap","wake word","hotword","hands free","always listening"],phoneOnly:!0},{id:"pref-voice-from",key:"ui.voice.from",section:"voice",type:"select",label:"Act on commands from",help:"Only you, or anyone on the call.",synonyms:["who can command","speaker"],pro:!0,options:[["me","Only me"],["anyone","Anyone in the meeting"],["off","Nobody — just listen"]]},{id:"pref-voice-names",key:"ui.voice.selfNames",section:"voice",type:"text",label:"My name in captions",help:"Meet labels you by name; put it (and any short form) here so your own commands are recognised.",synonyms:["caption name","my name","you"],pro:!0}]},{id:"dashboard",label:"Open",rows:[{id:"open-meetings-dashboard",type:"link",label:"Open the meetings dashboard",help:"Every recorded meeting: summary, topics, key moments, action items, transcript.",synonyms:["past meetings","transcripts","open meetings"]}]}]},{id:"chat-history",group:"workspace",label:"Chat history",blurb:"Search every conversation",sections:[{id:"topics",label:"Topics",rows:[{id:"pref-topic-extract",key:"ui.topicExtraction.enabled",section:"topics",type:"toggle",label:"Auto-extract topics for history graphs",help:"Runs after chats or transcripts change and saves concise graph topics locally.",synonyms:["topics","graph","tags","topic extraction"],default:!0},{id:"pref-topic-target",key:"ui.topicExtraction.targetId",section:"topics",type:"picker",label:"Topic extraction model",help:"Blank: the system’s own model on this device when there is one (Apple on-device on a Mac) — free and nothing leaves — otherwise the conversation’s model; a coding agent’s topics never go to the agent.",synonyms:["topic model"]}]},{id:"indexing",label:"Indexing",rows:[{id:"pref-recall-target",key:"ui.recall.targetId",section:"recall",type:"picker",label:"Search & indexing model",help:"Plans each history search and tags people, places and organisations in what you save. Any model you added — one on this phone (Gemini Nano, a downloaded model) or an API model, which then reads your saved text. Blank: a model on this phone if there is one, otherwise the words alone.",synonyms:["search model","indexing model","decider","planner","entity model","nano"],phoneOnly:!0},{id:"pref-recall-index",key:"ui.recall.index",section:"recall",type:"toggle",label:"Tag people, places and organisations",help:"Reads each saved chat, note and meeting once with the search model — in the background, while charging — so “which cities did I mention” has an answer. Off: search still works, by words.",synonyms:["entities","cities","places","people","companies","knowledge index"],default:!0,phoneOnly:!0},{id:"gw-warm-search",key:"ui.warmSearch.enabled",section:"warmSearch",type:"toggle",label:"Index my history to the gateway",help:"Opt-in. Sends decrypted chats and meetings to your local gateway so search scales past what the browser can hold.",synonyms:["warm search","full-corpus search","gateway index","history indexing"],requires:"gateway"},{id:"gw-backup-key",store:"gateway",type:"toggle",label:"Let the gateway decrypt & index my daily backups",help:"Hands your backup password to the local gateway so it can index your encrypted backups too.",synonyms:["backup key","index backups","backup password handoff"],requires:"gateway"}]},{id:"knowledge-bases",label:"Knowledge bases",rows:[{id:"kb-list",type:"list",label:"Knowledge bases",help:"Each base with its documents and passages, the notes a model proposed (accept or remove them), who may use it, and its map. Attach one to a chat from the composer.",synonyms:["knowledge base","kb","documents","pdf","index","rag","notes to accept","graph report"],requires:"gateway"},{id:"kb-build",type:"action",label:"Build a knowledge base",help:"From a folder or documents on this machine: indexed by the gateway, nothing leaves it.",synonyms:["index a folder","add documents","build kb"],requires:"gateway"}]},{id:"dashboard",label:"Open",rows:[{id:"open-history-dashboard",type:"link",label:"Open the chat history dashboard",help:"Ranked, keyword and by-agent search, threads, related chats and the graph.",synonyms:["history page","search chats","open history"]}]}]},{id:"voice",group:"workspace",label:"Voice",blurb:"Dictation, read-aloud and speaker models — all on this machine",sections:[{id:"dictation",label:"Dictation",rows:[{id:"gw-stt-search",store:"gateway",type:"picker",label:"Speech-to-text model",help:"Local Whisper for the mic button — audio never leaves your machine. Non-Latin languages need Small or Large v3 Turbo.",synonyms:["whisper","stt","dictation model","microphone","speech to text","transcribe"],requires:"gateway"},{id:"gw-stt-dtype",store:"gateway",type:"select",label:"Dictation precision",help:"Quantization — lighter is faster, fuller is more accurate.",synonyms:["quantization","dtype","fp16","q8"],requires:"gateway"},{id:"gw-stt-lang",key:"ui.dictation.lang",section:"speech",type:"picker",label:"Dictation language",help:"Auto-detect works well on Small+. Pin a language if detection guesses wrong on short phrases.",synonyms:["speech language","mic language","auto-detect"]}]},{id:"read-aloud",label:"Read aloud",rows:[{id:"gw-tts-search",store:"gateway",type:"picker",label:"Text-to-speech model",help:"The voice behind Read aloud and voice conversation. Kokoro and VITS/MMS run here; without one the browser voice is used.",synonyms:["tts","speech","kokoro","pocket tts","mms","voice model","read aloud engine"],requires:"gateway"},{id:"gw-tts-voice",store:"gateway",type:"picker",label:"Voice",help:"Which voice reads answers aloud.",synonyms:["speaker voice","tts voice","read aloud voice"],requires:"gateway",quick:!0},{id:"gw-tts-dtype",store:"gateway",type:"select",label:"Read-aloud precision",help:"Quantization for the TTS model.",synonyms:["tts quantization"],requires:"gateway"},{id:"gw-tts-voices",store:"gateway",type:"list",label:"Your voices",help:"Voice prints derived from a few seconds of your speech — the recording is never stored and nothing leaves this machine.",synonyms:["voice clone","my voice","voice print","custom voice"],requires:"gateway"},{id:"gw-tts-record",type:"action",label:"Record a voice",help:"Ten seconds at a normal pace; needs a model that can use a print (Pocket TTS).",synonyms:["record voice","clone voice"],requires:"gateway"}]},{id:"speaker",label:"Meetings",rows:[{id:"gw-diarize-models",store:"gateway",type:"picker",label:"Speaker model",help:"Tells voices apart for meeting transcription — Speaker 1 / Speaker 2 / …, on-device. Needed only for the Transcribe meeting button.",synonyms:["diarization","diarize","who spoke","speaker labels","pyannote"],requires:"gateway"}]}]},{id:"backup-sync",group:"data",label:"Backup & sync",blurb:"Encrypted copies of everything, on a schedule or on demand",sections:[{id:"backups",label:"Encrypted backups",rows:[{id:"autobackup-destination",store:"local",type:"select",label:"Backup destination",help:"Downloads, Google Drive, or both. Compressed and encrypted locally; Drive receives only ciphertext.",synonyms:["where to back up","downloads folder","drive backup","export"],pro:!0},{id:"autobackup-device-name",store:"local",type:"text",label:"This device’s backup name",help:"Each browser profile gets its own seven rotating slots, so one machine never overwrites another.",synonyms:["device name","profile name"],pro:!0},{id:"backup-password",store:"local",type:"secret",label:"Backup encryption password",help:"Stored encrypted in this profile so scheduled backups run unattended. There is no recovery.",synonyms:["passphrase","encryption key","backup password"],pro:!0},{id:"autobackup-now",type:"action",label:"Back up now",help:"An encrypted backup to the destination above, right now.",synonyms:["export now","download backup","manual backup"]}]},{id:"schedule",label:"Schedule",rows:[{id:"autobackup-enabled",store:"local",type:"toggle",label:"Back up my encrypted data every day",help:"At most one completed automatic backup per calendar day; a missed one catches up at the next browser start.",synonyms:["daily backup","automatic backup","scheduled"],pro:!0},{id:"autobackup-hour",store:"local",type:"select",label:"Run the daily backup at",help:"One local time.",synonyms:["backup time","backup hour"],pro:!0}]},{id:"drive",label:"Google Drive",rows:[{id:"drive-connect",type:"action",label:"Connect Google Drive",help:"Your own Google account, connected once; Chap refreshes authorization for scheduled backups.",synonyms:["google","drive","oauth","sign in google"],pro:!0},{id:"drive-disconnect",type:"action",label:"Disconnect Google Drive",help:"Forget the Drive authorization on this browser.",synonyms:["sign out google","remove drive"],requires:"drive"},{id:"drive-backup-list",type:"picker",label:"Encrypted backups in Drive",help:"The backups every device has written.",synonyms:["drive backups","restore from drive"],requires:"drive"},{id:"drive-backup-restore",type:"action",label:"Restore the selected Drive backup",help:"Downloads ciphertext into memory and decrypts it with the password above; always merges chats, meetings and notes.",synonyms:["restore drive"],requires:"drive"},{id:"drive-backup-restore-all",type:"action",label:"Merge latest from all devices",help:"Restore the newest backup of every device at once.",synonyms:["merge devices","restore all"],requires:"drive"}]},{id:"restore",label:"Restore from file",advanced:!0,rows:[{id:"backup-import",type:"action",label:"Restore from file",help:"An encrypted backup or a legacy ZIP export, from disk.",synonyms:["import","restore","upload backup","zip"]},{id:"backup-replace",store:"local",type:"toggle",label:"Replace existing data when restoring from a file",help:"Default is merge.",synonyms:["overwrite on restore","replace data"]}]}]},{id:"storage-access",group:"data",label:"Storage & access",blurb:"Where your data lives, and which agents read it",sections:[{id:"storage",label:"Where your data lives",rows:[{id:"obs-sync",type:"action",label:"Sync now",help:"Mirror chats, meetings and notes to the local gateway so connected agents can search them.",synonyms:["sync gateway","mirror","warm tier"],requires:"gateway"},{id:"obs-clear",type:"action",label:"Clear the gateway copy",help:"Delete the gateway’s mirror; the browser keeps everything.",synonyms:["delete gateway data","clear warm"],requires:"gateway"},{id:"obs-refresh",type:"action",label:"Refresh storage view",help:"Storage per tier and the access log.",synonyms:["storage size","how much data","access log","who read what"]}]}]},{id:"activity-usage",group:"data",label:"Activity & usage",blurb:"Every model call, and what each run actually did",sections:[{id:"totals",label:"Totals",rows:[{id:"usage-groupby",type:"select",label:"Group usage by",help:"Model, agent or day.",synonyms:["usage","tokens","cost","spend","bill"]},{id:"usage-window",type:"select",label:"Usage window",help:"How far back the totals reach.",synonyms:["usage period","last 7 days","this month"]},{id:"usage-clear",type:"action",label:"Clear usage totals",help:"Reset the counters on this device.",synonyms:["reset usage"]}]},{id:"runs",label:"Runs",rows:[{id:"activity-kind",type:"select",label:"Show runs of kind",help:"Chat, monitor, note command, team…",synonyms:["activity filter","run kind"]},{id:"activity-background",type:"toggle",label:"Show background work",help:"Include topic extraction, briefs and the other work that ran without you asking.",synonyms:["background runs","hidden runs"]},{id:"activity-replay",type:"action",label:"Verify replay",help:"Re-derive the log and compare — proves the record is consistent.",synonyms:["replay","verify log","event log"]},{id:"activity-export",type:"action",label:"Export activity (JSONL)",help:"Every event as one CloudEvents 1.0 JSON line — readable by any event bus or log pipeline.",synonyms:["export runs","download activity","jsonl","cloudevents","event stream"]},{id:"activity-clear",type:"action",label:"Clear activity",help:"Delete the run log on this device.",synonyms:["delete activity","clear runs"]}]}]},{id:"plan",group:"account",label:"Plan",blurb:"Free, Pro or Team, and restoring Pro on this device",sections:[{id:"plan",label:"Your plan",rows:[{id:"btn-subscribe-pro",type:"action",label:"Subscribe to Pro",help:"Opens secure checkout; Pro activates here automatically. Becomes Pro · Manage once you have it.",synonyms:["upgrade","buy","pro","pricing","checkout","license","licence"]},{id:"btn-check-purchase",type:"action",label:"Check for my purchase",help:"Already paid and still seeing Free? No email needed.",synonyms:["already paid","refresh license","activate"]},{id:"license-deactivate",type:"action",label:"Deactivate Pro on this device",help:"Free this device’s seat.",synonyms:["sign out","deactivate","remove license"],requires:"pro"}]},{id:"restore",label:"Already subscribed",rows:[{id:"restore-email",type:"text",label:"Restore Pro by email",help:"A one-tap link that activates Pro on this device.",synonyms:["restore purchase","magic link","email me a link","lost pro"]},{id:"btn-restore",type:"action",label:"Email me a restore link",help:"Send the link to the address above.",synonyms:["send link"]}]}]},{id:"plugins",group:"account",label:"Plugins",blurb:"Everything Chap loads, and what you can switch off",sections:[{id:"plugins",label:"Plugins",rows:[{id:"plugins-list",type:"list",label:"Adapters and tool groups",help:"Adapters drive an app through its own data format; tool groups are the sets offered each turn. A disabled group is never built. Security cannot be turned off.",synonyms:["adapters","tool groups","disable feature","excalidraw","draw.io","tldraw","switch off"]},{id:"plugins-refresh",type:"action",label:"Refresh plugins",help:"Re-read what is loaded.",synonyms:["reload plugins"]}]}]},{id:"about",group:"account",label:"About",blurb:"Version, updates and support",sections:[{id:"about",label:"About",rows:[{id:"check-updates",type:"action",label:"Check for updates",help:"A manual install does not auto-update; this looks for a newer build.",synonyms:["version","update","new version","download latest","changelog","help","support"]},{id:"report-bug",type:"action",label:"Report a problem",help:"A GitHub issue with this app’s version and diagnostics filled in — no chat content. You see all of it first, and nothing is sent until you submit it on GitHub. Also /bug in any chat.",synonyms:["bug","bug report","issue","report","feedback","broken","crash","not working","github","support"]}]}]}]),w=new Map(S.map(e=>[e.id,e])),f=new Map(m.map(e=>[e.id,e]));function g(){const e=[];for(const t of m){const o=t.group&&w.get(t.group)||null;for(const r of t.sections)for(const a of r.rows)e.push({row:a,section:r,page:t,group:o})}return e}const k=new Map(g().map(e=>[e.row.id,e]));function W(e){return k.get(e)}function N(e){return f.get(e)}function D(e){return w.get(e)}function j(e){return m.filter(t=>(t.group||null)===(e||null))}function G(){return g().filter(e=>e.row.quick)}function B(e){return g().filter(t=>e!=="browser"||!t.row.desktopOnly).filter(t=>e==="phone"||!t.row.phoneOnly).map(t=>t.row.id)}function R(e){return[e.group?.label,e.page.label,e.section.label].filter(Boolean).join(" › ")}function O(e,t){return e?t?`#${e}/${t}`:`#${e}`:""}function F(e){const t=k.get(e);return t?O(t.page.id,t.section.id):""}function H(e){const t=String(e||"").replace(/^#/,"");if(!t)return null;const[o,r]=t.split("/"),a=f.get(o);if(!a)return null;const s=r?a.sections.find(i=>i.id===r):void 0;return{page:a,section:s}}function q(e,t){if(!t||!e)return;let o=e;for(const r of t.split(".")){if(!o||typeof o!="object")return;o=o[r]}return o}function U(e,t,o){const r=JSON.parse(JSON.stringify(e||{})),a=String(t||"").split(".");let s=r;for(let i=0;i<a.length-1;i+=1)(!s[a[i]]||typeof s[a[i]]!="object")&&(s[a[i]]={}),s=s[a[i]];return s[a[a.length-1]]=o,r}const z="expanded";function Y(e){return e?.ui?.settingsView==="inline"?"inline":"expanded"}function T(e,t){const o=t?.key?q(e,t.key):void 0;return o??t?.default}function P(e,t){if(t==null||t==="")return e.type==="secret"?"Not set":"";if(e.type==="secret")return"••••";if(typeof t=="boolean")return t?"On":"Off";if(Array.isArray(t))return`${t.length}`;if(typeof t=="object"){const a=Object.keys(t).length;return a?`${a}`:""}const o=e.options?.find(a=>String(a[0])===String(t)),r=o?o[1]:String(t);return r.length>40?`${r.slice(0,37)}…`:r}const b=e=>String(e||"").toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g,""),E=e=>b(e).split(/[^a-z0-9@/.+-]+/).filter(Boolean);function h(e,t,o,r,a){const s=b(e);if(!s)return 0;let i=0;for(const n of t)s.startsWith(n)?i+=o:new RegExp(`(^|[^a-z0-9])${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`).test(s)?i+=r:s.includes(n)&&(i+=a);return i}function $(e,{settings:t,limit:o=12,rows:r,client:a=null}={}){const s=E(e);if(!s.length)return[];const i=r?new Set(r):null,n=[];for(const l of g()){const{row:d}=l;if(i&&!i.has(d.id)||d.phoneOnly&&a!=="phone")continue;const v=[d.label,...d.synonyms||[],l.section.label,l.page.label,l.group?.label||"",d.help||""].map(b).join(" \0 ");if(!s.every(u=>v.includes(u)))continue;let p=h(d.label,s,30,18,8);for(const u of d.synonyms||[])p=Math.max(p,h(u,s,16,12,6))+(h(u,s,1,1,1)?1:0);if(p+=h(l.page.label,s,6,5,2)+h(l.section.label,s,6,5,2),p+=h(d.help,s,2,2,1),d.quick&&(p+=1),p>0&&d.phoneOnly&&a==="phone"&&(p+=4),p<=0)continue;const x=d.key?P(d,T(t,d)):"";n.push({id:d.id,label:d.label,help:d.help||"",type:d.type,value:x,pro:!!d.pro,requires:d.requires||null,page:l.page.id,pageLabel:l.page.label,section:l.section.id,sectionLabel:l.section.label,group:l.group?.id||null,groupLabel:l.group?.label||"",breadcrumb:R(l),score:p})}return n.sort((l,d)=>d.score-l.score||l.label.length-d.label.length||l.label.localeCompare(d.label)),n.slice(0,o)}const c=e=>Array.isArray(e)?e.length:0,y=(e,t,o=`${t}s`)=>`${e} ${e===1?t:o}`;function M(e,t={},o={}){const r=t.ui||{},a=n=>({state:"ok",text:n}),s=n=>({state:"warn",text:n}),i=n=>({state:"off",text:n});switch(e){case"models":{const n=c(t.endpoints);return n?a(y(n,"endpoint")):s("No endpoints yet")}case"agent-tools":{if(!o.bridge)return s("Local runtime not running");const n=Number.isFinite(o.agentCount)?o.agentCount:c(t.agents);return n?a(y(n,"agent")):s("No agents found")}case"gateway":return o.gateway?a("Running"):i("Not running");case"runtime":{if(!o.bridge)return i("Local runtime not running");const n=o.sandbox;return n?n.enabled===!1?s("Sandbox off — processes run as you"):n.runtime?n.runtime==="managed"?a("Your organisation’s sandbox"):String(n.runtime).startsWith("command:")?a(`Sandboxed · ${String(n.runtime).slice(8)}`):String(n.runtime).startsWith("container:")?a(`Sandboxed · containers (${String(n.runtime).slice(10)})`):a(n.mode==="allowlist"?"Sandboxed · allow list":"Sandboxed · open network"):s(`${n.required?"Nothing runs — sandbox required but unavailable":"Not sandboxed"}${n.reason?` — ${String(n.reason).split(" — ")[0]}`:""}`):{state:"none",text:""}}case"redaction":{const n=r.piiRedaction?.mode||"off";return n==="off"?s("Off — a model sees what you type"):a(n==="model"?"Patterns + AI detection":"Patterns")}case"internal-sites":return t.privacy?.internalGuard===!1?i("Off"):a("Internal content stays on this device");case"tools-mcp":{const n=c(t.mcpServers);return n?a(y(n,"server")):i("No servers")}case"web-search":return r.webSearch?.enabled===!1?i("Off"):a("On");case"skills":return a(y(c(t.skills),"skill"));case"agent-teams":{const n=c(t.agentPool),l=c(t.teams);return n||l?a(`${y(n,"agent")} · ${y(l,"team")}`):i("None defined")}case"link":{const n=Number(o.linkDevices)||0,l=[n?y(n,"device"):"",o.telegram?"Telegram":""].filter(Boolean);return l.length?a(`${l.join(" · ")} linked`):o.linkDevices===void 0?{state:"none",text:""}:i("Nothing linked")}case"connections":return c(t.connections)?a(y(c(t.connections),"host")):i("None");case"memory":return r.memory?.enabled===!1?i("Off"):a("On");case"meetings":return o.pro?a("Ready"):s("Pro");case"chat-history":return r.warmSearch?.enabled?a("Indexed on the gateway"):a("In the browser");case"voice":return o.gateway?a("On-device models available"):s("Needs the gateway for on-device voice");case"backup-sync":return o.backupEnabled?a("Daily backups on"):s("No scheduled backup");case"plan":return o.pro?a("Pro"):i("Free");default:return{state:"none",text:""}}}function _(e={},t={}){const o=e.ui||{};return[{id:"model",label:"Connect a model",why:"A local server or a hosted API — one endpoint is enough to chat.",done:c(e.endpoints)>0,page:"models",section:"endpoints"},{id:"runtime",label:"Install the local runtime",why:"The gateway brings the bridge: coding agents, on-device dictation and PII detection, routing.",done:!!(t.gateway||t.bridge),page:"agent-tools",section:"runtime"},{id:"redaction",label:"Turn redaction on",why:"Sensitive values are replaced before a model sees them and restored in the reply.",done:(o.piiRedaction?.mode||"off")!=="off",page:"redaction",section:"mode"},{id:"name",label:"Tell Chap your name",why:"Briefs and meeting notes refer to you by it.",done:!!String(e.selfName||"").trim(),page:"general",section:"you"},{id:"tools",label:"Connect a tool",why:"An MCP server gives every agent something to do beyond talk.",done:c(e.mcpServers)>0,page:"tools-mcp",section:"servers"},{id:"backup",label:"Set up daily encrypted backups",why:"A reinstall cannot lose your chats, notes and settings.",done:!!t.backupEnabled,page:"backup-sync",section:"schedule",pro:!0},{id:"phone",label:"Message your agent from your phone",why:"A Telegram bot, polled by the bridge on this machine.",done:!!t.telegram,page:"link",section:"telegram"}]}function K(e,t){const o={};for(const r of m)o[r.id]=M(r.id,e,t);return o}function J(e,t={}){if(!e?.requires)return{ok:!0};const o=C[e.requires];return o?t[o.fact]?{ok:!0}:{ok:!1,reason:o.reason,fix:o.fix,page:o.page}:{ok:!0}}function V(e){return e?.section?A.find(t=>t.id===e.section):void 0}export{L as BOOKKEEPING_KEYS,C as REQUIREMENTS,S as SETTINGS_GROUPS,z as SETTINGS_OPEN_DEFAULT,m as SETTINGS_PAGES,R as breadcrumb,P as describeValue,T as effectiveValue,W as findRow,J as gateOf,D as groupById,_ as homeChecklist,O as linkTo,F as linkToRow,g as listRows,N as pageById,j as pagesOf,H as parseLink,G as quickRows,B as rowsFor,$ as searchSettings,V as sectionOfRow,U as setValue,Y as settingsOpenMode,K as statusAll,M as statusOf,q as valueOf};
1
+ import{PREF_SECTIONS as A}from"./client-prefs.js";const S=Object.freeze([{id:"chat",label:"Chat"},{id:"extend",label:"Extend"},{id:"privacy",label:"Privacy"},{id:"workspace",label:"Workspace"},{id:"data",label:"Data"},{id:"account",label:"Account"}]),C=Object.freeze({gateway:{fact:"gateway",reason:"Needs the gateway running on this machine",fix:"Install or start it",page:"gateway"},bridge:{fact:"bridge",reason:"Needs the local runtime (bridge) running",fix:"Install or start it",page:"agent-tools"},pro:{fact:"pro",reason:"A Pro feature",fix:"See plans",page:"plan"},pageActions:{fact:"pageActions",reason:"Only applies once Act on page is on",fix:"Turn on Act on page",page:"chat"},cdp:{fact:"cdp",reason:"Needs High-reliability page control",fix:"Turn it on",page:"chat"},chromium:{fact:"chromium",reason:"Chromium browsers only — elsewhere Chap falls back automatically",fix:"",page:""},drive:{fact:"drive",reason:"Connect Google Drive first",fix:"Connect",page:"backup-sync"},telegram:{fact:"telegram",reason:"Connect a Telegram bot first",fix:"Connect",page:"link"}}),L=Object.freeze(["removedBuiltinAgents"]),m=Object.freeze([{id:"home",group:null,label:"Home",blurb:"What is set up, what needs attention, and how to get more out of Chap",sections:[]},{id:"general",group:"chat",label:"General",blurb:"How Chap looks and answers",sections:[{id:"appearance",label:"Appearance",rows:[{id:"pref-theme",key:"ui.theme",section:"general",type:"select",label:"Theme",help:"Light, dark or follow the system.",synonyms:["dark mode","light mode","appearance","colour","color"],quick:!0,options:[["system","System"],["light","Light"],["dark","Dark"]]},{id:"pref-language",key:"ui.language",section:"general",type:"select",label:"Response language",help:"Enforced for every model — answers come back in this language whatever you type.",synonyms:["locale","translate","reply language"],quick:!0,options:[["","Auto (match me)"],["English","English"],["Spanish","Spanish"],["French","French"],["German","German"],["Portuguese","Portuguese"],["Italian","Italian"],["Hindi","Hindi"],["Chinese (Simplified)","Chinese (Simplified)"],["Japanese","Japanese"],["Korean","Korean"],["Arabic","Arabic"],["Russian","Russian"]]},{id:"settings-open",key:"ui.settingsView",section:"general",type:"select",label:"Open settings",help:"What the gear opens: the full page, or Settings inside the panel. Either can reach the other.",synonyms:["inline","expanded","gear","settings page","full page","in the panel"],options:[["expanded","Expanded — the full page"],["inline","Inline — in the panel"]]},{id:"pref-launcher-mode",key:"launcher.mode",store:"local",type:"select",label:"Floating button",help:"A Chap button on every page: click to chat right there, drag it anywhere, ✕ hides it on a site. From the float, open the side panel or a full tab.",synonyms:["float","floating button","floating icon","launcher","bubble","chat bubble","icon on every page","button on every page","fab","overlay","widget","hide button","show button","distraction","unpinned"],browserOnly:!0,options:[["always","Always"],["unpinned","Only while ChatPanel is not pinned to the toolbar"],["never","Never"]]},{id:"launcher-hidden-sites",store:"local",type:"list",label:"Sites where the floating button is hidden",help:"Closed with ✕ on the page. Bring it back from here.",synonyms:["hidden sites","bring back the button","show again","floating button","float"],browserOnly:!0}]},{id:"you",label:"You",rows:[{id:"self-name",key:"selfName",section:"identity",type:"text",label:"Your name",help:"How briefs and meeting notes refer to you.",synonyms:["identity","my name","who am I"]}]}]},{id:"chat",group:"chat",label:"Chat",blurb:"The composer, acting on a page, and how far one message may go",sections:[{id:"composer",label:"Composer",rows:[{id:"pref-enter",key:"ui.sendOnEnter",section:"general",type:"toggle",label:"Send on Enter",help:"Enter sends, Shift+Enter makes a newline.",synonyms:["keyboard","return key","newline","submit"],quick:!0,default:!0},{id:"pref-stream",key:"ui.streamResponses",section:"general",type:"toggle",label:"Stream responses",help:"Show the answer as it arrives instead of waiting for the whole reply.",synonyms:["streaming","typing","live"],default:!0},{id:"auto-attach-tab",key:"ui.autoAttachActiveTab",section:"general",type:"toggle",label:"Attach the current page by default",help:"New chats start with the page you are viewing as context. Toggle per chat from the composer.",synonyms:["page context","active tab","use page","attach"],browserOnly:!0,composer:!0,default:!0},{id:"pref-suggestions-enabled",key:"ui.suggestions.enabled",section:"suggestions",type:"toggle",label:"Smart suggestions",help:"Prompt ideas tailored to the page on an empty chat — only the URL, title and description are sent, never the page body.",synonyms:["prompt ideas","starters","suggested prompts"]},{id:"pref-suggestions-target",key:"ui.suggestions.targetId",section:"suggestions",type:"picker",label:"Suggestions model",help:"Which model writes the suggestions and autocomplete. Blank: a model on this device when there is one (Apple on-device on a Mac), otherwise the active model.",synonyms:["suggestion model","generate with"]},{id:"pref-autocomplete",key:"ui.autocomplete",section:"general",type:"toggle",label:"Autocomplete my prompts",help:"A small, fast model suggests a continuation as you pause; Tab accepts. Set an endpoint’s autocomplete model to use it.",synonyms:["ghost text","prompt completion","tab to accept"],pro:!0}]},{id:"page-actions",label:"Act on page",rows:[{id:"pref-pageact-mode",consent:!0,key:"ui.pageActions",section:"pageActions",type:"select",label:"Act on page",help:"Where the agent may fill forms, click and draw. Ask offers it per site; Every readable tab arms it everywhere.",synonyms:["page actions","automation","fill forms","click","drive the page","browser agent"],browserOnly:!0,quick:!0,options:[["off","Off — never"],["ask","Ask on known apps"],["allowlist","Only sites I allowed"],["always","Every readable tab"]]},{id:"pref-pageact-confirm",consent:!0,key:"ui.pageActionConfirm",section:"pageActions",type:"toggle",label:"Confirm before page actions",help:"Ask before the agent fills, clicks or types, so a page or tool cannot quietly steer it. On by default.",synonyms:["approve","confirmation","safety"],browserOnly:!0,requires:"pageActions",default:!0},{id:"pref-pageact-cdp",consent:!0,key:"ui.pageActionsCdp",section:"pageActions",type:"toggle",label:"High-reliability page control",help:"Trusted browser events instead of synthetic ones — needed for canvas apps and keyboard-driven controls. Shows a debugging banner while acting.",synonyms:["cdp","debugger","trusted events","canvas"],browserOnly:!0,requires:"chromium",default:!0},{id:"pref-pageact-devjs",consent:!0,key:"ui.pageActionsDevJs",section:"pageActions",type:"toggle",label:"Let the agent run JavaScript on the page",help:"For developers. Every call is shown and approved individually; that prompt cannot be waived.",synonyms:["developer","javascript","eval","script"],browserOnly:!0,requires:"cdp"},{id:"pref-pageact-sites",key:"ui.pageSites",section:"pageActions",type:"list",label:"Sites you answered",help:"Where you allowed or declined Act on page. Forget one to be asked again.",synonyms:["allowed sites","per-site","remembered","forget site"],browserOnly:!0}]},{id:"watch",label:"Watch a page",rows:[{id:"watch-interval",key:"ui.watch.intervalMs",section:"watch",type:"number",label:"Check every",help:"How often a watched page is re-read.",synonyms:["poll","interval","monitor page","page changes"],browserOnly:!0,composer:!0},{id:"watch-only-changed",key:"ui.watch.onlyWhenChanged",section:"watch",type:"toggle",label:"Only when the page changed",help:"Skip the model call when nothing on the page moved.",synonyms:["changes only","diff"],browserOnly:!0,composer:!0,default:!0},{id:"watch-instruction",key:"ui.watch.instruction",section:"watch",type:"textarea",label:"What to do on a change",help:"The instruction each check runs with.",synonyms:["watch prompt"],browserOnly:!0,composer:!0}]},{id:"turn-limits",label:"Turn limits",advanced:!0,rows:[{id:"pref-max-tools",key:"ui.maxToolsPerTurn",section:"tools",type:"number",label:"Max tools per turn",help:"Beyond this many, remote tools are dropped by relevance; local tools are always kept. 0 = no limit.",synonyms:["tool cap","narrow tools","too many tools"]},{id:"pref-max-rounds",key:"ui.maxToolRoundsPerTurn",section:"tools",type:"number",label:"Max model requests per turn",help:"How many times one message may go back to the model while it uses tools. Up to 60; an endpoint’s own limit wins.",synonyms:["rounds","tool loop","iterations","requests per turn"]},{id:"mcp-tools-mode",key:"ui.mcpToolsMode",section:"tools",type:"select",label:"MCP tools per turn",help:"Auto offers the servers whose tools match the message; Always offers every enabled server; Off never does.",synonyms:["tools mode","auto tools","mcp policy"],quick:!0,composer:!0,options:[["auto","Auto"],["on","Always"],["off","Off"]]},{id:"history-context-mode",key:"ui.historyContextMode",section:"tools",type:"select",label:"History context",help:"Whether past chats, notes and meetings are pulled into a turn automatically.",synonyms:["rag","history rag","context from history","past chats"],quick:!0,composer:!0,options:[["off","Off"],["chats","Past chats"],["meetings","Meetings"],["all","Chats, meetings & notes"]]},{id:"history-tools",consent:!0,key:"ui.historyTools",section:"tools",type:"toggle",label:"History tools",help:"Let the model search your past chats, notes and meetings when a question depends on them.",synonyms:["history search","find tool"],default:!0},{id:"data-dispatch",key:"ui.dataDispatch",section:"tools",type:"toggle",label:"Group data tools behind one find",help:"One registered tool instead of six schemas on every turn. Turn off only for a model that handles a flat toolset better.",synonyms:["find dispatcher","flat tools"],default:!0},{id:"turn-cards",key:"ui.turn.cards",section:"tools",type:"toggle",label:"Answer with cards",help:"Replies can include a card, table, chart or choice that the panel draws itself (A2UI), and look-ups such as the weather show their result as a card the model does not repeat. Nothing runs — a card is data from Chap’s own list of widgets. Costs about 370 tokens a turn; off, replies are plain text as before.",synonyms:["a2ui","cards","rich replies","widgets","generative ui","tables","charts","weather card"],browserOnly:!0,default:!0},{id:"turn-pipeline",key:"ui.turn.pipeline",section:"tools",type:"toggle",label:"Look up each part of a question",help:"An experiment, for a small on-device model asked several things at once: each part is searched, its answer read from the source and checked, and the reply is the sourced facts themselves — with what was not found said plainly — instead of the model’s own summary of everything. Slower, and it needs the gateway’s reranker. Off: each part is searched and the model answers from the results.",synonyms:["turn pipeline","research lane","multi-part question","facts","checked answer","small model","on-device"],default:!1,requires:"gateway"},{id:"tool-result-max",key:"ui.toolResultMaxChars",section:"tools",type:"number",label:"Largest tool result",help:"A result over this many characters is stored and previewed; the model pages it. Lower for small local models.",synonyms:["result size","truncate","shield","max chars"]}]}]},{id:"models",group:"chat",label:"Models",blurb:"Your endpoints, the models on this machine, and every model Chap uses by type",sections:[{id:"endpoints",label:"Endpoints",rows:[{id:"endpoints",key:"endpoints",section:"endpoints",type:"list",label:"Endpoints",help:"Any OpenAI- or Anthropic-compatible API, local or hosted, with its model, key and system prompt.",synonyms:["api","api key","openai","anthropic","ollama","lm studio","openrouter","base url","model","provider","system prompt"]},{id:"add-endpoint",type:"action",label:"Add endpoint",help:"Connect a new API or local server.",synonyms:["new model","connect api"]},{id:"free-endpoint",key:"freeEndpointId",section:"freeSlots",type:"picker",label:"Free plan endpoint",help:"The one endpoint Free unlocks — your pick.",synonyms:["free slot","free pick"]},{id:"webllm-background",key:"ui.webllmBackground",section:"webllm",type:"toggle",label:"Keep the in-browser model loaded",help:"Stays warm across panel open/close so there is no reload wait; uses memory while idle.",synonyms:["webllm","stay warm","background model","webgpu"],browserOnly:!0},{id:"webllm-custom-models",key:"webllmCustomModels",section:"webllm",type:"list",label:"Custom in-browser models",help:"Extra WebLLM models added by id.",synonyms:["webllm","custom model","mlc"],browserOnly:!0}]},{id:"this-machine",label:"On this machine",rows:[{id:"runtime-models",type:"status",label:"Models on this machine",help:"Download, set up and use a model on this computer, in one place: each one the Runtime runs by name with its engine and what it is doing, Use in chat, and Run a model — the engine (llama.cpp, MLX, vLLM, Apple on-device), a model from Hugging Face sized to this machine with its download progress, the context profile, thinking and sampling, extra flags.",synonyms:["local model","llama.cpp","mlx","vllm","gguf","download a model","run a model","hugging face","downloading","context","profile","thinking","reasoning","temperature","sampling","runtime models","on device","use in chat"],requires:"gateway"}]},{id:"model-types",label:"Every model, by type",rows:[{id:"model-catalog",type:"status",label:"Models by type",help:"Every kind of model Chap uses — chat, embeddings, rerank, decide, speech to text, text to speech, entities, web search — each with its providers in order, where each runs (in the gateway, this machine, a container, or a remote service by name) and what it is doing, with the page that sets it up.",synonyms:["model types","reranker","decision model","embedding model","speech model","voice model","entity model","ner","stt","tts","elevenlabs","providers","catalog"],requires:"gateway"},{id:"rt-services",type:"status",label:"Services and switches, by type",help:"Under each type on Models › Every model, by type: its built-in model’s on/off switch and the containers that can do the job — SearXNG for web search, the reranker, vLLM for embeddings or speech — each loopback-only. The first start pulls the image; stop keeps the container. They were a second list on the Runtime page; the Runtime keeps where things run, the container engine and what is running now.",synonyms:["searxng","metasearch","self-hosted search","search service","start searxng","stop searxng","reranker","rerank","decision model","opendecision","decisions","container services","services","turn off reranking","in-process"],requires:"gateway"}]},{id:"what-to-look-up",label:"Deciding what to look up",rows:[{id:"lookup-decider",type:"status",label:"What to look up — decided by",help:"Before a model with a small window answers, one model decides whether the message needs the web, the weather, your own notes and chats, or nothing — and what to search. Pick any model: a chat model (it also writes the search) or a decision model on the Decide job (it only picks the source; the message is searched as written). Blank: this device’s own model (Apple on-device), else the chat’s own. Test runs sixteen messages through it and shows each answer and the score. Every reply says who decided and what.",synonyms:["decider","decision model","decide","turn intent","what to look up","lookups","classifier","modernbert","zero-shot","test decider","decided by"]}]}]},{id:"routing",group:"chat",label:"Routing",blurb:"Every model in use, every model you can add, and which one Auto would pick",sections:[{id:"model-roles",label:"What runs where",rows:[{id:"model-roles",type:"status",label:"Every model in use, by job",help:"Chat, coding agents, entity detection, transcription, voice, speaker identification, ranking, embeddings, decisions — what is in use, where it runs (this device, your server, cloud), and where to change it.",synonyms:["model roles","what runs where","which model","swap model","cloud model","local model","in use","overview"]},{id:"capability-uses",key:"ui.capabilityUses",section:"capabilityUses",type:"list",label:"Where each model may be used",help:"Per job a model serves — dictation, meetings, redaction, routing, search — a switch; off keeps that job from calling it.",synonyms:["use for","model uses","which jobs","do not use for","capability uses"]}]},{id:"model-place",label:"All models",rows:[{id:"model-place",type:"status",label:"Every model, by type",help:"Chat, vision, embeddings, speech to text, text to speech, entity recognition, decisions, ranking — each model with where it runs (a server, in-process, a container, an agent), whether its data leaves the machine, and a way to change or remove it.",synonyms:["all models","model list","by type","vision model","embedding model","speech to text model","whisper","text to speech model","entity model","model registry","discover models"]},{id:"add-model",type:"action",label:"Add a model",help:"Pick what the model does, then where it runs — a server (local or hosted), weights in-process, a container the Runtime starts, or a coding agent — and the one form that follows.",synonyms:["add model","new model","connect model","hosted stt","remote transcription","elevenlabs","add embedding","run vllm"]}]},{id:"routing",label:"Routing",advanced:!0,rows:[{id:"routing-mode",key:"ui.routing.mode",section:"routing",type:"select",label:"Observation",help:"Whether the router records what it would have chosen when it is not the one answering. Visible in Activity.",synonyms:["auto route","model routing","observe","router"],options:[["observe","Record what it would choose"],["off","Off"]]},{id:"routing-decider",key:"ui.routing.decider",section:"routing",type:"toggle",label:"Decision model routes Auto",help:"An experiment: the local decision model picks among the eligible candidates from their cards, the reranker orders the shortlist it reads; the rules answer whenever it cannot. Needs the gateway with a decide provider ready.",synonyms:["decider","class M routing","model picks the model","judge"],default:!1},{id:"routing-models",key:"ui.routing.models",section:"routing",type:"list",label:"What each model is",help:"Cost, speed, reach and abilities per model — detected from name and URL, corrected here. Reset puts a row back.",synonyms:["model facts","reach","cost tier","latency","capabilities"]},{id:"routing-latency",type:"select",label:"Try: max wait",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route","what would auto choose"]},{id:"routing-cost",type:"select",label:"Try: max cost",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route"]},{id:"routing-reach",type:"select",label:"Try: request may reach",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route","device only","cloud"]},{id:"routing-tools",type:"toggle",label:"Try: needs tools",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route"]},{id:"routing-prefer",type:"select",label:"Try: prefer",help:"A test input for the routing preview — changes nothing.",synonyms:["preview route","cheapest","fastest"]}]}]},{id:"agent-tools",group:"chat",label:"Coding Agents",blurb:"Claude Code, Codex, Antigravity and the other coding agents installed on this machine",sections:[{id:"runtime",label:"On this machine",rows:[{id:"local-runtime",type:"status",label:"Local runtime",help:"Whether the gateway and the bridge are installed and running, and which version.",synonyms:["bridge status","gateway status","install","running","version","update"]},{id:"local-recheck",type:"action",label:"Recheck the local runtime",help:"Ask the gateway and bridge again.",synonyms:["refresh status","reconnect"]}]},{id:"agents",label:"Installed agents",rows:[{id:"bridge-agents",key:"agents",section:"agentTools",type:"list",label:"Installed agents",help:"Each CLI the bridge found, with its enabled switch, permission mode, working directory and system prompt.",synonyms:["claude code","codex","antigravity","gemini cli","opencode","pi","aider","harness","agent tools","cli agent","permission mode","working directory"],requires:"bridge"},{id:"add-agent",type:"action",label:"Add agent",help:"Describe a CLI the bridge did not detect.",synonyms:["custom agent","new harness"]},{id:"free-agent",key:"freeAgentId",section:"freeSlots",type:"picker",label:"Free plan agent",help:"The one coding agent Free unlocks — your pick.",synonyms:["free slot","free pick"]}]},{id:"remote-bridge",label:"Remote bridge",advanced:!0,rows:[{id:"bridge-url",key:"bridgeUrl",store:"local",type:"text",label:"Bridge URL",help:"Where this client reaches the bridge. Leave the default for the bridge on this machine.",synonyms:["bridge address","localhost 4319","port"]},{id:"bridge-token",key:"bridgeToken",store:"local",type:"secret",label:"Bridge token",help:"Only for a bridge on another machine — the local one recognises the extension on sight.",synonyms:["remote bridge","auth token","bridge-token file"]},{id:"bridge-test",type:"action",label:"Test the bridge",help:"Reach the bridge at the URL above and list its agents.",synonyms:["check bridge","connect"]}]}]},{id:"tools-mcp",group:"extend",label:"Tools & MCP",blurb:"External tools your agents can call",sections:[{id:"servers",label:"MCP servers",rows:[{id:"mcp-list",key:"mcpServers",section:"mcpServers",type:"list",label:"MCP servers",help:"Streamable HTTP servers, or stdio servers run on your machine through the bridge, with their auth and env.",synonyms:["mcp","model context protocol","tool server","stdio","auth header","env vars"]},{id:"mcp-signins",key:"mcpAuth",section:"mcpAuth",type:"status",label:"Server sign-ins",help:"The remote servers you signed in to, on each server's card. One sign-in serves the extension and the desktop on this computer.",synonyms:["mcp sign in","oauth","mcp login","signed in","sign out","token"]},{id:"add-mcp",type:"action",label:"Add server",help:"Add an MCP server by URL or command.",synonyms:["new mcp"]},{id:"import-mcp",type:"action",label:"Import an MCP config",help:"Paste a Claude Desktop / Cursor / Codex mcpServers JSON block.",synonyms:["import json","claude_desktop_config","mcp.json","paste config"]}]},{id:"discover",label:"Discover",rows:[{id:"mcp-registry-search",type:"text",label:"Search the MCP registry",help:"The official registry and curated public servers, one click to add.",synonyms:["registry","catalog","public servers","find mcp"]}]}]},{id:"web-search",group:"extend",label:"Web search",blurb:"Live results as context for any model",sections:[{id:"search",label:"Search",rows:[{id:"pref-websearch-enabled",key:"ui.webSearch.enabled",section:"webSearch",type:"toggle",label:"Web search",help:"Type /search anywhere in a message, or let the model call it when a question needs the web.",synonyms:["internet","google","live results","/search","browse"],default:!0},{id:"websearch-engines",key:"ui.webSearch.engines",section:"webSearch",type:"list",label:"Search engines",help:"Engines use a %s or {q} placeholder and must return server-rendered HTML.",synonyms:["engine","duckduckgo","startpage","brave","bing","searx"]},{id:"add-websearch",type:"action",label:"Add engine",help:"Add a search engine by URL template.",synonyms:["new engine","custom search"]},{id:"websearch-apis",key:"ui.webSearch.apis",section:"webSearch",type:"list",label:"Search APIs",help:"Exa, Brave, Tavily, Serper, SerpApi, Google or Jina with your key, or any search API you describe. One you added a key for is asked first; Mwmbl needs no key and takes turns with the engines.",synonyms:["exa","tavily","serper","serpapi","brave api","google programmable search","jina search","mwmbl","search api","search key","api key"]},{id:"add-websearch-api",type:"action",label:"Add search API",help:"Pick a provider and paste its key, or describe your own: the URL, headers, body and where the results are in the answer.",synonyms:["new search api","custom search api","any search api"]},{id:"pref-websearch-per",key:"ui.webSearch.perEngine",section:"webSearch",type:"number",label:"Results per engine",help:"How many hits each engine contributes.",synonyms:["result count"]},{id:"pref-websearch-pages",key:"ui.webSearch.maxPages",section:"webSearch",type:"number",label:"Pages to read & rank",help:"How many result pages are fetched and ranked before the best are attached.",synonyms:["page count","fetch pages"]}]},{id:"reader",label:"Reader & fallback",advanced:!0,rows:[{id:"pref-websearch-reader",key:"ui.webSearch.reader.enabled",section:"webSearch",type:"toggle",label:"Use a reader service",help:"Fetch each result as LLM-ready Markdown instead of parsing site HTML. Anonymous Jina is blocked, so bring a key.",synonyms:["jina","markdown reader","r.jina.ai"]},{id:"pref-websearch-reader-url",key:"ui.webSearch.reader.url",section:"webSearch",type:"text",label:"Reader URL",help:"The reader service endpoint.",synonyms:["reader endpoint"]},{id:"pref-websearch-reader-key",key:"ui.webSearch.reader.key",section:"webSearch",type:"secret",label:"Reader API key",help:"Sent as a Bearer token; optional.",synonyms:["reader token","jina key"]},{id:"pref-websearch-tabfallback",consent:!0,key:"ui.webSearch.tabFallback",section:"webSearch",type:"toggle",label:"Background-tab render as a last resort",help:"A page that cannot be fetched is opened in a background tab so its JavaScript runs. Off by default.",synonyms:["render tab","javascript pages","serp fallback"],browserOnly:!0}]}]},{id:"skills",group:"extend",label:"Skills",blurb:"Reusable prompts, slash-commands and recipes",sections:[{id:"skills",label:"Skills",rows:[{id:"skills",key:"skills",section:"skills",type:"list",label:"Skills",help:"Prompts you drop into any chat with the button, by /command, or with #Skill in Notes. Editing the built-ins is free; your own are Pro.",synonyms:["slash command","prompt template","custom prompt","skill"]},{id:"skill-filter",type:"text",label:"Filter skills",help:"Narrow the list by name or command.",synonyms:["search skills","find skill"]},{id:"add-skill",type:"action",label:"Add skill",help:"Write a new skill.",synonyms:["new skill","create prompt"],pro:!0},{id:"reset-skills",type:"action",label:"Reset built-in skills",help:"Put every built-in back to its shipped prompt; yours are untouched.",synonyms:["restore defaults","reset prompts"]}]},{id:"recipes",label:"Recipes",rows:[{id:"recipes",key:"recipes",section:"recipes",type:"list",label:"Recipes",help:"Workflows written down once — proposed in chat, approved, run by /name.",synonyms:["workflow","macro","saved steps","recipe"]}]},{id:"machine",label:"On this machine",rows:[{id:"skill-source-search",type:"text",label:"Search skills on this machine",help:"Every skill installed for Claude Code, Codex, Copilot, Antigravity, Hermes and ~/.agents/skills, found by the bridge.",synonyms:["installed skills","local skills","agents skills","found by the bridge"],requires:"bridge"},{id:"skill-dirs-input",key:"ui.skillDirs",section:"skillDirs",type:"textarea",label:"Custom skill folders",help:"Folders the bridge serves alongside the built-in agent locations. Applied on the next rescan.",synonyms:["skill folder","skill directory","skill path"],requires:"bridge"},{id:"skill-sources-refresh",type:"action",label:"Rescan skill folders",help:"Ask the bridge to look again.",synonyms:["rescan","refresh skills"],requires:"bridge"}]}]},{id:"agent-teams",group:"extend",label:"Agent Teams",blurb:"The agents you define and the teams they work in",sections:[{id:"agents",label:"Agents",rows:[{id:"directory",key:"agentPool",section:"agents",type:"list",label:"Agents",help:"Cards with a name, a specialty, an engine and grants — the roster a team is staffed from.",synonyms:["agent pool","roster","directory","specialist","engine","grants"]}]},{id:"teams",label:"Teams",rows:[{id:"teams",key:"teams",section:"teams",type:"list",label:"Teams",help:"A named set of roles with prompts, tiers and grants, run by /team or from a note.",synonyms:["team","swarm","roles","multi-agent"]}]},{id:"dashboard",label:"Live",rows:[{id:"open-teams-dashboard",key:"projects",section:"projects",type:"link",label:"Agent Teams dashboard",help:"Projects, the board and Observe — where each run is, what it asked you, and what it did.",synonyms:["board","projects","observe","kanban","runs","in flight","inbox","trail","approvals","dashboard"]}]}]},{id:"link",group:"extend",label:"Link",blurb:"Reach this computer from your phone, a server you trust or a chat app",sections:[{id:"phones",label:"Phones",rows:[{id:"link-pair",type:"action",label:"Link a phone",help:"Shows a code to scan with Chap on your phone. The phone then reaches this computer’s models and agents from anywhere, end-to-end encrypted — no port is opened here.",synonyms:["pair phone","phone companion","qr code","connect phone","link","mobile","your phone"],requires:"gateway"},{id:"link-devices",type:"list",label:"Linked phones",help:"Each phone linked to this computer, whether it is connected now, and Remove to unlink it — the relay forgets it at once.",synonyms:["paired phones","unlink phone","remove phone"],requires:"gateway"},{id:"link-agent-sessions",consent:!0,store:"gateway",type:"toggle",label:"Agent sessions on your phone",help:"Let a linked phone list and continue this computer’s Claude Code and Codex sessions.",synonyms:["resume","claude code sessions","codex sessions","phone agents"],requires:"gateway"}]},{id:"servers",label:"Servers",rows:[{id:"link-partner-pair",type:"action",label:"Connect a server",help:"Let a service you use reach this computer’s models: name it, choose what it may reach, read exactly what it gets, then confirm for a one-use code to paste into it. Coding agents stay off unless you tick them.",synonyms:["partner","server","connect server","api access","remote access","server-side","pairing code","cplink"],requires:"gateway"},{id:"link-partners",type:"list",label:"Servers you let in",help:"Each server you let in, what it may reach, its route and when it was last seen. Revoke cuts it off at once: its key is forgotten and its connection closed.",synonyms:["partner servers","revoke server","remove server","who can reach this computer"],requires:"gateway"}]},{id:"route",label:"Route",rows:[{id:"link-route",consent:!0,store:"gateway",type:"select",label:"How devices reach this computer",help:"ChatPanel Link (the hosted relay), your Tailscale or Cloudflare Tunnel, or a relay you run — who can reach it, and who pays. Applies to phones and to servers connected from now on; a connected server keeps the route it was paired on.",synonyms:["tunnel","tailscale","cloudflare","relay","self-hosted","route"],requires:"gateway"}]},{id:"telegram",label:"Telegram",rows:[{id:"ch-token",store:"local",type:"secret",label:"Bot token",help:"From @BotFather. Checked with Telegram before it is stored — on this machine, in a file only you can read.",synonyms:["telegram","botfather","bot","phone","whatsapp","channels","chat app"],requires:"bridge"},{id:"ch-connect",type:"action",label:"Connect Telegram",help:"Start polling with the token above. Becomes Connected · Disconnect once it is.",synonyms:["start bot","link telegram"],requires:"bridge"},{id:"ch-agent",consent:!0,store:"gateway",type:"picker",label:"Agent that answers",help:"Which of your agents replies to paired phones.",synonyms:["telegram agent","answering agent"],requires:"telegram"},{id:"ch-privacy",store:"gateway",type:"select",label:"What comes back to Telegram",help:"Telegram is a third party: redact personal details on the way out, and mask credentials on the way back.",synonyms:["telegram redaction","channel privacy","mask secrets"],requires:"telegram"},{id:"ch-disconnect",type:"action",label:"Disconnect Telegram",help:"Stops polling, deletes the stored token and unpairs every phone.",synonyms:["stop bot","remove telegram"],requires:"telegram"},{id:"ch-pair",type:"action",label:"Pair a phone with the bot",help:"A single-use code, scanned once in Telegram; the phone can read your files and cannot write, run commands or reach the web.",synonyms:["pair","qr code","enroll phone","add phone"],requires:"telegram"}]}]},{id:"connections",group:"extend",label:"Connections",blurb:"The code hosts the bridge holds tokens for",sections:[{id:"hosts",label:"Code hosts",rows:[{id:"connections",key:"connections",section:"connections",type:"list",label:"Connections",help:"GitHub, GitLab and the other SCM hubs — kind and host travel, the token stays in this machine’s keychain.",synonyms:["github","gitlab","bitbucket","scm","source control","personal access token","repo access"],requires:"bridge"}]}]},{id:"redaction",group:"privacy",label:"Redaction",blurb:"PII replaced before it reaches a model, restored in the reply",sections:[{id:"mode",label:"Mode",rows:[{id:"priv-mode",stricter:{order:["off","deterministic"],unset:"off"},key:"ui.piiRedaction.mode",section:"redaction",type:"select",label:"Redaction",help:"Off, patterns only (emails, phones, cards, keys, IPs + your dictionary), or patterns plus AI detection of names, orgs and locations.",synonyms:["pii","privacy","anonymize","mask","redact","sensitive","placeholder"],quick:!0,options:[["off","Off"],["deterministic","On — patterns + dictionary"],["model","On — + AI detection"]]},{id:"priv-applyto",stricter:{order:["remote","all"],unset:"all"},key:"ui.piiRedaction.applyTo",section:"redaction",type:"select",label:"Redact for",help:"Every model, or remote only — a localhost model keeps data on-device already.",synonyms:["local models","remote only","cloud only","skip local"],options:[["all","All chat models"],["remote","Remote models only"]]}]},{id:"detection",label:"Detection",rows:[{id:"priv-det-backend",key:"ui.piiRedaction.detection.backend",section:"redaction",type:"select",label:"Detector",help:"What finds names, orgs and locations: the gateway’s bundled NER, a NER service by URL, or one of your models. Your text reaches the detector, so keep it local.",synonyms:["ner","entity detection","name detection","detector backend"],pro:!0,options:[["off","Off"],["bundled","Bundled NER (gateway)"],["endpoint","Custom PII service (URL)"],["agent","A configured API / agent"]]},{id:"priv-det-target",key:"ui.piiRedaction.detection.targetId",section:"redaction",type:"picker",label:"Detection model",help:"Which of your APIs or agents runs detection, when the detector is a model.",synonyms:["detector model","api / agent"],pro:!0},{id:"priv-det-tmodel",key:"ui.piiRedaction.detection.model",section:"redaction",type:"text",label:"Detection model name",help:"The model id an agent should use for detection.",synonyms:["detector model id"],pro:!0},{id:"priv-det-url",key:"ui.piiRedaction.detection.url",section:"redaction",type:"text",label:"Detector URL",help:'A NER service: POST {"text"} → {"entities":[{value,type}]}.',synonyms:["ner url","ner endpoint","ner service"],pro:!0},{id:"priv-det-timeout",key:"ui.piiRedaction.detection.timeoutMs",section:"redaction",type:"number",label:"Detector timeout",help:"Milliseconds before a slow detector is skipped for the turn.",synonyms:["ner timeout","detection timeout"],pro:!0},{id:"priv-ner-check",type:"action",label:"Check NER health",help:"Send a test sentence to the detector.",synonyms:["test detector","ner status"]},{id:"priv-strictness",stricter:{order:["balanced","strict"],unset:"balanced"},key:"ui.piiRedaction.strictness",section:"redaction",type:"select",label:"Strictness",help:"Balanced checks the detections known to be wrong — a lowercase question read as a company name, an amount read as an address — and leaves them in. Strict redacts everything a detector finds, even when that hides part of your question.",synonyms:["strict","strict redaction","aggressive","paranoid","false positives","over-redaction","redaction level","sensitivity"],pro:!0,options:[["balanced","Balanced"],["strict","Strict"]]},{id:"priv-det-person",stricter:!0,key:"ui.piiRedaction.detection.types.person",section:"redaction",type:"toggle",label:"Redact people (names)",help:"Person names become [[PERSON_n]].",synonyms:["names","person"],pro:!0,default:!0},{id:"priv-det-org",stricter:!0,key:"ui.piiRedaction.detection.types.org",section:"redaction",type:"toggle",label:"Redact organizations",help:"Company and org names become [[ORG_n]].",synonyms:["companies","organisations","org"],pro:!0,default:!0},{id:"priv-det-location",stricter:!0,key:"ui.piiRedaction.detection.types.location",section:"redaction",type:"toggle",label:"Redact locations",help:"Cities and places become [[LOCATION_n]].",synonyms:["places","cities","addresses","location"],pro:!0,default:!0},{id:"priv-det-number",stricter:!0,key:"ui.piiRedaction.detection.types.number",section:"redaction",type:"toggle",label:"Redact numbers & IDs",help:"Account numbers, IDs and other numeric identifiers.",synonyms:["ids","account numbers","numeric"],pro:!0,default:!0}]},{id:"dictionary",label:"Dictionary",rows:[{id:"priv-dictionary",key:"ui.piiRedaction.dictionary",section:"redaction",type:"textarea",label:"Dictionary",help:"One entry per line: term => LABEL redacts reversibly, term -> alias pseudonymizes permanently, /regex/flags also works. Free applies the first 5.",synonyms:["custom terms","pseudonym","alias","regex","always redact","word list"]}]},{id:"scope",label:"Scope",rows:[{id:"priv-scope-chat",stricter:!0,key:"ui.piiRedaction.scope.chat",section:"redaction",type:"toggle",label:"Redact chat messages",help:"What you type.",synonyms:["scope chat","messages"],default:!0},{id:"priv-scope-context",stricter:!0,key:"ui.piiRedaction.scope.context",section:"redaction",type:"toggle",label:"Redact page & meeting context",help:"Attached pages and live captions.",synonyms:["scope page","scope meeting","context"],pro:!0,default:!0},{id:"priv-scope-history",stricter:!0,key:"ui.piiRedaction.scope.history",section:"redaction",type:"toggle",label:"Redact history search results",help:"Past chats, notes and meetings pulled into a turn.",synonyms:["scope history"],pro:!0,default:!0},{id:"priv-scope-tools",stricter:!0,key:"ui.piiRedaction.scope.toolResults",section:"redaction",type:"toggle",label:"Redact tool results",help:"What tools return before the model reads it.",synonyms:["scope tools","tool output"],pro:!0,default:!0},{id:"priv-tooldata",stricter:{order:["real","redactRemote"],unset:"real"},key:"ui.piiRedaction.toolData",section:"redaction",type:"select",label:"Tools receive",help:"Real values so lookups work, or the redacted token so PII never reaches a remote MCP server. Local tools always get real values.",synonyms:["tool arguments","mcp sees","real values","redact remote"],options:[["real","Real values"],["redactRemote","Redact for remote (MCP) tools"]]}]},{id:"ner-model",label:"NER model",rows:[{id:"gw-ner-search",store:"gateway",type:"picker",label:"NER model",help:"The on-device model behind Bundled NER — used by the panel’s redaction and the gateway’s. A bigger model is more accurate but a larger download.",synonyms:["ner model","download ner","multilingual ner","deid","hugging face"],requires:"gateway"}]},{id:"try",label:"Try it",advanced:!0,rows:[{id:"priv-flow-input",type:"textarea",label:"Test a prompt end-to-end",help:"See what is detected, what the model sees, what tools receive, and what you get back.",synonyms:["preview redaction","test redaction","what does the model see","pipeline"]},{id:"priv-flow-model",type:"picker",label:"Test with model",help:"Which model answers the test prompt.",synonyms:["test model"]},{id:"priv-flow-run",type:"action",label:"Run the redaction test",help:"Send the test prompt through the whole pipeline.",synonyms:["run test"]},{id:"priv-flow-preview",type:"action",label:"Preview redaction only",help:"Show what would be redacted without calling a model.",synonyms:["dry run","preview"]}]}]},{id:"internal-sites",group:"privacy",label:"Internal sites",blurb:"Content from these never leaves your machine",sections:[{id:"boundary",label:"Data boundary",rows:[{id:"internal-guard",stricter:!0,key:"privacy.internalGuard",section:"internalSites",type:"toggle",label:"Keep content from internal sites on this device",help:"When a turn draws on an internal source, only a local model may answer it — whichever model is selected.",synonyms:["intranet","internal","private network","data boundary","on-device only","source gate"],default:!0},{id:"internal-ceiling",stricter:{order:["trusted","device"],unset:"device"},key:"privacy.internalCeiling",section:"internalSites",type:"select",label:"Where these may be answered",help:"On this device only, or also by an endpoint you marked trusted.",synonyms:["ceiling","trusted endpoint","allowed models"],options:[["device","This device only"],["trusted","My workspace (gateway or trusted endpoint)"]]}]},{id:"domains",label:"Domains",rows:[{id:"internal-catalog",key:"privacy.internalPatterns",section:"internalSites",type:"list",label:"Addresses treated as internal",help:"Private ranges, .local, .internal and the rest — on by default; untick any that are not internal for you.",synonyms:["localhost",".local",".internal","private ip","defaults"]},{id:"internal-patterns",key:"privacy.internalPatterns",section:"internalSites",type:"textarea",label:"My own internal domains",help:"One per line; a domain covers its subdomains.",synonyms:["custom domain","company domain","add domain"]},{id:"internal-restore",type:"action",label:"Restore all default internal addresses",help:"Tick every built-in pattern again.",synonyms:["reset internal","restore defaults"]}]}]},{id:"gateway",group:"privacy",label:"Gateway",blurb:"An optional local process: on-device models, routing, and redaction for tools outside the panel",sections:[{id:"install",label:"Install",rows:[{id:"gw-install",type:"status",label:"Install the gateway",help:"Whether the gateway is installed and running on this machine, which version, and the one command that installs or updates it. It brings the bridge (your local coding agents) with it.",synonyms:["install gateway","download gateway","update gateway","gateway version","setup","get started"]}]},{id:"connection",label:"Connection",rows:[{id:"gw-url",key:"gatewayUrl",store:"local",type:"text",label:"Gateway URL",help:"Where this client reaches the gateway. Leave the default for the gateway on this machine.",synonyms:["gateway address","localhost 4320","port","connect gateway"]},{id:"gw-check",type:"action",label:"Check the gateway",help:"Reach the gateway and read its version. Install → Running · Update once it is.",synonyms:["gateway status","install gateway","is the gateway running","install.sh"]}]},{id:"redaction",label:"Redaction for other clients",rows:[{id:"gw-tier",store:"gateway",type:"select",label:"Gateway redaction tier",help:"What the gateway redacts for traffic that does not go through the panel — OpenCode, Pi, aider.",synonyms:["gateway redaction","proxy redaction","opencode","aider"],requires:"gateway"},{id:"gw-redact-system",store:"gateway",type:"toggle",label:"Redact the system prompt too",help:"Apply redaction to the system message as well as user turns.",synonyms:["system prompt redaction"],requires:"gateway"},{id:"gw-det-backend",store:"gateway",type:"select",label:"Gateway detector",help:"The gateway’s own NER choice. Local options keep the raw text on your machine; a cloud one sends it there.",synonyms:["gateway ner","gateway detector"],requires:"gateway"},{id:"gw-det-url",store:"gateway",type:"text",label:"Gateway detector URL",help:"A NER service or model endpoint the gateway calls.",synonyms:["gateway ner url"],requires:"gateway"},{id:"gw-det-model",store:"gateway",type:"text",label:"Gateway detector model",help:"The model id, when the detector is an LLM.",synonyms:["gateway ner model"],requires:"gateway"},{id:"gw-det-key",store:"gateway",type:"secret",label:"Gateway detector API key",help:"Only for a hosted detector.",synonyms:["gateway ner key"],requires:"gateway"},{id:"gw-det-timeout",store:"gateway",type:"number",label:"Gateway detector timeout",help:"Milliseconds before a slow detector is skipped.",synonyms:["gateway ner timeout"],requires:"gateway"},{id:"gw-ner-check",type:"action",label:"Check the gateway’s NER health",help:"Send a test sentence through the gateway’s detector.",synonyms:["gateway ner test"],requires:"gateway"},{id:"gw-dictionary",store:"gateway",type:"textarea",label:"Gateway dictionary",help:"Separate from the panel’s — applies to traffic the gateway sees. Same grammar.",synonyms:["gateway terms","gateway alias"],requires:"gateway"},{id:"gw-dict-copy",type:"action",label:"Copy the panel’s dictionary to the gateway",help:"One click to keep both the same.",synonyms:["sync dictionary"],requires:"gateway"}]},{id:"routing",label:"Routing",rows:[{id:"gw-dest-trigger",store:"gateway",type:"picker",label:"Destinations",help:"Which of your APIs and agents the gateway routes to; clients pick one by model name via /v1/models.",synonyms:["gateway models","v1/models","route to","destinations"],requires:"gateway"},{id:"gw-tools-data",store:"gateway",type:"select",label:"Gateway tools receive",help:"Real values so a client’s tool works, or the redacted token for remote MCP tools.",synonyms:["gateway tool data","gateway mcp sees"],requires:"gateway"},{id:"gw-tools-narrow",store:"gateway",type:"toggle",label:"Auto-narrow to the most relevant tools",help:"When a client sends many MCP tools, forward only the top-K for this message. Core tools are always kept.",synonyms:["narrow tools","top-k tools"],requires:"gateway"},{id:"gw-tools-cap",store:"gateway",type:"number",label:"Max MCP tools per turn (gateway)",help:"The K in top-K.",synonyms:["gateway tool cap"],requires:"gateway"},{id:"gw-tools-narrowall",store:"gateway",type:"toggle",label:"Also narrow non-MCP tools",help:"Only if your client has no essential core tools.",synonyms:["narrow all tools"],requires:"gateway"}]},{id:"agents",label:"Agents through the gateway",rows:[{id:"gw-agent-perm",store:"gateway",type:"select",label:"Permissions for agents through the gateway",help:"What a CLI agent may do when another client — the desktop, OpenCode — reaches it through the gateway. The panel’s own agents use their card’s setting.",synonyms:["gateway permissions","permission mode","accept edits","bypass"],requires:"gateway"},{id:"gw-agent-workdir",store:"gateway",type:"text",label:"Working directory for agents through the gateway",help:"Where those agents start.",synonyms:["gateway workdir","cwd"],requires:"gateway"}]},{id:"monitoring",label:"Monitoring",rows:[{id:"gw-log",store:"gateway",type:"toggle",label:"Log requests",help:"Counts and per-stage latency, no values.",synonyms:["gateway log","request log","observability"],requires:"gateway"},{id:"gw-log-detail",store:"gateway",type:"toggle",label:"Capture redaction detail",help:"Expand a request to see what was redacted — types and tokens only, or real values kept in memory.",synonyms:["redaction detail","what was redacted","log values"],requires:"gateway"},{id:"gw-logs-refresh",type:"action",label:"Recent gateway requests",help:"The last requests the gateway handled.",synonyms:["recent requests","gateway history"],requires:"gateway"},{id:"gw-test-input",type:"textarea",label:"Test a prompt through the gateway",help:"What is detected, what the destination sees, and the restored reply.",synonyms:["gateway test","try gateway"],requires:"gateway"}]},{id:"advanced",label:"Advanced",advanced:!0,rows:[{id:"gw-origins",store:"gateway",type:"textarea",label:"Allowed browser origins",help:"Only if a web app should call the gateway. Local CLI tools need nothing here.",synonyms:["cors","origins","allow origin","browser app"],requires:"gateway"},{id:"gw-token",key:"gatewayToken",store:"local",type:"secret",label:"Gateway admin token",help:"Only for older gateways — a current one authorizes the extension automatically.",synonyms:["gateway-token","admin token","auth"]},{id:"gw-pro-activate",type:"action",label:"Activate Pro on the gateway",help:"Hands your ChatPanel Pro to the gateway — nothing to paste.",synonyms:["gateway pro","entitlement"],requires:"gateway"},{id:"gw-pro-token",store:"gateway",type:"secret",label:"Entitlement token",help:"Paste a token manually if activation cannot reach the gateway.",synonyms:["entitlement token","license token"],requires:"gateway"},{id:"gw-save",type:"action",label:"Save to gateway",help:"Write the gateway settings above.",synonyms:["save gateway"],requires:"gateway"}]}]},{id:"runtime",group:"privacy",label:"Runtime",blurb:"What each process Chap runs for you may touch: the sandbox, its network, and what is running now",sections:[{id:"sandbox",label:"Access & sandbox",rows:[{id:"rt-sandbox-status",type:"status",label:"Process sandbox",help:"Whether the agents, MCP servers and workers started for you run inside the sandbox runtime, and why not when they do not.",synonyms:["sandbox status","srt","seatbelt","isolation","sandboxed"],requires:"bridge"},{id:"rt-sandbox-mode",store:"gateway",type:"select",label:"Network",help:"Open lets a process reach any public host through the sandbox proxy (never your machine, your network or a cloud metadata address). Allow list lets it reach only its own service, the developer hosts and what you add below or on the agent, server or skill. Off runs processes outside the sandbox.",synonyms:["sandbox mode","network mode","allowlist","egress","outbound","firewall"],requires:"gateway",options:[["open","Open (any public host)"],["allowlist","Allow list"],["off","Off (no sandbox)"]]},{id:"rt-sandbox-hosts",store:"gateway",type:"textarea",label:"Services agents may reach",help:"Added to every allow list: one host per line, or comma separated — graph.microsoft.com, *.example.com, host:port. An agent, an MCP server or a skill adds its own on its card.",synonyms:["allowed hosts","extra hosts","allow host","allow service","allow a service","grant access","give access","access","domain allowlist","outlook","jira"],requires:"gateway"},{id:"rt-sandbox-runtime",store:"gateway",type:"select",label:"Sandbox",help:"What isolates every agent, MCP server and worker. ChatPanel’s sandbox (the default) needs nothing else installed. A container runs each one from an image you name, with Podman or Docker. Your own sandbox command wraps each one in the tool you choose — firejail, nsjail, gVisor, your company’s — with {cmd} where the command goes. Managed by your organisation: your agents already run inside your company’s sandbox, so ChatPanel does not add a second one.",synonyms:["sandbox runtime","srt","container","docker","podman","firejail","nsjail","gvisor","bubblewrap","own sandbox","company sandbox","managed sandbox","bring your own sandbox"],requires:"gateway",options:[["srt","ChatPanel’s sandbox"],["container","A container (Podman or Docker)"],["command","Your own sandbox command"],["managed","Managed by your organisation"]]},{id:"rt-sandbox-command",store:"gateway",type:"text",label:"Sandbox command",help:"Your sandbox tool, with {cmd} where the command goes — e.g. firejail --quiet --private={workdir} -- {cmd}. Also {workdir}, {home}, {hosts}, {mode}. Words are split on spaces; a JSON array keeps a word with a space whole. Never run through a shell.",synonyms:["wrapper","sandbox wrapper","firejail","nsjail","runsc","custom sandbox"],requires:"gateway"},{id:"rt-sandbox-image",store:"gateway",type:"text",label:"Container image",help:"The image each process runs in — it must carry the agent CLIs you use (Claude Code, Codex). Signed-in sessions on this computer are not carried in: an agent in a container uses an API key.",synonyms:["image","docker image","podman image","container image"],requires:"gateway"},{id:"rt-sandbox-required",store:"gateway",type:"toggle",label:"Require the sandbox",help:"Refuse to run an agent, MCP server or worker the sandbox cannot be applied to — instead of running it as you and saying so. An agent you allowed to run outside the sandbox still may, unless your organisation requires the sandbox.",synonyms:["required","fail closed","never unsandboxed","strict sandbox","refuse unsandboxed"],requires:"gateway"},{id:"rt-sandbox-reads",store:"gateway",type:"select",label:"What agents may read",help:"Everything but your secrets (the default): a process may read most of this computer, except ~/.ssh, ~/.aws, the ChatPanel store, the rest of the built-in list and the folders below. Only their own folder: your home folder is closed to it, except its working folder, the tools it runs with, the folders you let agents use and the sign-ins you allowed — the choice for agents a partner server drives. A tool installed under your home folder may then need its folder added under Folders agents may use.",synonyms:["sandbox reads","read access","read only working folder","restrict reads","inverted","home folder","privacy","partner agents"],requires:"gateway",options:[["enumerated","Everything but your secrets"],["inverted","Only their own folder (and the tools they use)"]]},{id:"rt-sandbox-write",store:"gateway",type:"textarea",label:"Folders agents may use",help:"Beyond the working directory, the temp dir and the tool caches. One path per line; ~ is your home. A folder listed here is passed to the coding agent itself as well as to the sandbox, so the agent can actually write there — add it once and it stays until you remove it. Credential folders (~/.ssh, ~/.aws, the ChatPanel store) can never be added.",synonyms:["writable paths","allow write","write access","allow folder","allow a folder","allow directory","give access to a folder","grant access","give access","folder access","project folder","access","permission","revoke access","stop asking"],requires:"gateway"},{id:"rt-sandbox-deny",store:"gateway",type:"textarea",label:"Folders no agent may read",help:"Added to the built-in secrets: ~/.ssh, ~/.aws, ~/.kube, the ChatPanel store and the rest. One path per line.",synonyms:["deny read","protected paths","secrets","hide folder","block folder","deny folder","revoke access"],requires:"gateway"}]},{id:"processes",label:"Running now",rows:[{id:"rt-processes",type:"status",label:"Processes",help:"Every agent turn, warm agent session, MCP server, probe and worker running for you right now, with how each is isolated: the layer, the runtime, the kit, and any hosts it was granted beyond its own.",synonyms:["running processes","mcp servers running","what is running","process list","srt processes","sandboxed processes"],requires:"bridge"},{id:"rt-containers",type:"status",label:"Containers",help:"Every container the engine on this machine has, running or not — ChatPanel’s marked, the rest yours.",synonyms:["containers","podman ps","docker ps","running containers"],requires:"gateway"},{id:"rt-refused",type:"status",label:"Refused hosts",help:"The hosts a process tried to reach and the sandbox refused, most recent first — each with a one-click allow: for that server or agent, or for every process.",synonyms:["refused","blocked host","denied host","allow host","one-click allow","violations"],requires:"bridge"},{id:"rt-recheck",type:"action",label:"Refresh",help:"Ask the bridge again.",synonyms:["refresh processes"]}]},{id:"services",label:"Engines & services",rows:[{id:"rt-engine",type:"status",label:"Container engine",help:"Whether Podman (or Docker) is on this machine and can run a container now. Without one, the command to install Podman for this platform — you run it, the gateway never does.",synonyms:["podman","docker","container","install podman","engine"],requires:"gateway"},{id:"rt-engine-start",type:"action",label:"Start the engine",help:"Podman on macOS and Windows runs containers in a machine: made on first start, then started.",synonyms:["podman machine","start podman"],requires:"gateway"}]}]},{id:"memory",group:"workspace",label:"Memory",blurb:"What every model already knows about you",sections:[{id:"memory",label:"Memory",rows:[{id:"memory-enabled",key:"ui.memory.enabled",section:"memory",type:"toggle",label:"Memory",help:'Short, durable facts carried into every conversation and offered to any MCP client through the gateway. Say "remember that…" to add one.',synonyms:["remember","facts about me","personalization","long-term memory"],default:!0},{id:"memory-inprompt",key:"ui.memory.inPrompt",section:"memory",type:"select",label:"In the prompt",help:"How much of your memory rides in the system prompt on every turn versus being fetched by the memory tool.",synonyms:["system prompt memory","memory tool","in-prompt"],options:[["preferences","Only how I want answers"],["all","Everything relevant"],["off","Nothing — the model asks the memory tool"]]},{id:"memory-offers",key:"ui.memory.offers",section:"memory",type:"toggle",label:"Offer to remember things I mention in passing",help:"A one-tap Remember chip above the composer; nothing is saved without your tap.",synonyms:["remember chip","suggest memory","offers"],default:!0}]},{id:"stored",label:"Stored memories",rows:[{id:"memory-list",type:"list",label:"Stored memories",help:"Every fact, in full, with where it came from — edit in place or forget.",synonyms:["memories","what does it know","forget","edit memory"]},{id:"memory-add",type:"action",label:"Add a memory",help:"Write a fact yourself.",synonyms:["new memory"]},{id:"memory-clear",type:"action",label:"Forget all memories",help:"Delete every stored memory.",synonyms:["clear memory","delete all","forget everything"]}]}]},{id:"notes",group:"workspace",label:"Notes",blurb:"Your private, on-device writing workspace",sections:[{id:"cowriter",label:"Co-writer",rows:[{id:"notes-cowriter-enabled",store:"local",type:"toggle",label:"Co-writer",help:"An editor fixes typos on a pause, a researcher surfaces related material, a writer drafts ahead on ⌘↵. Off by default — it calls models as you type.",synonyms:["cowriter","writing assistant","grammar","draft ahead","swarm"]}]},{id:"autocomplete",label:"Inline autocomplete",rows:[{id:"notes-ac-enabled",key:"ui.notes.autocomplete.enabled",section:"notes",type:"toggle",label:"Inline autocomplete in notes",help:"Grey ghost text on a pause; Tab accepts. Accepted text is attributed to the model.",synonyms:["ghost text","notes completion","tab to accept"]},{id:"notes-ac-model",key:"ui.notes.autocomplete.agentId",section:"notes",type:"picker",label:"Notes autocomplete model",help:"A small, fast one; uses its autocomplete model when set.",synonyms:["notes model","completion model"]}]},{id:"commands",label:"Note commands",rows:[{id:"notes-tool-websearch",consent:!0,key:"ui.notes.tools.webSearch",section:"notes",type:"toggle",label:"@insert may use web search",help:"Fetch live results for @insert, @table and @list.",synonyms:["@insert","note tools","web in notes"],default:!0},{id:"notes-tool-mcp",consent:!0,key:"ui.notes.tools.mcp",section:"notes",type:"toggle",label:"@insert may use MCP tools",help:"Your connected external tools, from a note.",synonyms:["@insert","mcp in notes"],default:!0},{id:"notes-tool-history",consent:!0,key:"ui.notes.tools.history",section:"notes",type:"toggle",label:"@insert may search history",help:"Your own notes, chats and meetings, from a note.",synonyms:["@insert","history in notes"],default:!0}]},{id:"dashboard",label:"Open",rows:[{id:"open-notes-dashboard",type:"link",label:"Open the notes dashboard",help:"The full-screen notes workspace.",synonyms:["notes page","open notes"]}]}]},{id:"meetings",group:"workspace",label:"Meetings",blurb:"Live scribe for Zoom, Meet, Teams and Webex — captions only, never audio",sections:[{id:"live-notes",label:"Live notes",rows:[{id:"pref-live-notes",key:"ui.liveNotesIntervalMin",section:"meetings",type:"select",label:"Auto-refresh notes",help:"How often new captions are merged into the running summary and saved.",synonyms:["live summary","refresh interval","scribe"],pro:!0,options:[["0","Off — summarize only when I ask"],["1","Every 1 minute"],["2","Every 2 minutes"],["5","Every 5 minutes"],["10","Every 10 minutes"]]},{id:"pref-meeting-window",key:"ui.meetingWindowMin",section:"meetings",type:"select",label:"Transcript sent per question",help:"The full transcript for short calls, a window for long ones — keeps the prompt and cost from growing.",synonyms:["transcript window","context window","minutes"],pro:!0,options:[["0","Full transcript so far"],["5","Last 5 minutes"],["10","Last 10 minutes"],["20","Last 20 minutes"],["30","Last 30 minutes"]]},{id:"pref-meeting-summary-style",key:"ui.meetingSummaryStyle",section:"meetings",type:"select",label:"Live summary style",help:"Concise keeps it short and cheap; Detailed produces full minutes. Either can be regenerated per meeting.",synonyms:["concise","detailed","minutes","summary length"],pro:!0,options:[["concise","Concise"],["detailed","Detailed — full minutes"]]},{id:"pref-meeting-auto-open",key:"ui.meetingAutoOpen",section:"meetings",type:"toggle",label:"Open Chap when a meeting starts",help:"The side panel opens once you are in a Zoom, Meet, Teams or Webex call — not on their home pages or waiting rooms. If the browser holds it back, it opens on your first click in the call. Chrome and Edge.",synonyms:["auto open","open automatically","open on meeting","side panel on join","pop up","meeting opens chap"],browserOnly:!0,default:!0},{id:"pref-alert-sound",key:"ui.alertSound",section:"meetings",type:"toggle",label:"Sound an alert when a timer or reminder fires",help:"A notification is something you look at; a timer needs to reach you when you are not looking.",synonyms:["alert","chime","timer sound","reminder sound","beep"],default:!0}]},{id:"languages",label:"Languages",rows:[{id:"meeting-languages",key:"ui.capture.languages",section:"speech",type:"picker",label:"Languages spoken in your meetings",help:"Each line is detected among these, so a call that moves between Telugu, Hindi and English is transcribed as all three. Empty: any language. Indian languages switch the speech model to Whisper — Parakeet hears only European ones.",synonyms:["language","multilingual","hindi","telugu","tamil","spanish","portuguese","code switching","hinglish","mixed languages","detect language"]},{id:"meeting-translate",key:"ui.capture.translate",section:"speech",type:"toggle",label:"Translate meetings into English",help:"Lines in another language get an English version, made on this computer — IndicTrans2 for Indian languages, a general translator for the rest; nothing leaves. Summaries read the English; the words as spoken stay one click away.",synonyms:["translate","translation","english transcript","subtitles","interpret"],default:!0},{id:"meeting-on-computer",key:"ui.capture.onComputer",section:"speech",type:"toggle",label:"Transcribe on my computer",help:"When this phone is linked to your computer, meetings and dictation are transcribed by the computer’s models — Telugu, Hindi and other Indian languages, a language per line, an English version — and this phone’s own recogniser takes over whenever the computer cannot be reached. Pro.",synonyms:["computer transcription","link transcription","indian languages on phone","telugu","hindi","use my computer"],default:!0,phoneOnly:!0,pro:!0},{id:"meeting-translate-with",key:"ui.capture.translateWith",section:"speech",type:"picker",label:"Translate with",help:"Blank: the translators on this computer. Pick one of your models to translate instead — it reads mixed speech (Hinglish) and the lines around each line better; a cloud model sees them redacted, like any message.",synonyms:["translation model","translator","indictrans","translate using"]}]},{id:"monitors",label:"Live monitors",rows:[{id:"pref-monitor-model",key:"ui.monitors.targetId",section:"monitors",type:"picker",label:"Answer monitors with",help:"A monitor re-answers its question every time the transcript grows — a fast model keeps it live.",synonyms:["monitor model","/monitor","/tldr","live monitor"],pro:!0},{id:"pref-monitor-window",key:"ui.monitors.windowMin",section:"monitors",type:"select",label:"Monitor transcript window",help:"How many minutes of transcript a monitor reads.",synonyms:["monitor window"],pro:!0,options:[["2","Last 2 minutes"],["5","Last 5 minutes"],["10","Last 10 minutes"],["15","Last 15 minutes"],["30","Last 30 minutes"]]},{id:"pref-monitor-summary",key:"ui.monitors.sources.summary",section:"monitors",type:"toggle",label:"Monitors read the running summary",help:"Adds the live summary to each monitor prompt.",synonyms:["monitor sources"],pro:!0,default:!0},{id:"pref-monitor-findings",key:"ui.monitors.sources.findings",section:"monitors",type:"toggle",label:"Monitors read what they already found",help:"Stops a monitor repeating itself.",synonyms:["monitor findings","dedupe"],pro:!0,default:!0},{id:"pref-monitor-web",consent:!0,key:"ui.monitors.sources.web",section:"monitors",type:"toggle",label:"Monitors may search the web",help:"Adds a tool call before it can answer.",synonyms:["monitor web search"],pro:!0},{id:"pref-monitor-history",consent:!0,key:"ui.monitors.sources.history",section:"monitors",type:"toggle",label:"Monitors may read past chats, meetings & notes",help:"Your history as a source for a monitor.",synonyms:["monitor history"],pro:!0},{id:"pref-monitor-mcp",consent:!0,key:"ui.monitors.sources.mcp",section:"monitors",type:"toggle",label:"Monitors may use MCP tools",help:"The slowest option — every server is described in the prompt.",synonyms:["monitor mcp"],pro:!0}]},{id:"capture",label:"This computer’s audio",rows:[{id:"scribe-hear",key:"ui.capture.hear",section:"speech",type:"picker",label:"What the scribe hears",help:"One meeting app, or everything this computer plays except Chap.",synonyms:["meeting app","system audio","zoom audio","capture app","transcribe a call"],desktopOnly:!0,composer:!0},{id:"scribe-noise",key:"ui.capture.noise",section:"speech",type:"select",label:"Microphone noise suppression",help:"Auto cleans the mic for a room and leaves it alone with headphones.",synonyms:["noise","denoise","background noise"],desktopOnly:!0,composer:!0,options:[["auto","Auto"],["standard","Standard"],["off","Off"]]},{id:"scribe-headphones",key:"ui.capture.headphones",section:"speech",type:"select",label:"Headphones",help:"With headphones the speakers cannot leak into the mic, so no echo guard is needed. Auto asks the system.",synonyms:["echo","earbuds","speakers"],desktopOnly:!0,composer:!0,options:[["auto","Auto"],["yes","Yes"],["no","No"]]},{id:"scribe-live",key:"ui.scribeLive",section:"speech",type:"toggle",label:"Live phrases",help:"Re-decode a phrase as it grows, so monitors and questions see words sooner. More CPU.",synonyms:["live transcription","partial words","streaming captions"],desktopOnly:!0,composer:!0}]},{id:"spoken",label:"Spoken commands",advanced:!0,rows:[{id:"pref-voice-enabled",key:"ui.voice.enabled",section:"voice",type:"toggle",label:"Spoken commands during a meeting",help:'Say "Hey Chap, keep an eye on the pricing question" to start a monitor. Matched on-device against the captions — no audio, no model call.',synonyms:["wake word","voice commands","hey chap","hey chatpanel","say"],pro:!0,default:!0},{id:"pref-voice-wake",key:"ui.voice.wakeWord",section:"voice",type:"text",label:"Wake word",help:"Chap always answers to “Hey Chap”; add your own here, several separated by commas.",synonyms:["trigger word","hotword","hey chap"],pro:!0},{id:"pref-voice-wake-listen",consent:!0,key:"ui.voice.wakeListen",section:"voice",type:"toggle",label:"Listen for the wake word while the app is open",help:"Say “Hey Chap” (or your wake word) to start a voice conversation. Heard on the phone only while Chap is on screen; nothing leaves it.",synonyms:["hey chap","wake word","hotword","hands free","always listening"],phoneOnly:!0},{id:"pref-voice-from",consent:!0,key:"ui.voice.from",section:"voice",type:"select",label:"Act on commands from",help:"Only you, or anyone on the call.",synonyms:["who can command","speaker"],pro:!0,options:[["me","Only me"],["anyone","Anyone in the meeting"],["off","Nobody — just listen"]]},{id:"pref-voice-names",key:"ui.voice.selfNames",section:"voice",type:"text",label:"My name in captions",help:"Meet labels you by name; put it (and any short form) here so your own commands are recognised.",synonyms:["caption name","my name","you"],pro:!0}]},{id:"dashboard",label:"Open",rows:[{id:"open-meetings-dashboard",type:"link",label:"Open the meetings dashboard",help:"Every recorded meeting: summary, topics, key moments, action items, transcript.",synonyms:["past meetings","transcripts","open meetings"]}]}]},{id:"chat-history",group:"workspace",label:"Chat history",blurb:"Search every conversation",sections:[{id:"topics",label:"Topics",rows:[{id:"pref-topic-extract",key:"ui.topicExtraction.enabled",section:"topics",type:"toggle",label:"Auto-extract topics for history graphs",help:"Runs after chats or transcripts change and saves concise graph topics locally.",synonyms:["topics","graph","tags","topic extraction"],default:!0},{id:"pref-topic-target",key:"ui.topicExtraction.targetId",section:"topics",type:"picker",label:"Topic extraction model",help:"Blank: the system’s own model on this device when there is one (Apple on-device on a Mac) — free and nothing leaves — otherwise the conversation’s model; a coding agent’s topics never go to the agent.",synonyms:["topic model"]}]},{id:"indexing",label:"Indexing",rows:[{id:"pref-recall-target",key:"ui.recall.targetId",section:"recall",type:"picker",label:"Search & indexing model",help:"Plans each history search and tags people, places and organisations in what you save. Any model you added — one on this phone (Gemini Nano, a downloaded model) or an API model, which then reads your saved text. Blank: a model on this phone if there is one, otherwise the words alone.",synonyms:["search model","indexing model","decider","planner","entity model","nano"],phoneOnly:!0},{id:"pref-recall-index",key:"ui.recall.index",section:"recall",type:"toggle",label:"Tag people, places and organisations",help:"Reads each saved chat, note and meeting once with the search model — in the background, while charging — so “which cities did I mention” has an answer. Off: search still works, by words.",synonyms:["entities","cities","places","people","companies","knowledge index"],default:!0,phoneOnly:!0},{id:"gw-warm-search",key:"ui.warmSearch.enabled",section:"warmSearch",type:"toggle",label:"Index my history to the gateway",help:"Opt-in. Sends decrypted chats and meetings to your local gateway so search scales past what the browser can hold.",synonyms:["warm search","full-corpus search","gateway index","history indexing"],requires:"gateway"},{id:"gw-backup-key",store:"gateway",type:"toggle",label:"Let the gateway decrypt & index my daily backups",help:"Hands your backup password to the local gateway so it can index your encrypted backups too.",synonyms:["backup key","index backups","backup password handoff"],requires:"gateway"}]},{id:"knowledge-bases",label:"Knowledge bases",rows:[{id:"kb-list",type:"list",label:"Knowledge bases",help:"Each base with its documents and passages, the notes a model proposed (accept or remove them), who may use it, and its map. Attach one to a chat from the composer.",synonyms:["knowledge base","kb","documents","pdf","index","rag","notes to accept","graph report"],requires:"gateway"},{id:"kb-build",type:"action",label:"Build a knowledge base",help:"From a folder or documents on this machine: indexed by the gateway, nothing leaves it.",synonyms:["index a folder","add documents","build kb"],requires:"gateway"}]},{id:"dashboard",label:"Open",rows:[{id:"open-history-dashboard",type:"link",label:"Open the chat history dashboard",help:"Ranked, keyword and by-agent search, threads, related chats and the graph.",synonyms:["history page","search chats","open history"]}]}]},{id:"voice",group:"workspace",label:"Voice",blurb:"Dictation, read-aloud and speaker models — all on this machine",sections:[{id:"dictation",label:"Dictation",rows:[{id:"gw-stt-search",store:"gateway",type:"picker",label:"Speech-to-text model",help:"Local Whisper for the mic button — audio never leaves your machine. Non-Latin languages need Small or Large v3 Turbo.",synonyms:["whisper","stt","dictation model","microphone","speech to text","transcribe"],requires:"gateway"},{id:"gw-stt-dtype",store:"gateway",type:"select",label:"Dictation precision",help:"Quantization — lighter is faster, fuller is more accurate.",synonyms:["quantization","dtype","fp16","q8"],requires:"gateway"},{id:"gw-stt-lang",key:"ui.dictation.lang",section:"speech",type:"picker",label:"Dictation language",help:"Auto-detect works well on Small+. Pin a language if detection guesses wrong on short phrases.",synonyms:["speech language","mic language","auto-detect"]}]},{id:"read-aloud",label:"Read aloud",rows:[{id:"gw-tts-search",store:"gateway",type:"picker",label:"Text-to-speech model",help:"The voice behind Read aloud and voice conversation. Kokoro and VITS/MMS run here; without one the browser voice is used.",synonyms:["tts","speech","kokoro","pocket tts","mms","voice model","read aloud engine"],requires:"gateway"},{id:"gw-tts-voice",store:"gateway",type:"picker",label:"Voice",help:"Which voice reads answers aloud.",synonyms:["speaker voice","tts voice","read aloud voice"],requires:"gateway",quick:!0},{id:"gw-tts-dtype",store:"gateway",type:"select",label:"Read-aloud precision",help:"Quantization for the TTS model.",synonyms:["tts quantization"],requires:"gateway"},{id:"gw-tts-voices",store:"gateway",type:"list",label:"Your voices",help:"Voice prints derived from a few seconds of your speech — the recording is never stored and nothing leaves this machine.",synonyms:["voice clone","my voice","voice print","custom voice"],requires:"gateway"},{id:"gw-tts-record",type:"action",label:"Record a voice",help:"Ten seconds at a normal pace; needs a model that can use a print (Pocket TTS).",synonyms:["record voice","clone voice"],requires:"gateway"}]},{id:"speaker",label:"Meetings",rows:[{id:"gw-diarize-models",store:"gateway",type:"picker",label:"Speaker model",help:"Tells voices apart for meeting transcription — Speaker 1 / Speaker 2 / …, on-device. Needed only for the Transcribe meeting button.",synonyms:["diarization","diarize","who spoke","speaker labels","pyannote"],requires:"gateway"}]}]},{id:"backup-sync",group:"data",label:"Backup & sync",blurb:"Encrypted copies of everything, on a schedule or on demand",sections:[{id:"backups",label:"Encrypted backups",rows:[{id:"autobackup-destination",store:"local",type:"select",label:"Backup destination",help:"Downloads, Google Drive, or both. Compressed and encrypted locally; Drive receives only ciphertext.",synonyms:["where to back up","downloads folder","drive backup","export"],pro:!0},{id:"autobackup-device-name",store:"local",type:"text",label:"This device’s backup name",help:"Each browser profile gets its own seven rotating slots, so one machine never overwrites another.",synonyms:["device name","profile name"],pro:!0},{id:"backup-password",store:"local",type:"secret",label:"Backup encryption password",help:"Stored encrypted in this profile so scheduled backups run unattended. There is no recovery.",synonyms:["passphrase","encryption key","backup password"],pro:!0},{id:"autobackup-now",type:"action",label:"Back up now",help:"An encrypted backup to the destination above, right now.",synonyms:["export now","download backup","manual backup"]}]},{id:"schedule",label:"Schedule",rows:[{id:"autobackup-enabled",store:"local",type:"toggle",label:"Back up my encrypted data every day",help:"At most one completed automatic backup per calendar day; a missed one catches up at the next browser start.",synonyms:["daily backup","automatic backup","scheduled"],pro:!0},{id:"autobackup-hour",store:"local",type:"select",label:"Run the daily backup at",help:"One local time.",synonyms:["backup time","backup hour"],pro:!0}]},{id:"drive",label:"Google Drive",rows:[{id:"drive-connect",type:"action",label:"Connect Google Drive",help:"Your own Google account, connected once; Chap refreshes authorization for scheduled backups.",synonyms:["google","drive","oauth","sign in google"],pro:!0},{id:"drive-disconnect",type:"action",label:"Disconnect Google Drive",help:"Forget the Drive authorization on this browser.",synonyms:["sign out google","remove drive"],requires:"drive"},{id:"drive-backup-list",type:"picker",label:"Encrypted backups in Drive",help:"The backups every device has written.",synonyms:["drive backups","restore from drive"],requires:"drive"},{id:"drive-backup-restore",type:"action",label:"Restore the selected Drive backup",help:"Downloads ciphertext into memory and decrypts it with the password above; always merges chats, meetings and notes.",synonyms:["restore drive"],requires:"drive"},{id:"drive-backup-restore-all",type:"action",label:"Merge latest from all devices",help:"Restore the newest backup of every device at once.",synonyms:["merge devices","restore all"],requires:"drive"}]},{id:"restore",label:"Restore from file",advanced:!0,rows:[{id:"backup-import",type:"action",label:"Restore from file",help:"An encrypted backup or a legacy ZIP export, from disk.",synonyms:["import","restore","upload backup","zip"]},{id:"backup-replace",store:"local",type:"toggle",label:"Replace existing data when restoring from a file",help:"Default is merge.",synonyms:["overwrite on restore","replace data"]}]}]},{id:"storage-access",group:"data",label:"Storage & access",blurb:"Where your data lives, and which agents read it",sections:[{id:"storage",label:"Where your data lives",rows:[{id:"obs-sync",type:"action",label:"Sync now",help:"Mirror chats, meetings and notes to the local gateway so connected agents can search them.",synonyms:["sync gateway","mirror","warm tier"],requires:"gateway"},{id:"obs-clear",type:"action",label:"Clear the gateway copy",help:"Delete the gateway’s mirror; the browser keeps everything.",synonyms:["delete gateway data","clear warm"],requires:"gateway"},{id:"obs-refresh",type:"action",label:"Refresh storage view",help:"Storage per tier and the access log.",synonyms:["storage size","how much data","access log","who read what"]}]}]},{id:"activity-usage",group:"data",label:"Activity & usage",blurb:"Every model call, and what each run actually did",sections:[{id:"totals",label:"Totals",rows:[{id:"usage-groupby",type:"select",label:"Group usage by",help:"Model, agent or day.",synonyms:["usage","tokens","cost","spend","bill"]},{id:"usage-window",type:"select",label:"Usage window",help:"How far back the totals reach.",synonyms:["usage period","last 7 days","this month"]},{id:"usage-clear",type:"action",label:"Clear usage totals",help:"Reset the counters on this device.",synonyms:["reset usage"]}]},{id:"runs",label:"Runs",rows:[{id:"activity-kind",type:"select",label:"Show runs of kind",help:"Chat, monitor, note command, team…",synonyms:["activity filter","run kind"]},{id:"activity-background",type:"toggle",label:"Show background work",help:"Include topic extraction, briefs and the other work that ran without you asking.",synonyms:["background runs","hidden runs"]},{id:"activity-replay",type:"action",label:"Verify replay",help:"Re-derive the log and compare — proves the record is consistent.",synonyms:["replay","verify log","event log"]},{id:"activity-export",type:"action",label:"Export activity (JSONL)",help:"Every event as one CloudEvents 1.0 JSON line — readable by any event bus or log pipeline.",synonyms:["export runs","download activity","jsonl","cloudevents","event stream"]},{id:"activity-clear",type:"action",label:"Clear activity",help:"Delete the run log on this device.",synonyms:["delete activity","clear runs"]}]}]},{id:"plan",group:"account",label:"Plan",blurb:"Free, Pro or Team, and restoring Pro on this device",sections:[{id:"plan",label:"Your plan",rows:[{id:"btn-subscribe-pro",type:"action",label:"Subscribe to Pro",help:"Opens secure checkout; Pro activates here automatically. Becomes Pro · Manage once you have it.",synonyms:["upgrade","buy","pro","pricing","checkout","license","licence"]},{id:"btn-check-purchase",type:"action",label:"Check for my purchase",help:"Already paid and still seeing Free? No email needed.",synonyms:["already paid","refresh license","activate"]},{id:"license-deactivate",type:"action",label:"Deactivate Pro on this device",help:"Free this device’s seat.",synonyms:["sign out","deactivate","remove license"],requires:"pro"}]},{id:"restore",label:"Already subscribed",rows:[{id:"restore-email",type:"text",label:"Restore Pro by email",help:"A one-tap link that activates Pro on this device.",synonyms:["restore purchase","magic link","email me a link","lost pro"]},{id:"btn-restore",type:"action",label:"Email me a restore link",help:"Send the link to the address above.",synonyms:["send link"]}]}]},{id:"plugins",group:"account",label:"Plugins",blurb:"Everything Chap loads, and what you can switch off",sections:[{id:"plugins",label:"Plugins",rows:[{id:"plugins-list",type:"list",label:"Adapters and tool groups",help:"Adapters drive an app through its own data format; tool groups are the sets offered each turn. A disabled group is never built. Security cannot be turned off.",synonyms:["adapters","tool groups","disable feature","excalidraw","draw.io","tldraw","switch off"]},{id:"plugins-refresh",type:"action",label:"Refresh plugins",help:"Re-read what is loaded.",synonyms:["reload plugins"]}]}]},{id:"about",group:"account",label:"About",blurb:"Version, updates and support",sections:[{id:"about",label:"About",rows:[{id:"check-updates",type:"action",label:"Check for updates",help:"A manual install does not auto-update; this looks for a newer build.",synonyms:["version","update","new version","download latest","changelog","help","support"]},{id:"report-bug",type:"action",label:"Report a problem",help:"A GitHub issue with this app’s version and diagnostics filled in — no chat content. You see all of it first, and nothing is sent until you submit it on GitHub. Also /bug in any chat.",synonyms:["bug","bug report","issue","report","feedback","broken","crash","not working","github","support"]}]}]}]),w=new Map(S.map(e=>[e.id,e])),f=new Map(m.map(e=>[e.id,e]));function g(){const e=[];for(const t of m){const o=t.group&&w.get(t.group)||null;for(const r of t.sections)for(const a of r.rows)e.push({row:a,section:r,page:t,group:o})}return e}const k=new Map(g().map(e=>[e.row.id,e]));function W(e){return k.get(e)}function N(e){return f.get(e)}function D(e){return w.get(e)}function j(e){return m.filter(t=>(t.group||null)===(e||null))}function G(){return g().filter(e=>e.row.quick)}function B(e){return g().filter(t=>e!=="browser"||!t.row.desktopOnly).filter(t=>e==="phone"||!t.row.phoneOnly).map(t=>t.row.id)}function R(e){return[e.group?.label,e.page.label,e.section.label].filter(Boolean).join(" › ")}function O(e,t){return e?t?`#${e}/${t}`:`#${e}`:""}function F(e){const t=k.get(e);return t?O(t.page.id,t.section.id):""}function H(e){const t=String(e||"").replace(/^#/,"");if(!t)return null;const[o,r]=t.split("/"),a=f.get(o);if(!a)return null;const s=r?a.sections.find(i=>i.id===r):void 0;return{page:a,section:s}}function q(e,t){if(!t||!e)return;let o=e;for(const r of t.split(".")){if(!o||typeof o!="object")return;o=o[r]}return o}function U(e,t,o){const r=JSON.parse(JSON.stringify(e||{})),a=String(t||"").split(".");let s=r;for(let i=0;i<a.length-1;i+=1)(!s[a[i]]||typeof s[a[i]]!="object")&&(s[a[i]]={}),s=s[a[i]];return s[a[a.length-1]]=o,r}const z="expanded";function Y(e){return e?.ui?.settingsView==="inline"?"inline":"expanded"}function T(e,t){const o=t?.key?q(e,t.key):void 0;return o??t?.default}function P(e,t){if(t==null||t==="")return e.type==="secret"?"Not set":"";if(e.type==="secret")return"••••";if(typeof t=="boolean")return t?"On":"Off";if(Array.isArray(t))return`${t.length}`;if(typeof t=="object"){const a=Object.keys(t).length;return a?`${a}`:""}const o=e.options?.find(a=>String(a[0])===String(t)),r=o?o[1]:String(t);return r.length>40?`${r.slice(0,37)}…`:r}const b=e=>String(e||"").toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g,""),E=e=>b(e).split(/[^a-z0-9@/.+-]+/).filter(Boolean);function h(e,t,o,r,a){const s=b(e);if(!s)return 0;let i=0;for(const n of t)s.startsWith(n)?i+=o:new RegExp(`(^|[^a-z0-9])${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`).test(s)?i+=r:s.includes(n)&&(i+=a);return i}function $(e,{settings:t,limit:o=12,rows:r,client:a=null}={}){const s=E(e);if(!s.length)return[];const i=r?new Set(r):null,n=[];for(const l of g()){const{row:d}=l;if(i&&!i.has(d.id)||d.phoneOnly&&a!=="phone")continue;const v=[d.label,...d.synonyms||[],l.section.label,l.page.label,l.group?.label||"",d.help||""].map(b).join(" \0 ");if(!s.every(u=>v.includes(u)))continue;let p=h(d.label,s,30,18,8);for(const u of d.synonyms||[])p=Math.max(p,h(u,s,16,12,6))+(h(u,s,1,1,1)?1:0);if(p+=h(l.page.label,s,6,5,2)+h(l.section.label,s,6,5,2),p+=h(d.help,s,2,2,1),d.quick&&(p+=1),p>0&&d.phoneOnly&&a==="phone"&&(p+=4),p<=0)continue;const x=d.key?P(d,T(t,d)):"";n.push({id:d.id,label:d.label,help:d.help||"",type:d.type,value:x,pro:!!d.pro,requires:d.requires||null,page:l.page.id,pageLabel:l.page.label,section:l.section.id,sectionLabel:l.section.label,group:l.group?.id||null,groupLabel:l.group?.label||"",breadcrumb:R(l),score:p})}return n.sort((l,d)=>d.score-l.score||l.label.length-d.label.length||l.label.localeCompare(d.label)),n.slice(0,o)}const c=e=>Array.isArray(e)?e.length:0,y=(e,t,o=`${t}s`)=>`${e} ${e===1?t:o}`;function M(e,t={},o={}){const r=t.ui||{},a=n=>({state:"ok",text:n}),s=n=>({state:"warn",text:n}),i=n=>({state:"off",text:n});switch(e){case"models":{const n=c(t.endpoints);return n?a(y(n,"endpoint")):s("No endpoints yet")}case"agent-tools":{if(!o.bridge)return s("Local runtime not running");const n=Number.isFinite(o.agentCount)?o.agentCount:c(t.agents);return n?a(y(n,"agent")):s("No agents found")}case"gateway":return o.gateway?a("Running"):i("Not running");case"runtime":{if(!o.bridge)return i("Local runtime not running");const n=o.sandbox;return n?n.enabled===!1?s("Sandbox off — processes run as you"):n.runtime?n.runtime==="managed"?a("Your organisation’s sandbox"):String(n.runtime).startsWith("command:")?a(`Sandboxed · ${String(n.runtime).slice(8)}`):String(n.runtime).startsWith("container:")?a(`Sandboxed · containers (${String(n.runtime).slice(10)})`):a(n.mode==="allowlist"?"Sandboxed · allow list":"Sandboxed · open network"):s(`${n.required?"Nothing runs — sandbox required but unavailable":"Not sandboxed"}${n.reason?` — ${String(n.reason).split(" — ")[0]}`:""}`):{state:"none",text:""}}case"redaction":{const n=r.piiRedaction?.mode||"off";return n==="off"?s("Off — a model sees what you type"):a(n==="model"?"Patterns + AI detection":"Patterns")}case"internal-sites":return t.privacy?.internalGuard===!1?i("Off"):a("Internal content stays on this device");case"tools-mcp":{const n=c(t.mcpServers);return n?a(y(n,"server")):i("No servers")}case"web-search":return r.webSearch?.enabled===!1?i("Off"):a("On");case"skills":return a(y(c(t.skills),"skill"));case"agent-teams":{const n=c(t.agentPool),l=c(t.teams);return n||l?a(`${y(n,"agent")} · ${y(l,"team")}`):i("None defined")}case"link":{const n=Number(o.linkDevices)||0,l=[n?y(n,"device"):"",o.telegram?"Telegram":""].filter(Boolean);return l.length?a(`${l.join(" · ")} linked`):o.linkDevices===void 0?{state:"none",text:""}:i("Nothing linked")}case"connections":return c(t.connections)?a(y(c(t.connections),"host")):i("None");case"memory":return r.memory?.enabled===!1?i("Off"):a("On");case"meetings":return o.pro?a("Ready"):s("Pro");case"chat-history":return r.warmSearch?.enabled?a("Indexed on the gateway"):a("In the browser");case"voice":return o.gateway?a("On-device models available"):s("Needs the gateway for on-device voice");case"backup-sync":return o.backupEnabled?a("Daily backups on"):s("No scheduled backup");case"plan":return o.pro?a("Pro"):i("Free");default:return{state:"none",text:""}}}function _(e={},t={}){const o=e.ui||{};return[{id:"model",label:"Connect a model",why:"A local server or a hosted API — one endpoint is enough to chat.",done:c(e.endpoints)>0,page:"models",section:"endpoints"},{id:"runtime",label:"Install the local runtime",why:"The gateway brings the bridge: coding agents, on-device dictation and PII detection, routing.",done:!!(t.gateway||t.bridge),page:"agent-tools",section:"runtime"},{id:"redaction",label:"Turn redaction on",why:"Sensitive values are replaced before a model sees them and restored in the reply.",done:(o.piiRedaction?.mode||"off")!=="off",page:"redaction",section:"mode"},{id:"name",label:"Tell Chap your name",why:"Briefs and meeting notes refer to you by it.",done:!!String(e.selfName||"").trim(),page:"general",section:"you"},{id:"tools",label:"Connect a tool",why:"An MCP server gives every agent something to do beyond talk.",done:c(e.mcpServers)>0,page:"tools-mcp",section:"servers"},{id:"backup",label:"Set up daily encrypted backups",why:"A reinstall cannot lose your chats, notes and settings.",done:!!t.backupEnabled,page:"backup-sync",section:"schedule",pro:!0},{id:"phone",label:"Message your agent from your phone",why:"A Telegram bot, polled by the bridge on this machine.",done:!!t.telegram,page:"link",section:"telegram"}]}function K(e,t){const o={};for(const r of m)o[r.id]=M(r.id,e,t);return o}function J(e,t={}){if(!e?.requires)return{ok:!0};const o=C[e.requires];return o?t[o.fact]?{ok:!0}:{ok:!1,reason:o.reason,fix:o.fix,page:o.page}:{ok:!0}}function V(e){return e?.section?A.find(t=>t.id===e.section):void 0}export{L as BOOKKEEPING_KEYS,C as REQUIREMENTS,S as SETTINGS_GROUPS,z as SETTINGS_OPEN_DEFAULT,m as SETTINGS_PAGES,R as breadcrumb,P as describeValue,T as effectiveValue,W as findRow,J as gateOf,D as groupById,_ as homeChecklist,O as linkTo,F as linkToRow,g as listRows,N as pageById,j as pagesOf,H as parseLink,G as quickRows,B as rowsFor,$ as searchSettings,V as sectionOfRow,U as setValue,Y as settingsOpenMode,K as statusAll,M as statusOf,q as valueOf};
package/tool-hub.js CHANGED
@@ -1,17 +1,20 @@
1
- import{findToolsResult as C,oneLiner as L}from"./tool-discovery.js";import{validateAction as D}from"./tool-dispatch.js";import{isPermissionTool as Y}from"./agent-permission.js";import{CONTEXT_TAGS as k}from"./context-attachments.js";const _="tools",v="find",y="describe",O=6,K=5,X=2,Q=new Set("mcp server api tool tools app apps the and for with data cloud online local remote connector integration a an of to in on my go is it by or at".split(" "));function Z(t){const i=(String(t?.name||"").match(/^mcp_(.+?)__/)||[])[1]||"",o=(String(t?.description||"").match(/^\[([^\]]+)\]/)||[])[1]||"";return[...new Set(`${i.replace(/_/g," ")} ${o}`.toLowerCase().match(/[a-z][a-z0-9]+/g)||[])].filter(e=>!Q.has(e))}function ee(t,i){const o=new Set(String(t||"").toLowerCase().match(/[a-z][a-z0-9]+/g)||[]);return Z(i).some(e=>o.has(e))}const J=t=>{const i=t?.parameters||t?.inputSchema;return Array.isArray(i?.required)?i.required.map(String):[]},R=t=>`${t.name}(${J(t).join(", ")})`,z=t=>L(String(t||"").split(/\n\s*\n/)[0],140);function te(){return{name:_,description:`Every action Chap gives you — the user's own data, their connected integrations, the browser tab — in one tool. Run one: {"action":"<name>","args":{…}}. Not sure which: {"action":"find","query":"<what you need>"}. Its arguments: {"action":"describe","tool":"<name>"}.`,parameters:{type:"object",properties:{action:{type:"string",description:'The action to run — a name from the catalog, a hint or a find — or "find" / "describe".'},args:{type:"object",additionalProperties:!0,description:"The action's own arguments, verbatim. {} when it takes none."},query:{type:"string",description:'With action "find": what you need to do, in words.'},tool:{type:"string",description:'With action "describe": the action to describe.'}},required:["action"],additionalProperties:!0}}}const N=t=>Y(t);function ne(t){const i=t.hiddenVia instanceof Map?t.hiddenVia:new Map,o=new Set(i.values()),e=new Map;for(const n of t.reach||[])n?.name&&!N(n.name)&&!e.has(n.name)&&e.set(n.name,n);for(const n of t.specs||[])n?.name&&!N(n.name)&&!o.has(n.name)&&!e.has(n.name)&&e.set(n.name,n);return{leaves:e,hiddenVia:i,groups:o}}function re(t,i){const o=n=>t.some(a=>n.test(a)),e=[];return o(/^(history_|recall$|memory_recall$|meeting_)/)&&e.push("You HAVE access to the user's own Chap data — past chats, notes, meeting transcripts and summaries — here. For anything they discussed or wrote, search it FIRST (`history_search`) and answer from it; never say you cannot access their meetings, notes or history."),o(/^(weather|web_search)$/)&&e.push("For anything current — weather, prices, news — use `weather` / `web_search` here, not a search tool of your own; the user sees these calls as steps. A [prefetch] block in the message IS that call, already made: answer from it, no call."),i.size&&e.push("The user's connected integrations are here too — when a request matches one, call it rather than saying it is unavailable."),o(/^read_page$/)&&e.push("The browser tab the user is looking at can be read and acted on here — `read_page` first."),e}function oe(t,i,o){const e=new Map;for(const[a,d]of o)i.has(a)&&(e.get(d)||e.set(d,[]).get(d)).push(a);const n=[];for(const a of t.specs||[]){const d=e.get(a.name);if(d?.length){const w=d.slice(0,O).join(", "),g=d.length>O?`, … (+${d.length-O} — find them)`:"";n.push(`- ${z(a.description)} — ${w}${g}`)}else i.has(a.name)&&n.push(`- ${R(a)}: ${z(a.description)}`)}return n}function ue(t,{rank:i,providerSystem:o=""}={}){if(!t||typeof t.execute!="function")return null;const{leaves:e,hiddenVia:n}=ne(t);if(!e.size)return null;const a=t.residents instanceof Map?t.residents:new Map,d=r=>n.get(r)||r,w=r=>{const s=new Set(r instanceof Set?r:[]);for(const[c,l]of n)s.has(l)&&s.add(c);return s},g=w(t.remoteTools),B=w(t.serialTools),j=[...e.keys()],F=re(j,new Set(j.filter(r=>g.has(r)))),H=new Set(n.values()),E=[...new Set([...a].filter(([r])=>e.has(r)&&!H.has(r)).map(([,r])=>r.trim()).filter(Boolean))],A=['Everything below is reached through ONE tool, `tools`: {"action":"<name>","args":{…}}. Not sure which action? {"action":"find","query":"<what you need>"} searches all of them. Not sure of its arguments? {"action":"describe","tool":"<name>"}.',...F,`Available:
2
- ${oe(t,e,n).join(`
1
+ import{findToolsResult as L,oneLiner as k}from"./tool-discovery.js";import{validateAction as Y}from"./tool-dispatch.js";import{isPermissionTool as K}from"./agent-permission.js";import{CONTEXT_TAGS as B}from"./context-attachments.js";const v="tools",O="find",S="describe",j=6,X=5,Q=2,Z=new Set("mcp server api tool tools app apps the and for with data cloud online local remote connector integration a an of to in on my go is it by or at".split(" "));function ee(e){const i=(String(e?.name||"").match(/^mcp_(.+?)__/)||[])[1]||"",o=(String(e?.description||"").match(/^\[([^\]]+)\]/)||[])[1]||"";return[...new Set(`${i.replace(/_/g," ")} ${o}`.toLowerCase().match(/[a-z][a-z0-9]+/g)||[])].filter(t=>!Z.has(t))}function te(e,i){const o=new Set(String(e||"").toLowerCase().match(/[a-z][a-z0-9]+/g)||[]);return ee(i).some(t=>o.has(t))}const J=e=>{const i=e?.parameters||e?.inputSchema;return Array.isArray(i?.required)?i.required.map(String):[]},R=e=>`${e.name}(${J(e).join(", ")})`,z=e=>k(String(e||"").split(/\n\s*\n/)[0],140);function ne(){return{name:v,description:`Every action Chap gives you — the user's own data, their connected integrations, the browser tab — in one tool. Run one: {"action":"<name>","args":{…}}. Not sure which: {"action":"find","query":"<what you need>"}. Its arguments: {"action":"describe","tool":"<name>"}.`,parameters:{type:"object",properties:{action:{type:"string",description:'The action to run — a name from the catalog, a hint or a find — or "find" / "describe".'},args:{type:"object",additionalProperties:!0,description:"The action's own arguments, verbatim. {} when it takes none."},query:{type:"string",description:'With action "find": what you need to do, in words.'},tool:{type:"string",description:'With action "describe": the action to describe.'}},required:["action"],additionalProperties:!0}}}const N=e=>K(e);function re(e){const i=e.hiddenVia instanceof Map?e.hiddenVia:new Map,o=new Set(i.values()),t=new Map;for(const n of e.reach||[])n?.name&&!N(n.name)&&!t.has(n.name)&&t.set(n.name,n);for(const n of e.specs||[])n?.name&&!N(n.name)&&!o.has(n.name)&&!t.has(n.name)&&t.set(n.name,n);return{leaves:t,hiddenVia:i,groups:o}}function oe(e,i){const o=n=>e.some(g=>n.test(g)),t=[];return o(/^(history_|recall$|memory_recall$|meeting_)/)&&t.push("You HAVE access to the user's own Chap data — past chats, notes, meeting transcripts and summaries — here. For anything they discussed or wrote, search it FIRST (`history_search`) and answer from it; never say you cannot access their meetings, notes or history."),o(/^(weather|web_search)$/)&&t.push("For anything current — weather, prices, news — use `weather` / `web_search` here, not a search tool of your own; the user sees these calls as steps. A [prefetch] block in the message IS that call, already made: answer from it, no call."),i.size&&t.push("The user's connected integrations are here too — when a request matches one, call it rather than saying it is unavailable."),o(/^read_page$/)&&t.push("The browser tab the user is looking at can be read and acted on here — `read_page` first."),t}function ie(e,i,o){const t=new Map;for(const[l,p]of o)i.has(l)&&(t.get(p)||t.set(p,[]).get(p)).push(l);const n=[],g=e.quietTools instanceof Set?e.quietTools:new Set;for(const l of e.specs||[]){if(g.has(l.name))continue;const p=t.get(l.name);if(p?.length){const A=p.slice(0,j).join(", "),w=p.length>j?`, … (+${p.length-j} — find them)`:"";n.push(`- ${z(l.description)} — ${A}${w}`)}else i.has(l.name)&&n.push(`- ${R(l)}: ${z(l.description)}`)}return n}function he(e,{rank:i,providerSystem:o=""}={}){if(!e||typeof e.execute!="function")return null;const{leaves:t,hiddenVia:n}=re(e);if(!t.size)return null;const g=e.residents instanceof Map?e.residents:new Map,l=Array.isArray(e.hinters)?e.hinters.filter(r=>typeof r=="function"):[],p=r=>n.get(r)||r,A=r=>{const s=new Set(r instanceof Set?r:[]);for(const[u,h]of n)s.has(h)&&s.add(u);return s},w=A(e.remoteTools),F=A(e.serialTools),q=[...t.keys()],H=oe(q,new Set(q.filter(r=>w.has(r)))),P=new Set(n.values()),E=[...new Set([...g].filter(([r])=>t.has(r)&&!P.has(r)).map(([,r])=>r.trim()).filter(Boolean))],$=['Everything below is reached through ONE tool, `tools`: {"action":"<name>","args":{…}}. Not sure which action? {"action":"find","query":"<what you need>"} searches all of them. Not sure of its arguments? {"action":"describe","tool":"<name>"}.',...H,`Available:
2
+ ${ie(e,t,n).join(`
3
3
  `)}`,...E.length?[`Every tool the notes below name is an action of \`tools\`: call it as {"action":"<name>","args":{…}}.
4
4
 
5
5
  ${E.join(`
6
6
 
7
7
  `)}`]:[]].join(`
8
- `),$=String(t.system||""),P=o&&$.includes(o)?$.replace(o,A):[$,A].filter(Boolean).join(`
8
+ `),x=String(e.system||""),V=o&&x.includes(o)?x.replace(o,$):[x,$].filter(Boolean).join(`
9
9
 
10
- `),q=(r,s,c)=>{const l=n.get(r);return l?t.execute(l,{action:r,args:s},c):t.execute(r,s,c)},T=r=>Object.hasOwn(k,r)?JSON.stringify({error:`"${r}" is not an action.`,what:k[r],hint:'{"action":"find","query":"<what you need>"} lists the actions.'}):null;async function V(r){const s=e.get(r);if(!s)return T(r)??JSON.stringify({error:`Unknown action "${r}".`,hint:'{"action":"find","query":"<what you need>"} lists what exists.'});const c=[a.get(d(r))];if(n.has(r))try{const l=JSON.parse(await t.execute(n.get(r),{action:y,args:{tool:r}},{}));l?.guidance&&c.push(l.guidance)}catch{}return JSON.stringify({name:s.name,description:s.description||"",parameters:s.parameters||s.inputSchema||{type:"object",properties:{}},...c.filter(Boolean).length?{guidance:c.filter(Boolean).join(`
10
+ `),I=(r,s,u)=>{const h=n.get(r);return h?e.execute(h,{action:r,args:s},u):e.execute(r,s,u)},_=r=>Object.hasOwn(B,r)?JSON.stringify({error:`"${r}" is not an action.`,what:B[r],hint:'{"action":"find","query":"<what you need>"} lists the actions.'}):null;async function G(r){const s=t.get(r);if(!s)return _(r)??JSON.stringify({error:`Unknown action "${r}".`,hint:'{"action":"find","query":"<what you need>"} lists what exists.'});const u=[g.get(p(r))];if(n.has(r))try{const h=JSON.parse(await e.execute(n.get(r),{action:S,args:{tool:r}},{}));h?.guidance&&u.push(h.guidance)}catch{}return JSON.stringify({name:s.name,description:s.description||"",parameters:s.parameters||s.inputSchema||{type:"object",properties:{}},...u.filter(Boolean).length?{guidance:u.filter(Boolean).join(`
11
11
 
12
- `)}:{},callAs:{action:s.name,args:"<the properties above>"}})}async function I(r,s,c={}){const l=s&&typeof s=="object"?s:{};if(r!==_)return e.has(r)&&!n.has(r)?t.execute(r,l,c):n.has(r)?q(r,l,c):t.execute(r,l,c);const{action:x,args:u,...b}=l,f=String(x||""),p={...b,...u&&typeof u=="object"?u:{}},h=u&&typeof u=="object"?String(u.action||""):"";if(f===v&&h&&h!==v&&h!==y&&e.has(h))return I(_,{action:h,args:u.args&&typeof u.args=="object"?u.args:{}},c);if(f===v)return C([...e.values()],String(p.query??p.tool??""),{rank:i,describeAction:y});if(f===y)return V(String(p.tool||p.name||p.action||""));const m=e.get(f);if(!m&&T(f))return T(f);if(!m){const U=JSON.parse(await C([...e.values()],f.replace(/[_-]+/g," "),{rank:i,describeAction:y,limit:5}));return JSON.stringify({error:`Unknown action "${f}".`,didYouMean:U.matches.map(W=>W.name),hint:'Call one of those, or {"action":"find","query":"<what you need>"}.'})}const S=typeof u=="string"&&u.trim()?J(m):[];S.length===1&&p[S[0]]==null&&[void 0,"string"].includes(m.parameters?.properties?.[S[0]]?.type)&&(p[S[0]]=u.trim(),c?.shims?.fire?.("hub.args-text",{tool:f}));const M=D(m,p,{envelope:u});return M?JSON.stringify(M):q(f,p,c)}function G(r,{score:s,limit:c=K,minScore:l=X,small:x=!1}={}){const u=String(r||"").trim();if(!u||typeof s!="function")return"";let b;try{b=s([...e.values()],u)}catch{return""}const f=h=>!x||!g.has(h.name)||ee(u,h),p=(b||[]).filter(h=>h&&h.n>l&&f(h.s)).slice(0,c).map(h=>h.s);return p.length?`[Chap] Likely useful for this message, through \`tools\`: ${p.map(h=>`${R(h)} — ${L(h.description,90)}`).join("; ")}.`:""}return{...t,specs:[te(),...(t.specs||[]).filter(r=>N(r?.name))],system:P,systemParts:{tools:Math.round(A.length/4)},remoteTools:g,serialTools:B,execute:I,hub:{leaves:[...e.keys()],hintFor:G,groupOf:d}}}function he(t){for(let i=(t||[]).length-1;i>=0;i--){const o=t[i];if(o?.role==="user")return typeof o.content=="string"?o.content:Array.isArray(o.content)?o.content.filter(e=>e?.type==="text").map(e=>e.text||"").join(`
13
- `):""}return""}function le(t,i){const o=Array.isArray(t)?t:[];if(!i)return o;let e=o.length-1;for(;e>=0&&o[e]?.role!=="user";)e--;if(e<0)return o;const n=o[e],a=typeof n.content=="string"?`${n.content}
12
+ `)}:{},callAs:{action:s.name,args:"<the properties above>"}})}async function M(r,s,u={}){const h=s&&typeof s=="object"?s:{};if(r!==v)return t.has(r)&&!n.has(r)?e.execute(r,h,u):n.has(r)?I(r,h,u):e.execute(r,h,u);const{action:T,args:a,...b}=h,f=String(T||""),d={...b,...a&&typeof a=="object"?a:{}},m=a&&typeof a=="object"?String(a.action||""):"";if(f===O&&m&&m!==O&&m!==S&&t.has(m))return M(v,{action:m,args:a.args&&typeof a.args=="object"?a.args:{}},u);if(f===O)return L([...t.values()],String(d.query??d.tool??""),{rank:i,describeAction:S});if(f===S)return G(String(d.tool||d.name||d.action||""));const y=t.get(f);if(!y&&_(f))return _(f);if(!y){const W=JSON.parse(await L([...t.values()],f.replace(/[_-]+/g," "),{rank:i,describeAction:S,limit:5}));return JSON.stringify({error:`Unknown action "${f}".`,didYouMean:W.matches.map(D=>D.name),hint:'Call one of those, or {"action":"find","query":"<what you need>"}.'})}const c=typeof a=="string"&&a.trim()?J(y):[];c.length===1&&d[c[0]]==null&&[void 0,"string"].includes(y.parameters?.properties?.[c[0]]?.type)&&(d[c[0]]=a.trim(),u?.shims?.fire?.("hub.args-text",{tool:f}));const C=Y(y,d,{envelope:a});return C?JSON.stringify(C):I(f,d,u)}function U(r,{score:s,limit:u=X,minScore:h=Q,small:T=!1}={}){const a=String(r||"").trim();if(!a)return"";const b=l.map(c=>{try{return String(c(a,{small:T})||"")}catch{return""}}).filter(Boolean);if(typeof s!="function")return b.join(`
13
+ `);let f;try{f=s([...t.values()],a)}catch{return b.join(`
14
+ `)}const d=c=>!T||!w.has(c.name)||te(a,c),m=(f||[]).filter(c=>c&&c.n>h&&d(c.s)).slice(0,u).map(c=>c.s);return[m.length?`[Chap] Likely useful for this message, through \`tools\`: ${m.map(c=>`${R(c)} — ${k(c.description,90)}`).join("; ")}.`:"",...b].filter(Boolean).join(`
15
+ `)}return{...e,specs:[ne(),...(e.specs||[]).filter(r=>N(r?.name))],system:V,systemParts:{tools:Math.round($.length/4)},remoteTools:w,serialTools:F,execute:M,hub:{leaves:[...t.keys()],hintFor:U,groupOf:p}}}function fe(e){for(let i=(e||[]).length-1;i>=0;i--){const o=e[i];if(o?.role==="user")return typeof o.content=="string"?o.content:Array.isArray(o.content)?o.content.filter(t=>t?.type==="text").map(t=>t.text||"").join(`
16
+ `):""}return""}function le(e,i){const o=Array.isArray(e)?e:[];if(!i)return o;let t=o.length-1;for(;t>=0&&o[t]?.role!=="user";)t--;if(t<0)return o;const n=o[t],g=typeof n.content=="string"?`${n.content}
14
17
 
15
- ${i}`:Array.isArray(n.content)?[...n.content,{type:"text",text:i}]:n.content;return[...o.slice(0,e),{...n,content:a},...o.slice(e+1)]}function fe(t,i){const o=Array.isArray(t)?t:[];if(!i)return o;let e=o.length-1;for(;e>=0&&o[e]?.role!=="user";)e--;if(e<0)return o;const n=o[e],a=typeof n.content=="string"?`${i}
18
+ ${i}`:Array.isArray(n.content)?[...n.content,{type:"text",text:i}]:n.content;return[...o.slice(0,t),{...n,content:g},...o.slice(t+1)]}function pe(e,i){const o=Array.isArray(e)?e:[];if(!i)return o;let t=o.length-1;for(;t>=0&&o[t]?.role!=="user";)t--;if(t<0)return o;const n=o[t],g=typeof n.content=="string"?`${i}
16
19
 
17
- ${n.content}`:Array.isArray(n.content)?[{type:"text",text:i},...n.content]:n.content;return[...o.slice(0,e),{...n,content:a},...o.slice(e+1)]}export{_ as HUB_TOOL_NAME,te as hubSpec,he as lastUserText,ue as makeToolHub,ee as namesIntegration,le as withHint,fe as withLead};
20
+ ${n.content}`:Array.isArray(n.content)?[{type:"text",text:i},...n.content]:n.content;return[...o.slice(0,t),{...n,content:g},...o.slice(t+1)]}export{v as HUB_TOOL_NAME,ne as hubSpec,fe as lastUserText,he as makeToolHub,te as namesIntegration,le as withHint,pe as withLead};
package/toolset.js CHANGED
@@ -1,3 +1,3 @@
1
- const w=/^mcp[_-]/i;function x(S,{mcpSystem:f=""}={}){const a=(S||[]).filter(e=>e&&e.specs?.length);if(!a.length)return;const r=[],m=new Map,u=new Set,l=new Map,g=new Set,h=[],o=new Map,M=new Map;for(const e of a){const s=e.remote===!0;if(e.traits instanceof Map)for(const[n,t]of e.traits)l.has(n)||l.set(n,t);const i=e.hiddenVia instanceof Map;if(i){const n=new Map((Array.isArray(e.reach)?e.reach:[]).filter(t=>t?.name).map(t=>[t.name,t]));for(const[t,y]of e.hiddenVia)o.has(t)||!e.specs.some(E=>E?.name===y)||(o.set(t,y),n.has(t)&&h.push(n.get(t)))}else if(Array.isArray(e.reach)&&e.specs.length===1)for(const n of e.reach)n?.name&&!o.has(n.name)&&(o.set(n.name,e.specs[0].name),h.push(n));const c=e.remoteTools instanceof Set?e.remoteTools:null,A=e.serialTools instanceof Set?e.serialTools:null;for(const n of e.specs){if(m.has(n.name))continue;r.push(n),m.set(n.name,e.execute);const t=i&&e.residents instanceof Map?e.residents.get(n.name):e.system;t&&M.set(n.name,String(t)),(s||c?.has(n.name)||w.test(String(n.name||"")))&&u.add(n.name),(e.serial===!0||A?.has(n.name))&&g.add(n.name)}}if(!r.length)return;const p=r.some(e=>w.test(String(e?.name||"")))?String((typeof f=="function"?f():f)||""):"",T=[p,...a.map(e=>e.system)].map(e=>String(e||"").trim()).filter(Boolean).join(`
1
+ const T=/^mcp[_-]/i;function N(A,{mcpSystem:f=""}={}){const i=(A||[]).filter(e=>e&&e.specs?.length);if(!i.length)return;const r=[],u=new Map,g=new Set,h=new Map,y=new Set,m=[],o=new Map,M=new Map,S=new Set,l=[];for(const e of i){if(typeof e.hint=="function"&&l.push(e.hint),Array.isArray(e.hinters))for(const t of e.hinters)typeof t=="function"&&l.push(t);const s=e.remote===!0;if(e.traits instanceof Map)for(const[t,n]of e.traits)h.has(t)||h.set(t,n);const a=e.hiddenVia instanceof Map;if(a){const t=new Map((Array.isArray(e.reach)?e.reach:[]).filter(n=>n?.name).map(n=>[n.name,n]));for(const[n,w]of e.hiddenVia)o.has(n)||!e.specs.some(R=>R?.name===w)||(o.set(n,w),t.has(n)&&m.push(t.get(n)))}else if(Array.isArray(e.reach)&&e.specs.length===1)for(const t of e.reach)t?.name&&!o.has(t.name)&&(o.set(t.name,e.specs[0].name),m.push(t));const c=e.remoteTools instanceof Set?e.remoteTools:null,E=e.serialTools instanceof Set?e.serialTools:null;for(const t of e.specs){if(u.has(t.name))continue;r.push(t),u.set(t.name,e.execute);const n=a&&e.residents instanceof Map?e.residents.get(t.name):e.system;n&&M.set(t.name,String(n)),(s||c?.has(t.name)||T.test(String(t.name||"")))&&g.add(t.name),(e.serial===!0||E?.has(t.name))&&y.add(t.name),(e.quiet===!0||e.quietTools instanceof Set&&e.quietTools.has(t.name))&&S.add(t.name)}}if(!r.length)return;const p=r.some(e=>T.test(String(e?.name||"")))?String((typeof f=="function"?f():f)||""):"",q=[p,...i.filter(e=>e.quiet!==!0).map(e=>e.system)].map(e=>String(e||"").trim()).filter(Boolean).join(`
2
2
 
3
- `)||void 0,d={};p.trim()&&(d.mcp=Math.round(p.length/4));for(const e of a){const s=Math.round(String(e.system||"").trim().length/4);s&&(d[e.id||e.specs[0]?.name||"group"]=s)}return{specs:r,system:T,systemParts:d,remoteTools:u,traits:l,serialTools:g,reach:h,hiddenVia:o,residents:M,async execute(e,s,i={}){const c=m.get(e);return c?c(e,s,i):JSON.stringify({error:`Unknown tool: ${e}`})}}}export{x as buildToolset};
3
+ `)||void 0,d={};p.trim()&&(d.mcp=Math.round(p.length/4));for(const e of i){if(e.quiet===!0)continue;const s=Math.round(String(e.system||"").trim().length/4);s&&(d[e.id||e.specs[0]?.name||"group"]=s)}return{specs:r,system:q,systemParts:d,remoteTools:g,traits:h,serialTools:y,reach:m,hiddenVia:o,residents:M,quietTools:S,hinters:l,async execute(e,s,a={}){const c=u.get(e);return c?c(e,s,a):JSON.stringify({error:`Unknown tool: ${e}`})}}}export{N as buildToolset};