@epoch-agent/core 0.27.0 → 0.29.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/dist/index.d.ts +107 -3
- package/dist/index.js +124 -12
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -6811,6 +6811,7 @@ declare function commandNameFromRelPath(relPath: string): string;
|
|
|
6811
6811
|
*
|
|
6812
6812
|
* ```markdown
|
|
6813
6813
|
* ---
|
|
6814
|
+
* displayName: 写提交信息
|
|
6814
6815
|
* description: 按团队模板写 commit message
|
|
6815
6816
|
* argument-hint: '[scope]'
|
|
6816
6817
|
* allowed-tools: [terminal, file_read]
|
|
@@ -7264,8 +7265,8 @@ declare function loadPlugins(opts: PluginLoadOptions): PluginArtifacts;
|
|
|
7264
7265
|
* | 族 | 谁读它 |
|
|
7265
7266
|
* | ----------------------------------------------- | ---------------------------------------- |
|
|
7266
7267
|
* | `name` / `version` / `epochVersion` / `author` | **epoch 自己** —— 装不装得上、叫什么 |
|
|
7267
|
-
* | `displayName` / `category` / `
|
|
7268
|
-
* | `description` / `homepage` / `keywords`
|
|
7268
|
+
* | `displayName` / `category` / `visibility` / `changelog` | **上传那一屏的预填**,epoch 一个字不读 |
|
|
7269
|
+
* | `description` / `homepage` / `keywords` / `icon` | 两边都读(`icon` 见它那一格) |
|
|
7269
7270
|
* | `dependencies` | **epoch 自己** —— 装它时要一起装谁 |
|
|
7270
7271
|
*
|
|
7271
7272
|
* 第二族 2026-09-15 加的,判据在它们自己那几格上。要紧的一条:它们是**预填**,
|
|
@@ -7865,6 +7866,58 @@ interface PluginAbout {
|
|
|
7865
7866
|
/** 读一个插件目录里给人看的那几段散文。**任何一格读不出都只是缺席,不抛、不报** */
|
|
7866
7867
|
declare function readPluginAbout(dir: string, pluginName: string): PluginAbout;
|
|
7867
7868
|
|
|
7869
|
+
/**
|
|
7870
|
+
* 插件**包里自带**的那张图标 —— 宿主目录没给图标时的兜底(2026-10-12)。
|
|
7871
|
+
*
|
|
7872
|
+
* ## 一、优先级:宿主目录 → 包里这一张 → 名字首字
|
|
7873
|
+
*
|
|
7874
|
+
* 市场目录条目上的 `icon` 是**宿主**写的(`marketplace.ts` 的 `EntrySchema.icon`),
|
|
7875
|
+
* 它永远先赢;这里读的是作者写在 `epoch-plugin.json` 里的那一格,只在宿主那一格缺席时
|
|
7876
|
+
* 才轮到它。两张都没有,界面退回彩色底 + 名字首字(web 的 `PluginFace`)。
|
|
7877
|
+
*
|
|
7878
|
+
* 在这之前清单里的 `icon` 只是上传那一屏的**预填**,epoch 一个字不读 —— 于是一个
|
|
7879
|
+
* 从本机目录装的插件、或者宿主目录里没写图标的插件,卡片上永远只有首字。
|
|
7880
|
+
*
|
|
7881
|
+
* ## 二、⚠️ 交出去的**一律是 `data:`**,不是路径也不是 URL
|
|
7882
|
+
*
|
|
7883
|
+
* 清单里那一格三种写法,处理各不相同:
|
|
7884
|
+
*
|
|
7885
|
+
* | 写法 | 处理 |
|
|
7886
|
+
* | -------------------------- | ------------------------------------------------------- |
|
|
7887
|
+
* | 包内相对路径 `assets/x.png` | 读出来转成 `data:` —— epoch 不替插件托管文件 |
|
|
7888
|
+
* | `data:image/…` | 原样交出 |
|
|
7889
|
+
* | `https://…` 等任何带协议的 | **忽略** |
|
|
7890
|
+
*
|
|
7891
|
+
* 转成 `data:` 而不是开一条「读插件目录里的文件」的端点,是因为那条端点要自己扛
|
|
7892
|
+
* 路径逃逸、Origin 校验和 SVG 同源执行三件事;内联之后浏览器只是渲一张 `<img>`,
|
|
7893
|
+
* 而 `<img>` 里的 SVG **不执行脚本**。
|
|
7894
|
+
*
|
|
7895
|
+
* **忽略 URL** 是 2026-10-12 拍的:宿主目录里写一条 URL,是宿主决定让自己的服务器
|
|
7896
|
+
* 知道「有人在看这个列表」(判据在 `EntrySchema.icon` 上);包里写一条 URL,
|
|
7897
|
+
* 那个服务器就是**插件作者**挑的第三方 —— 用户只是打开插件页,就被一个他没选过的
|
|
7898
|
+
* 地址记了一笔。`data:` 和相对路径都不发请求,表达力一点没少。
|
|
7899
|
+
*
|
|
7900
|
+
* ## 三、读不出一律缺席,不抛、不报
|
|
7901
|
+
*
|
|
7902
|
+
* 口径同 [about.ts](./about.ts):一张读不出来的图标不该让一个插件变成别的意思。
|
|
7903
|
+
* 路径逃出插件根(含软链指出去)、扩展名不在白名单、文件超过
|
|
7904
|
+
* {@link PLUGIN_ICON_MAX_BYTES} —— 全部当没写。
|
|
7905
|
+
*
|
|
7906
|
+
* ## 四、上限为什么是 32 KiB
|
|
7907
|
+
*
|
|
7908
|
+
* 这一份会**跟着插件列表的每一次响应走**(装着的每一行一份),不是点开才拉。
|
|
7909
|
+
* 一张 128px 的 png 约 10 KiB、一张 svg 通常 2 KiB 以内;32 KiB 给足了余量,
|
|
7910
|
+
* 又让二十个插件的列表最坏也就多 ~860 KB。
|
|
7911
|
+
*/
|
|
7912
|
+
/** 包内图标文件的上限(字节)。理由见文件头第四节 */
|
|
7913
|
+
declare const PLUGIN_ICON_MAX_BYTES: number;
|
|
7914
|
+
/**
|
|
7915
|
+
* 读一个插件目录里那张自带的图标,交出一条 `data:`。
|
|
7916
|
+
*
|
|
7917
|
+
* 清单读不出、没写 `icon`、或者那一格不合规矩 → `undefined`(规矩见文件头)。
|
|
7918
|
+
*/
|
|
7919
|
+
declare function readPluginIcon(dir: string): string | undefined;
|
|
7920
|
+
|
|
7868
7921
|
/**
|
|
7869
7922
|
* 插件安装记录 —— `~/.epoch/plugins.json` 的读写(方案 32)。
|
|
7870
7923
|
*
|
|
@@ -7964,6 +8017,35 @@ declare class PluginStore {
|
|
|
7964
8017
|
private write;
|
|
7965
8018
|
}
|
|
7966
8019
|
|
|
8020
|
+
/**
|
|
8021
|
+
* 取包进度的**结构化**那一路(2026-10-11)。
|
|
8022
|
+
*
|
|
8023
|
+
* ## 为什么在 `onProgress(string)` 之外再开一路
|
|
8024
|
+
*
|
|
8025
|
+
* `onProgress` 发的是 core 用**进程语言**渲染好的一句话,CLI 直接打到终端上正合适。
|
|
8026
|
+
* 但 web 那条路上,一次请求可能带着别的 `?lang=`,而且界面要的不只是一句话:
|
|
8027
|
+
* 它要知道「现在是哪一步」才画得出对应的文案,要拿到字节数才画得出进度条。
|
|
8028
|
+
* 所以这一路只发数据,文案由界面那一侧自己渲染。两路在同一些位置**成对发出**,
|
|
8029
|
+
* 判据见 `install.ts` 里每一处 `onProgress` 旁边那一行 `emitStep`。
|
|
8030
|
+
*
|
|
8031
|
+
* ## 字节进度为什么要节流
|
|
8032
|
+
*
|
|
8033
|
+
* 一次下载的 chunk 可能有几千个,每个都往网线上写一行的话,界面一秒要重渲染几百次,
|
|
8034
|
+
* 而人眼根本分辨不出这么细的变化。所以按「距上次 ≥200ms 或又多了 ≥1%」放行,
|
|
8035
|
+
* 最后一个字节那一下(`received === total`)一定放行,不然进度条会停在 99%。
|
|
8036
|
+
*/
|
|
8037
|
+
/** 取包走到哪一步了。形状和 protocol 的 `WirePluginProgressStep` 同构(core 不依赖 protocol) */
|
|
8038
|
+
interface InstallStep {
|
|
8039
|
+
phase: 'git' | 'npm' | 'host' | 'download' | 'extract' | 'dep';
|
|
8040
|
+
target: string;
|
|
8041
|
+
/** 只在 `dep` 那一步有 */
|
|
8042
|
+
dep?: string;
|
|
8043
|
+
/** 已取到的字节数,拿得到才有 */
|
|
8044
|
+
received?: number;
|
|
8045
|
+
/** 总字节数,对面说了才有 */
|
|
8046
|
+
total?: number;
|
|
8047
|
+
}
|
|
8048
|
+
|
|
7967
8049
|
/**
|
|
7968
8050
|
* 安装来源的解析 —— 用户敲的那串字符串 → {@link ResolvedSource}(方案 32)。
|
|
7969
8051
|
*
|
|
@@ -8136,6 +8218,12 @@ interface InstallOptions {
|
|
|
8136
8218
|
confirm?: (preview: InstallPreview) => Promise<boolean>;
|
|
8137
8219
|
/** 进度提示(clone / 下载)。不给就静默 —— 库不替宿主决定往哪儿写 */
|
|
8138
8220
|
onProgress?: (message: string) => void;
|
|
8221
|
+
/**
|
|
8222
|
+
* 同一批进度的**结构化**那一路(2026-10-11):哪一步、取的是什么、取到多少字节。
|
|
8223
|
+
* 和 {@link onProgress} 在同一些位置成对发,不给就静默。
|
|
8224
|
+
* 判据(为什么另开一路、字节为什么节流)在 [install-progress.ts](./install-progress.ts) 文件头
|
|
8225
|
+
*/
|
|
8226
|
+
onStep?: (step: InstallStep) => void;
|
|
8139
8227
|
/**
|
|
8140
8228
|
* 取一个 `host:` 来源的包 —— **由宿主去下,我们一个网络请求都不发**(2026-09-08)。
|
|
8141
8229
|
*
|
|
@@ -8156,6 +8244,14 @@ interface InstallOptions {
|
|
|
8156
8244
|
target: string;
|
|
8157
8245
|
/** 我们准备好的一个**空临时目录**,包放这儿。用完由我们清掉 */
|
|
8158
8246
|
destDir: string;
|
|
8247
|
+
/**
|
|
8248
|
+
* 可选:宿主边下边报字节数(2026-10-11)。不调就没有字节进度 —— 界面上只有
|
|
8249
|
+
* 「正在从宿主取」和已用秒数。调得再频繁也没关系,这一层会节流
|
|
8250
|
+
*/
|
|
8251
|
+
onProgress?: (progress: {
|
|
8252
|
+
received: number;
|
|
8253
|
+
total?: number;
|
|
8254
|
+
}) => void;
|
|
8159
8255
|
}) => Promise<{
|
|
8160
8256
|
ok: true;
|
|
8161
8257
|
archivePath: string;
|
|
@@ -8198,6 +8294,13 @@ interface InstallPreview {
|
|
|
8198
8294
|
* 缺席 = 构造这份预览的那条路没读(老的调用方、用例里手写的预览),界面照旧只画名字。
|
|
8199
8295
|
*/
|
|
8200
8296
|
about?: PluginAbout;
|
|
8297
|
+
/**
|
|
8298
|
+
* 包里自带的那张图标,已经转成 `data:`(2026-10-12,判据在 icon.ts 文件头)。
|
|
8299
|
+
*
|
|
8300
|
+
* ⚠️ **它是兜底,不是这一屏的头像**:界面先用点进来那张市场卡上的图标(宿主写的),
|
|
8301
|
+
* 那一格缺席才轮到它。缺席 = 包里没写 / 写的是 URL(忽略)/ 读不出。
|
|
8302
|
+
*/
|
|
8303
|
+
icon?: string;
|
|
8201
8304
|
/**
|
|
8202
8305
|
* 已经装过的同名插件;有值时这次安装会被拒(验收 #8)。
|
|
8203
8306
|
*
|
|
@@ -12233,6 +12336,7 @@ declare const EpochConfigSchema: z.ZodObject<{
|
|
|
12233
12336
|
id: z.ZodString;
|
|
12234
12337
|
label: z.ZodString;
|
|
12235
12338
|
icon: z.ZodOptional<z.ZodString>;
|
|
12339
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
12236
12340
|
}, z.core.$strip>>>;
|
|
12237
12341
|
userMenu: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12238
12342
|
id: z.ZodString;
|
|
@@ -21111,4 +21215,4 @@ declare function resolveCodeModeWorker(baseDir: string, exists?: typeof existsSy
|
|
|
21111
21215
|
*/
|
|
21112
21216
|
declare function codeModeWorkerPath(): string | undefined;
|
|
21113
21217
|
|
|
21114
|
-
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, type AcquireResult, type AgentConfig, AgentLoop, type AgentProvider, type AgentSite, type AgentSiteRef, AppearanceStore, type AppendMessageInput, ApprovalCache, type ApprovalDecision, type ArtifactOpenRefusal, type ArtifactRetention, type AskQuestionDeps, type AttachmentRetention, BLOCKED_TOOLS, type BackendOptions, type BackendOutcome, type BackgroundTaskSource, type BaseOrigin, type BaseSlot, type BeginTurnInput, type BreakdownInput, BudgetGuard, type BudgetGuardOptions, type BudgetInfo, type BudgetLevel, type BudgetOptions, type BudgetStatus, BudgetStore, type BudgetStoreOptions, type BuildFireArgvInput, type BuildIndexOptions, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, type CachedApproval, type CachedDecision, type CheckpointCapture, type CheckpointFile, CheckpointManager, type CheckpointManagerOptions, type CheckpointManifest, CheckpointStore, type CheckpointStoreOptions, type CheckpointSummary, type ClaudeHooksParseOptions, type CodeModeLimits, type CodeRequest, type CodeResult, CodeSandbox, type CommandHookConfig, type CommandHookResult, type CommandLoadOutcome, type CommandLoadSummary, type CommandResult, type CommandRunner, type CompactionResult, type CompiledRules, type ComplianceDirSpec, type ComplianceDirsSummary, ComplianceEngine, type ComplianceEngineInput, type ComplianceGate, type ComplianceHit, type ComplianceRule, type ComplianceRuleSource, type ComplianceSettings, type ComplianceVerdict, type CompressConfig, type CompressResult, type ConfigMigration, type ConfigOrigins, ContextCompressor, type ContextEngine, type CreateScheduleInput, type CreateSessionInput, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_MAX_HOLD_CHARS, type DelegateArgs, type DelegateConfig, DelegateManager, type DelegateTaskResult, type DiagnoseOptions, type DiscoverOutcome, type DiscoveredFile, type DoctorReport, type DraftParse, EMPTY_RULES, EPOCH_DISK_LEDGER, EpochConfigSchema, type ExpandOptions, type ExtractOutcome, FTS_TABLES, FTS_TRIGGERS, type FallbackEvent, type FileSlots, type FileSourceKind, type ForkInput, type FrontmatterParse, type FrontmatterSplit, type FtsHealth, type FtsReclaim, type FtsSpace, type FtsTableHealth, GOAL_BLOCK_CODES, type GateAxis, type GateVerdict, type GenerateInput, type GenerateOutput, type Goal, type GoalBlockReason, type GoalClear, type GoalPhase, type GoalPromptView, type GoalRefusal, type GoalRoundResult, GoalService, GoalStore, type GoalToolDeps, type GoalWrite, HEADLESS_AUDIT_CODES, type HeadlessPolicy, type HookConfigEntry, HookManager, type HookManagerOptions, type HookMatcher, type HookSourceKind, type HookSourceStatus, type HookSourcesOptions, type HookSourcesSummary, type HooksParseOutcome, type MemoryManager$1 as IMemoryManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, type SessionManager$1 as ISessionManager, type SkillSystem$1 as ISkillSystem, ImageLoadError, type ImageSize, type ImportDecision, type ImportGate, type ImportGoal, type ImportMessage, type ImportNode, type ImportPartsResult, type ImportSessionInput, type ImportSessionMeta, type ImportSessionResult, type ImportSkipReason, type ImportTodo, ImportTrustStore, type InstallDependency, type InstallOptions, type InstallOutcome, type InstallPreview, type InstructionScan, type InstructionSource, type IsolationReason, type IsolationReport, type JsonSchemaDocument, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, type LastOpenSession, LastOpenSessions, type LayerOutcome, type LayerScalars, type LayerStatus, type LearningContext, type LearningResult, type LearningSkipReason, type LexiconLoadOutcome, type LifecycleOutcome, type ListCandidatesInput, type ListSessionsInput, type ListSessionsOutput, type LoadCommandsOptions, type LoadConfigOptions, type LoadKeybindingsOptions, type LoadKeybindingsResult, type LoadRolesOptions, type LoadedPlugin, type LockHolder, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, type ManagedPolicy, ManagedPolicyError, type ManagedSettings, ManagedSettingsSchema, type MarketplaceCatalog, type MarketplaceCategory, type MarketplaceDisplay, type MarketplaceDisplayField, type MarketplaceEntry, type MarketplaceOutcome, type MarketplaceRecord, type MarketplaceStatus, type MemoryConfig, type MemoryEntry, type MemoryImportRecord, type MemoryImportResult, MemoryManager, type MemoryManagerOptions, type MemoryNotice, type MemoryRemoval, type MemorySearchResult, type MemoryTarget, type MemoryWriteResult, type MentionPart, type MentionResolution, type Message, type MessageHit, type MessageRecord, type MessageSurface, type ModelCapability, ModelFailureTracker, type ModelMetaEntry, type ModelPricing, type MultimodalPolicy, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, type NonInteractiveProbe, type OsTaskSnapshot, type OutputGuard, PACK_EXCLUDES, PACK_MAX_BYTES, PACK_MAX_FILES, PERMISSION_AUDIT_CODES, PLUGIN_LAYOUT, PLUGIN_MANIFEST_FILE, PLUGIN_MANIFEST_KEYS, PLUGIN_NAME_PATTERN, PLUGIN_ROOT_ENV, PLUGIN_ROOT_TOKEN, PLUGIN_VISIBILITY, POLICY_DECISIONS, PROBE_VERSION, PROJECT_AGENTS_SUBDIR, PROVIDER_NO_CREDENTIAL, type PackFile, type PackLimits, type PackOutcome, type PackPlan, type PackPlanOutcome, type PermissionAuditCode, type PermissionAuditEntry, type PermissionAuditOutcome, type PermissionAuditScope, type PermissionAuditSnapshot, PermissionManager, type PersistFailureKind, type PersistedBudget, type PersistedPart, type PlanApprovalFn, type PlanEnterResult, type PlanModeDeps, PlanModeState, type PlanSettlement, type PluginAbout, type PluginArtifacts, type PluginAuthor, PluginAuthorSchema, type PluginCommandDir, type PluginCounts, type PluginDoc, type PluginHookFile, type PluginInventory, type PluginLoadOptions, type PluginManifest, type PluginPathRef, type PluginRecord, type PluginSettingsFile, type PluginSourceType, type PluginStateReadOutcome, PluginStore, type PluginVisibility, type PolicyDirSpec, type PolicyDirsSummary, type PolicyLoadOutcome, type PolicyRule, PolicyRuleSchema, type PricingAt, type PricingOverride, type ProjectContext, type ProjectExtensionInventory, ProviderError, ProviderRouter, type ProviderStreamChunk, type ProviderToolCall$1 as ProviderToolCall, type ProviderWarning, type PruneResult, type QuestionAskFn, RECORDING_KEEP_RUNS, RECORDING_MAX_BYTES, ROLE_FRONTMATTER_SCHEMA, RUN_CODE_TOOL, type ReadMessagesInput, type ReadMessagesOutput, type RecentWorkspace, RecentWorkspaces, type RecordRunInput, type RecorderOptions, type RecoveryAction, type RegisterInput, type RegisterOutcome, type RegistrarOptions, type RegistrationPatch, type RepairOutcome, type ResolveMentionsOptions, type ResolveReferenceInput, type ResolveSettingsOptions, type ResolvedCompression, type ResolvedReference, type ResolvedSource, type ResponseFormat, type RestorePartsOptions, type RewindAction, type RewindDrift, type RewindFilePlan, type RewindOptions, type RewindOutcome, type RewindPreview, type RoleCreateFailure, type RoleCreateInput, type RoleCreateOptions, type RoleCreateOutcome, type RoleLoadOutcome, type RoleLoadSummary, type RoleMergeNotice, type RoleMergeResult, type RoleRemoveFailure, type RoleRemoveOptions, type RoleRemoveOutcome, type RoleScope, type RuleMatch, type RuleSuggestion, type RuleVerdict, type RunCodeFailure, type RunCodeInput, type RunCodeOutcome, type RunCodeToolDeps, type RunEstimateInput, type RunInput, type RunResult, type RunningSchedule, SANDBOX_COVERS, SANDBOX_EXCLUDES, SCALAR_KEYS, SCHEDULE_DEFAULTS, SCHEDULE_DEFAULT_ALLOWLIST, SCHEDULE_FORM_BUDGET_USD, SCHEDULE_ISSUE_CODES, SCHTASKS_FOLDER, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, type ScalarKey, type ScanInstructionsOptions, type ScheduleArgvRefusal, type ScheduleArgvResult, type ScheduleArgvWarning, type ScheduleBackend, type ScheduleCliEntry, type ScheduleDraftDeps, type ScheduleDrift, type ScheduleDriftKind, type ScheduleImportInput, type ScheduleInstallForm, type ScheduleIssue, type ScheduleIssueCode, type ScheduleLock, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, type ScheduleValidation, type SchemaExport, type SearchHit, type SearchInput, type SearchMessagesInput, type SearchMessagesOutput, type SearchOutput, type SearchSessionsInput, type SelectionDeps, type SelfConnector, type SelfIndexInput, type SelfSettings, type Session, type SessionCandidate, type SessionHit, SessionManager, type SessionMentionDeps, type SessionMeta, SessionQueries, SessionReferences, type SessionSearchDeps, type SessionStats, type SessionSurface, type SessionTrace, type SessionVisibility, type SessionVisibilityInput, type SettingApply, type SettingApplyFacts, type SettingChain, type SettingFutile, type SettingLayer, type SettingStep, type SettingValue, type SettingValueKind, type SettingWriteFailure, type SettingWriteKey, type SettingWriteLayer, type SettingWriteOutcome, type SettingWriteRequest, type SettingWriteTarget, type SettingWriteTargetsOptions, type SettingsFile, SettingsFileError, SettingsFileSchema, type SettingsLayer, type SettingsResolution, type ShadowFinding, type ShadowKind, type Skill, type SkillDirSource, type SkillDirSpec, type SkillDirsSummary, type SkillImportConflict, type SkillImportDone, type SkillImportEntry, type SkillImportFailure, type SkillImportForm, type SkillImportOptions, type SkillImportPreview, type SkillImportResult, type SkillIndexEntry, type SkillIndexOptions, type SkillIndexResidency, type SkillIndexStats, SkillLearner, type SkillLearningProvider, type SkillMeta, type SkillStats, SkillSystem, type SkillSystemOptions, type SkillViewDeps, type SkillWriteDeps, type SteerSource, type StoredAppearance, type SubAgentRunner, type SubTask, type SubToolCaller, type SummarizeOutput, type SurfaceMessage, type SystemPromptParams, type SystemPromptSegments, TOOL_SEARCH_TOOL, TaskNoticeTracker, type TodoItem, type ToolCall, type ToolConflict, type ToolGate, type ToolNameFidelity, type ToolNameLookup, ToolRegistry, type ToolRevealState, type ToolScope, type ToolSearchDeps, type ToolTableCost, type TraceInput, type TraceNode, TrackerDB, type TrustDecision, type TrustGate, type TrustGateOptions, TrustManager, type TurnRecord, type TurnTiming, type UpdateScheduleInput, type UtilityModelInfo, type ValidateScheduleInput, type VersionCheck, Workspace, type WorkspaceFiles, type WorkspaceIssue, type WorkspaceIssueKind, acquireScheduleLock, addMarketplace, addUsage, admitArtifact, admitArtifacts, affectedPaths, approvalEntryFor, approvalRootFor, artifactLaunchArgv, artifactOpenRefusal, assertLevelAllowed, blockedRoleTools, buildContextBreakdown, buildFireArgv, buildFtsMatchQuery, buildSchemaExports, buildSystemPrompt, buildTrigramMatchQuery, builtinRoles, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, defaultModelOf, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelListCandidates, needsAllowlist, nextFallbackModel, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, openArtifact, originOf, packFileName, packPlugin, parseClaudeSettingsHooks, parseClock, parseDate, parseFrontmatter, parseHooksConfig, parseHooksConfigVerbose, parseImportLine, parseModelList, parseRoleDefinition, parseScheduleDraft, parseSkillFrontmatter, parseTrigger, pendingImageTokens, persistFailureCode, persistParts, persistToolResults, persistedUsage, planPack, previewSkillImport, pricingFor, projectEntryForDisplay, pruneArtifacts, pruneAttachments, pruneRecordings, pruneSchedules, readImageSize, readMarketplaces, readPluginAbout, readPluginManifest, readPluginRecords, readProviderKeyEnv, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, resolveArtifactRetention, resolveCodeModeWorker, resolveComplianceDirs, resolveEntrySource, resolveInWorkspace, resolveMarketplaceRef, resolveMentions, resolveMultimodalPolicy, resolvePolicyDirs, resolvePricingAt, resolveProjectRoot, resolveScheduleBackend, resolveSessionReference, resolveSessionVisibility, resolveSettings, resolveSkillDirs, resolveSource, resolveTar, resolveWorkspace, restoreParts, revealScopedProvider, roleScopedProvider, roleSourceLabel, ruleCovers, ruleFromString, ruleToString, runCode, runCommand, sanitizeArgNames, sanitizeCommand, sanitizeFtsQuery, sanitizePath, sanitizeToolOutput, scanInstructions, scanPluginDir, scanSkillDirs, searchMarketplaces, setDisplayCurrency, setImportGate, setPluginEnabled, setTrustGate, settingValueChoices, settingValueKind, settingWriteApply, settingWriteLayers, settingWriteTargets, skillIndexDescription, skillIndexResidency, skillIndexStats, sniffMediaType, splitFrontmatter, staticToolProvider, stripArtifactData, substitutePluginRoot, suggestRuleFromApproval, systemOpenArgv, systemPromptSegments, toPosix, toolDefinitionTokens, toolMatches, toolTableTokens, totalTokens, traceSession, triggerPeriodMs, unescapeRuleContent, uninstallPlugin, unknownRoleSkills, unknownRoleTools, unloadedInstructionFiles, updateMarketplace, updatePlugin, usdToMicros, validateSchedule, validateTrigger, validateWindow, withGoalCompression, withGoalPrompt, workspaceDisplayPath, writeSettingValue };
|
|
21218
|
+
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, type AcquireResult, type AgentConfig, AgentLoop, type AgentProvider, type AgentSite, type AgentSiteRef, AppearanceStore, type AppendMessageInput, ApprovalCache, type ApprovalDecision, type ArtifactOpenRefusal, type ArtifactRetention, type AskQuestionDeps, type AttachmentRetention, BLOCKED_TOOLS, type BackendOptions, type BackendOutcome, type BackgroundTaskSource, type BaseOrigin, type BaseSlot, type BeginTurnInput, type BreakdownInput, BudgetGuard, type BudgetGuardOptions, type BudgetInfo, type BudgetLevel, type BudgetOptions, type BudgetStatus, BudgetStore, type BudgetStoreOptions, type BuildFireArgvInput, type BuildIndexOptions, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, type CachedApproval, type CachedDecision, type CheckpointCapture, type CheckpointFile, CheckpointManager, type CheckpointManagerOptions, type CheckpointManifest, CheckpointStore, type CheckpointStoreOptions, type CheckpointSummary, type ClaudeHooksParseOptions, type CodeModeLimits, type CodeRequest, type CodeResult, CodeSandbox, type CommandHookConfig, type CommandHookResult, type CommandLoadOutcome, type CommandLoadSummary, type CommandResult, type CommandRunner, type CompactionResult, type CompiledRules, type ComplianceDirSpec, type ComplianceDirsSummary, ComplianceEngine, type ComplianceEngineInput, type ComplianceGate, type ComplianceHit, type ComplianceRule, type ComplianceRuleSource, type ComplianceSettings, type ComplianceVerdict, type CompressConfig, type CompressResult, type ConfigMigration, type ConfigOrigins, ContextCompressor, type ContextEngine, type CreateScheduleInput, type CreateSessionInput, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_MAX_HOLD_CHARS, type DelegateArgs, type DelegateConfig, DelegateManager, type DelegateTaskResult, type DiagnoseOptions, type DiscoverOutcome, type DiscoveredFile, type DoctorReport, type DraftParse, EMPTY_RULES, EPOCH_DISK_LEDGER, EpochConfigSchema, type ExpandOptions, type ExtractOutcome, FTS_TABLES, FTS_TRIGGERS, type FallbackEvent, type FileSlots, type FileSourceKind, type ForkInput, type FrontmatterParse, type FrontmatterSplit, type FtsHealth, type FtsReclaim, type FtsSpace, type FtsTableHealth, GOAL_BLOCK_CODES, type GateAxis, type GateVerdict, type GenerateInput, type GenerateOutput, type Goal, type GoalBlockReason, type GoalClear, type GoalPhase, type GoalPromptView, type GoalRefusal, type GoalRoundResult, GoalService, GoalStore, type GoalToolDeps, type GoalWrite, HEADLESS_AUDIT_CODES, type HeadlessPolicy, type HookConfigEntry, HookManager, type HookManagerOptions, type HookMatcher, type HookSourceKind, type HookSourceStatus, type HookSourcesOptions, type HookSourcesSummary, type HooksParseOutcome, type MemoryManager$1 as IMemoryManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, type SessionManager$1 as ISessionManager, type SkillSystem$1 as ISkillSystem, ImageLoadError, type ImageSize, type ImportDecision, type ImportGate, type ImportGoal, type ImportMessage, type ImportNode, type ImportPartsResult, type ImportSessionInput, type ImportSessionMeta, type ImportSessionResult, type ImportSkipReason, type ImportTodo, ImportTrustStore, type InstallDependency, type InstallOptions, type InstallOutcome, type InstallPreview, type InstallStep, type InstructionScan, type InstructionSource, type IsolationReason, type IsolationReport, type JsonSchemaDocument, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, type LastOpenSession, LastOpenSessions, type LayerOutcome, type LayerScalars, type LayerStatus, type LearningContext, type LearningResult, type LearningSkipReason, type LexiconLoadOutcome, type LifecycleOutcome, type ListCandidatesInput, type ListSessionsInput, type ListSessionsOutput, type LoadCommandsOptions, type LoadConfigOptions, type LoadKeybindingsOptions, type LoadKeybindingsResult, type LoadRolesOptions, type LoadedPlugin, type LockHolder, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, type ManagedPolicy, ManagedPolicyError, type ManagedSettings, ManagedSettingsSchema, type MarketplaceCatalog, type MarketplaceCategory, type MarketplaceDisplay, type MarketplaceDisplayField, type MarketplaceEntry, type MarketplaceOutcome, type MarketplaceRecord, type MarketplaceStatus, type MemoryConfig, type MemoryEntry, type MemoryImportRecord, type MemoryImportResult, MemoryManager, type MemoryManagerOptions, type MemoryNotice, type MemoryRemoval, type MemorySearchResult, type MemoryTarget, type MemoryWriteResult, type MentionPart, type MentionResolution, type Message, type MessageHit, type MessageRecord, type MessageSurface, type ModelCapability, ModelFailureTracker, type ModelMetaEntry, type ModelPricing, type MultimodalPolicy, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, type NonInteractiveProbe, type OsTaskSnapshot, type OutputGuard, PACK_EXCLUDES, PACK_MAX_BYTES, PACK_MAX_FILES, PERMISSION_AUDIT_CODES, PLUGIN_ICON_MAX_BYTES, PLUGIN_LAYOUT, PLUGIN_MANIFEST_FILE, PLUGIN_MANIFEST_KEYS, PLUGIN_NAME_PATTERN, PLUGIN_ROOT_ENV, PLUGIN_ROOT_TOKEN, PLUGIN_VISIBILITY, POLICY_DECISIONS, PROBE_VERSION, PROJECT_AGENTS_SUBDIR, PROVIDER_NO_CREDENTIAL, type PackFile, type PackLimits, type PackOutcome, type PackPlan, type PackPlanOutcome, type PermissionAuditCode, type PermissionAuditEntry, type PermissionAuditOutcome, type PermissionAuditScope, type PermissionAuditSnapshot, PermissionManager, type PersistFailureKind, type PersistedBudget, type PersistedPart, type PlanApprovalFn, type PlanEnterResult, type PlanModeDeps, PlanModeState, type PlanSettlement, type PluginAbout, type PluginArtifacts, type PluginAuthor, PluginAuthorSchema, type PluginCommandDir, type PluginCounts, type PluginDoc, type PluginHookFile, type PluginInventory, type PluginLoadOptions, type PluginManifest, type PluginPathRef, type PluginRecord, type PluginSettingsFile, type PluginSourceType, type PluginStateReadOutcome, PluginStore, type PluginVisibility, type PolicyDirSpec, type PolicyDirsSummary, type PolicyLoadOutcome, type PolicyRule, PolicyRuleSchema, type PricingAt, type PricingOverride, type ProjectContext, type ProjectExtensionInventory, ProviderError, ProviderRouter, type ProviderStreamChunk, type ProviderToolCall$1 as ProviderToolCall, type ProviderWarning, type PruneResult, type QuestionAskFn, RECORDING_KEEP_RUNS, RECORDING_MAX_BYTES, ROLE_FRONTMATTER_SCHEMA, RUN_CODE_TOOL, type ReadMessagesInput, type ReadMessagesOutput, type RecentWorkspace, RecentWorkspaces, type RecordRunInput, type RecorderOptions, type RecoveryAction, type RegisterInput, type RegisterOutcome, type RegistrarOptions, type RegistrationPatch, type RepairOutcome, type ResolveMentionsOptions, type ResolveReferenceInput, type ResolveSettingsOptions, type ResolvedCompression, type ResolvedReference, type ResolvedSource, type ResponseFormat, type RestorePartsOptions, type RewindAction, type RewindDrift, type RewindFilePlan, type RewindOptions, type RewindOutcome, type RewindPreview, type RoleCreateFailure, type RoleCreateInput, type RoleCreateOptions, type RoleCreateOutcome, type RoleLoadOutcome, type RoleLoadSummary, type RoleMergeNotice, type RoleMergeResult, type RoleRemoveFailure, type RoleRemoveOptions, type RoleRemoveOutcome, type RoleScope, type RuleMatch, type RuleSuggestion, type RuleVerdict, type RunCodeFailure, type RunCodeInput, type RunCodeOutcome, type RunCodeToolDeps, type RunEstimateInput, type RunInput, type RunResult, type RunningSchedule, SANDBOX_COVERS, SANDBOX_EXCLUDES, SCALAR_KEYS, SCHEDULE_DEFAULTS, SCHEDULE_DEFAULT_ALLOWLIST, SCHEDULE_FORM_BUDGET_USD, SCHEDULE_ISSUE_CODES, SCHTASKS_FOLDER, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, type ScalarKey, type ScanInstructionsOptions, type ScheduleArgvRefusal, type ScheduleArgvResult, type ScheduleArgvWarning, type ScheduleBackend, type ScheduleCliEntry, type ScheduleDraftDeps, type ScheduleDrift, type ScheduleDriftKind, type ScheduleImportInput, type ScheduleInstallForm, type ScheduleIssue, type ScheduleIssueCode, type ScheduleLock, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, type ScheduleValidation, type SchemaExport, type SearchHit, type SearchInput, type SearchMessagesInput, type SearchMessagesOutput, type SearchOutput, type SearchSessionsInput, type SelectionDeps, type SelfConnector, type SelfIndexInput, type SelfSettings, type Session, type SessionCandidate, type SessionHit, SessionManager, type SessionMentionDeps, type SessionMeta, SessionQueries, SessionReferences, type SessionSearchDeps, type SessionStats, type SessionSurface, type SessionTrace, type SessionVisibility, type SessionVisibilityInput, type SettingApply, type SettingApplyFacts, type SettingChain, type SettingFutile, type SettingLayer, type SettingStep, type SettingValue, type SettingValueKind, type SettingWriteFailure, type SettingWriteKey, type SettingWriteLayer, type SettingWriteOutcome, type SettingWriteRequest, type SettingWriteTarget, type SettingWriteTargetsOptions, type SettingsFile, SettingsFileError, SettingsFileSchema, type SettingsLayer, type SettingsResolution, type ShadowFinding, type ShadowKind, type Skill, type SkillDirSource, type SkillDirSpec, type SkillDirsSummary, type SkillImportConflict, type SkillImportDone, type SkillImportEntry, type SkillImportFailure, type SkillImportForm, type SkillImportOptions, type SkillImportPreview, type SkillImportResult, type SkillIndexEntry, type SkillIndexOptions, type SkillIndexResidency, type SkillIndexStats, SkillLearner, type SkillLearningProvider, type SkillMeta, type SkillStats, SkillSystem, type SkillSystemOptions, type SkillViewDeps, type SkillWriteDeps, type SteerSource, type StoredAppearance, type SubAgentRunner, type SubTask, type SubToolCaller, type SummarizeOutput, type SurfaceMessage, type SystemPromptParams, type SystemPromptSegments, TOOL_SEARCH_TOOL, TaskNoticeTracker, type TodoItem, type ToolCall, type ToolConflict, type ToolGate, type ToolNameFidelity, type ToolNameLookup, ToolRegistry, type ToolRevealState, type ToolScope, type ToolSearchDeps, type ToolTableCost, type TraceInput, type TraceNode, TrackerDB, type TrustDecision, type TrustGate, type TrustGateOptions, TrustManager, type TurnRecord, type TurnTiming, type UpdateScheduleInput, type UtilityModelInfo, type ValidateScheduleInput, type VersionCheck, Workspace, type WorkspaceFiles, type WorkspaceIssue, type WorkspaceIssueKind, acquireScheduleLock, addMarketplace, addUsage, admitArtifact, admitArtifacts, affectedPaths, approvalEntryFor, approvalRootFor, artifactLaunchArgv, artifactOpenRefusal, assertLevelAllowed, blockedRoleTools, buildContextBreakdown, buildFireArgv, buildFtsMatchQuery, buildSchemaExports, buildSystemPrompt, buildTrigramMatchQuery, builtinRoles, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, defaultModelOf, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelListCandidates, needsAllowlist, nextFallbackModel, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, openArtifact, originOf, packFileName, packPlugin, parseClaudeSettingsHooks, parseClock, parseDate, parseFrontmatter, parseHooksConfig, parseHooksConfigVerbose, parseImportLine, parseModelList, parseRoleDefinition, parseScheduleDraft, parseSkillFrontmatter, parseTrigger, pendingImageTokens, persistFailureCode, persistParts, persistToolResults, persistedUsage, planPack, previewSkillImport, pricingFor, projectEntryForDisplay, pruneArtifacts, pruneAttachments, pruneRecordings, pruneSchedules, readImageSize, readMarketplaces, readPluginAbout, readPluginIcon, readPluginManifest, readPluginRecords, readProviderKeyEnv, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, resolveArtifactRetention, resolveCodeModeWorker, resolveComplianceDirs, resolveEntrySource, resolveInWorkspace, resolveMarketplaceRef, resolveMentions, resolveMultimodalPolicy, resolvePolicyDirs, resolvePricingAt, resolveProjectRoot, resolveScheduleBackend, resolveSessionReference, resolveSessionVisibility, resolveSettings, resolveSkillDirs, resolveSource, resolveTar, resolveWorkspace, restoreParts, revealScopedProvider, roleScopedProvider, roleSourceLabel, ruleCovers, ruleFromString, ruleToString, runCode, runCommand, sanitizeArgNames, sanitizeCommand, sanitizeFtsQuery, sanitizePath, sanitizeToolOutput, scanInstructions, scanPluginDir, scanSkillDirs, searchMarketplaces, setDisplayCurrency, setImportGate, setPluginEnabled, setTrustGate, settingValueChoices, settingValueKind, settingWriteApply, settingWriteLayers, settingWriteTargets, skillIndexDescription, skillIndexResidency, skillIndexStats, sniffMediaType, splitFrontmatter, staticToolProvider, stripArtifactData, substitutePluginRoot, suggestRuleFromApproval, systemOpenArgv, systemPromptSegments, toPosix, toolDefinitionTokens, toolMatches, toolTableTokens, totalTokens, traceSession, triggerPeriodMs, unescapeRuleContent, uninstallPlugin, unknownRoleSkills, unknownRoleTools, unloadedInstructionFiles, updateMarketplace, updatePlugin, usdToMicros, validateSchedule, validateTrigger, validateWindow, withGoalCompression, withGoalPrompt, workspaceDisplayPath, writeSettingValue };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { existsSync, statSync, readdirSync, readFileSync, mkdirSync, writeFileSync, rmSync, renameSync, symlinkSync, cpSync, lstatSync, unlinkSync, rmdirSync, mkdtempSync,
|
|
1
|
+
import { existsSync, statSync, readdirSync, readFileSync, mkdirSync, writeFileSync, rmSync, renameSync, realpathSync, symlinkSync, cpSync, lstatSync, unlinkSync, rmdirSync, mkdtempSync, copyFileSync, openSync, writeSync, closeSync, readSync } from 'fs';
|
|
2
2
|
import { homedir, platform, tmpdir, hostname } from 'os';
|
|
3
|
-
import { join, dirname, resolve, relative, isAbsolute,
|
|
3
|
+
import { join, dirname, resolve, relative, isAbsolute, extname, sep, basename } from 'path';
|
|
4
4
|
import { execFile, execSync, execFileSync, spawn } from 'child_process';
|
|
5
5
|
import { createLogger, dbPath, resolveHomeDir, DEFAULT_MAX_TURNS, PROJECT_DIR_NAME, guardSpawn, t, suggestKey, misspelledKeyIssues, openDatabase, migrate, releaseDatabase, parseLenient, issueDetails, splitWords, unknownKeyIssues, checkpointsDir, expandPath, pluginsDir, projectHooksPath, projectClaudeSettingsPath, projectClaudeLocalSettingsPath, projectSettingsPath, projectLocalSettingsPath, projectPoliciesDir, trustedImportsPath, canProbeGit, budgetStatePath, artifactsDir, isInWorkspace, UNLIMITED_TURNS, turnLimitOf, configPath, managedSettingsPath, getSecretValues, listStoredSecretNames, maskApiKey, setSectionField, countCodePoints, headCodePoints, attachmentsDir, workspacesPath, samePath, lastSessionsPath, appearancePath, automationLogsDir, projectComplianceDir, projectSkillsDir, trustPath, projectCommandsDir, detectBackend, EXEC_PATH_AS_NODE_ENV, isolate, createStreamDecoder, parseShellCommand, writeArtifact, envPath, checkDangerousCommand, checkObfuscation, keepHeadAndTail, normalizeForMatch, isReadOnlyCommand, CODE_EXEC_ROOTS, tailCodePoints } from '@epoch-agent/infra';
|
|
6
6
|
export { IS_WINDOWS, WINDOWS_HIDE_FLAGS, buildBwrapArgs, buildProfile, checkDangerousCommand, checkObfuscation, createLogger, detectBackend, getDefaultShell, getPythonCommand, isInWorkspace, isReadOnlyCommand, isolate, maskApiKey, probeBubblewrap, probeSeatbelt, complianceDir as resolveComplianceDir, policiesDir as resolvePoliciesDir, setLogLevel } from '@epoch-agent/infra';
|
|
@@ -2907,8 +2907,8 @@ function resolvePathPattern(content, workDir) {
|
|
|
2907
2907
|
const head = wildcardAt === -1 ? raw : raw.slice(0, wildcardAt);
|
|
2908
2908
|
const tail = wildcardAt === -1 ? "" : raw.slice(wildcardAt);
|
|
2909
2909
|
const resolvedHead = base === "" && isAbsolute(head) ? resolve(head) : resolve(base || ".", head);
|
|
2910
|
-
const
|
|
2911
|
-
return `${resolvedHead}${
|
|
2910
|
+
const sep8 = head.endsWith("/") || head.endsWith("\\") ? "/" : "";
|
|
2911
|
+
return `${resolvedHead}${sep8}${tail}`;
|
|
2912
2912
|
}
|
|
2913
2913
|
function contentMatchesPath(content, operation) {
|
|
2914
2914
|
if (!operation.target) return false;
|
|
@@ -5780,6 +5780,7 @@ function reason2(err) {
|
|
|
5780
5780
|
}
|
|
5781
5781
|
// src/extensions/commands.ts
|
|
5782
5782
|
var CommandFrontmatterSchema = z.object({
|
|
5783
|
+
displayName: z.string().min(1).optional(),
|
|
5783
5784
|
description: z.string().min(1),
|
|
5784
5785
|
"argument-hint": z.string().min(1).optional(),
|
|
5785
5786
|
"allowed-tools": z.array(z.string().min(1)).optional(),
|
|
@@ -5855,6 +5856,7 @@ function loadCommandFile(file, source, prefix) {
|
|
|
5855
5856
|
command: {
|
|
5856
5857
|
name,
|
|
5857
5858
|
prompt,
|
|
5859
|
+
...fm.displayName ? { displayName: fm.displayName } : {},
|
|
5858
5860
|
description: fm.description,
|
|
5859
5861
|
...fm["argument-hint"] ? { argumentHint: fm["argument-hint"] } : {},
|
|
5860
5862
|
...fm["allowed-tools"] ? { allowedTools: fm["allowed-tools"] } : {},
|
|
@@ -7169,6 +7171,78 @@ function listNames(dir, kind) {
|
|
|
7169
7171
|
return [];
|
|
7170
7172
|
}
|
|
7171
7173
|
}
|
|
7174
|
+
var PLUGIN_ICON_MAX_BYTES = 32 * 1024;
|
|
7175
|
+
var ICON_MIME = {
|
|
7176
|
+
".png": "image/png",
|
|
7177
|
+
".jpg": "image/jpeg",
|
|
7178
|
+
".jpeg": "image/jpeg",
|
|
7179
|
+
".webp": "image/webp",
|
|
7180
|
+
".gif": "image/gif",
|
|
7181
|
+
".svg": "image/svg+xml"
|
|
7182
|
+
};
|
|
7183
|
+
var DATA_URL_MAX_CHARS = Math.ceil(PLUGIN_ICON_MAX_BYTES / 3) * 4 + 64;
|
|
7184
|
+
var HAS_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
|
|
7185
|
+
function readPluginIcon(dir) {
|
|
7186
|
+
const declared = readPluginManifest(dir).manifest?.icon?.trim();
|
|
7187
|
+
if (!declared) return void 0;
|
|
7188
|
+
if (/^data:image\//i.test(declared)) {
|
|
7189
|
+
return declared.length <= DATA_URL_MAX_CHARS ? declared : void 0;
|
|
7190
|
+
}
|
|
7191
|
+
if (HAS_SCHEME.test(declared) || declared.startsWith("//") || isAbsolute(declared)) {
|
|
7192
|
+
return void 0;
|
|
7193
|
+
}
|
|
7194
|
+
return inlineFile(dir, declared);
|
|
7195
|
+
}
|
|
7196
|
+
function inlineFile(dir, rel) {
|
|
7197
|
+
const mime = ICON_MIME[extname(rel).toLowerCase()];
|
|
7198
|
+
if (mime === void 0) return void 0;
|
|
7199
|
+
try {
|
|
7200
|
+
const root = realpathSync(dir);
|
|
7201
|
+
const file = realpathSync(join(root, rel));
|
|
7202
|
+
if (!file.startsWith(root + sep)) return void 0;
|
|
7203
|
+
const st = statSync(file);
|
|
7204
|
+
if (!st.isFile() || st.size > PLUGIN_ICON_MAX_BYTES) return void 0;
|
|
7205
|
+
return `data:${mime};base64,${readFileSync(file).toString("base64")}`;
|
|
7206
|
+
} catch {
|
|
7207
|
+
return void 0;
|
|
7208
|
+
}
|
|
7209
|
+
}
|
|
7210
|
+
// src/plugin/install-progress.ts
|
|
7211
|
+
var BYTE_STEP_INTERVAL_MS = 200;
|
|
7212
|
+
function emitStep(opts, step2) {
|
|
7213
|
+
opts.onStep?.(step2);
|
|
7214
|
+
}
|
|
7215
|
+
function byteReporter(opts, phase, target, now = Date.now) {
|
|
7216
|
+
if (!opts.onStep) return () => {
|
|
7217
|
+
};
|
|
7218
|
+
let lastAt = -Infinity;
|
|
7219
|
+
let lastReceived = 0;
|
|
7220
|
+
return (received, total) => {
|
|
7221
|
+
const at = now();
|
|
7222
|
+
const done2 = total !== void 0 && received >= total;
|
|
7223
|
+
const bigJump = total !== void 0 && total > 0 && (received - lastReceived) / total >= 0.01;
|
|
7224
|
+
if (!done2 && !bigJump && at - lastAt < BYTE_STEP_INTERVAL_MS) return;
|
|
7225
|
+
lastAt = at;
|
|
7226
|
+
lastReceived = received;
|
|
7227
|
+
emitStep(opts, { phase, target, received, ...total !== void 0 ? { total } : {} });
|
|
7228
|
+
};
|
|
7229
|
+
}
|
|
7230
|
+
async function readBodyWithProgress(response, report3) {
|
|
7231
|
+
const declared = Number(response.headers.get("content-length"));
|
|
7232
|
+
const total = Number.isFinite(declared) && declared > 0 ? declared : void 0;
|
|
7233
|
+
if (!response.body) return Buffer.from(await response.arrayBuffer());
|
|
7234
|
+
const reader = response.body.getReader();
|
|
7235
|
+
const chunks = [];
|
|
7236
|
+
let received = 0;
|
|
7237
|
+
for (; ; ) {
|
|
7238
|
+
const { done: done2, value } = await reader.read();
|
|
7239
|
+
if (done2) break;
|
|
7240
|
+
chunks.push(value);
|
|
7241
|
+
received += value.byteLength;
|
|
7242
|
+
report3(received, total);
|
|
7243
|
+
}
|
|
7244
|
+
return Buffer.concat(chunks);
|
|
7245
|
+
}
|
|
7172
7246
|
var MARKETPLACE_FILE = "epoch-marketplace.json";
|
|
7173
7247
|
var NAME_PATTERN = PLUGIN_NAME_PATTERN;
|
|
7174
7248
|
var EntryCategoryInput = z.union([z.string().min(1), z.array(z.string().min(1))]).optional().catch(void 0);
|
|
@@ -7607,11 +7681,13 @@ ${detail}` }) };
|
|
|
7607
7681
|
staging,
|
|
7608
7682
|
opts
|
|
7609
7683
|
});
|
|
7684
|
+
const icon = readPluginIcon(readDir);
|
|
7610
7685
|
const preview3 = {
|
|
7611
7686
|
manifest,
|
|
7612
7687
|
source: resolved,
|
|
7613
7688
|
inventory: scanPluginDir(readDir, manifest.name),
|
|
7614
7689
|
about: readPluginAbout(readDir, manifest.name),
|
|
7690
|
+
...icon ? { icon } : {},
|
|
7615
7691
|
...conflict ? { conflict } : {},
|
|
7616
7692
|
...versionUnmet ? { versionUnmet } : {},
|
|
7617
7693
|
...closure.report.length > 0 ? { dependencies: closure.report } : {}
|
|
@@ -7763,6 +7839,7 @@ async function resolveClosure(input) {
|
|
|
7763
7839
|
continue;
|
|
7764
7840
|
}
|
|
7765
7841
|
opts.onProgress?.(t("plugin_install.dep_fetching", { name, source: located.source }));
|
|
7842
|
+
emitStep(opts, { phase: "dep", target: located.source, dep: name });
|
|
7766
7843
|
const stagingDir = join(staging, `dep-${plans.length}`);
|
|
7767
7844
|
const fetched = await fetchInto(source, stagingDir, opts);
|
|
7768
7845
|
if (!fetched.ok) {
|
|
@@ -7863,14 +7940,15 @@ async function fetchInto(source, staging, opts) {
|
|
|
7863
7940
|
if (source.type === "git") return fetchGit(source, staging, opts);
|
|
7864
7941
|
if (source.type === "npm") return fetchNpm(source, staging, opts);
|
|
7865
7942
|
if (source.type === "host") return fetchFromHost(source, staging, opts);
|
|
7866
|
-
if (source.localFile) return fetchLocalArchive(source, staging);
|
|
7943
|
+
if (source.localFile) return fetchLocalArchive(source, staging, opts);
|
|
7867
7944
|
return fetchArchive(source, staging, opts);
|
|
7868
7945
|
}
|
|
7869
|
-
async function fetchLocalArchive(source, staging) {
|
|
7946
|
+
async function fetchLocalArchive(source, staging, opts) {
|
|
7870
7947
|
if (!existsSync(source.target)) {
|
|
7871
7948
|
return { ok: false, reason: t("plugin_install.archive_missing", { path: source.target }) };
|
|
7872
7949
|
}
|
|
7873
7950
|
mkdirSync(staging, { recursive: true });
|
|
7951
|
+
emitStep(opts, { phase: "extract", target: source.target });
|
|
7874
7952
|
return extractArchive(source.target, staging);
|
|
7875
7953
|
}
|
|
7876
7954
|
async function fetchFromHost(source, staging, opts) {
|
|
@@ -7879,11 +7957,23 @@ async function fetchFromHost(source, staging, opts) {
|
|
|
7879
7957
|
return { ok: false, reason: t("plugin_install.host_fetch_unavailable") };
|
|
7880
7958
|
}
|
|
7881
7959
|
opts.onProgress?.(t("plugin_install.host_fetching", { target: source.target }));
|
|
7960
|
+
emitStep(opts, { phase: "host", target: source.target });
|
|
7882
7961
|
mkdirSync(staging, { recursive: true });
|
|
7883
7962
|
return withDownloadDir(async (dl) => {
|
|
7884
7963
|
let answer;
|
|
7885
7964
|
try {
|
|
7886
|
-
|
|
7965
|
+
const report3 = byteReporter(opts, "host", source.target);
|
|
7966
|
+
answer = await ask({
|
|
7967
|
+
target: source.target,
|
|
7968
|
+
destDir: dl,
|
|
7969
|
+
onProgress: ({ received, total }) => {
|
|
7970
|
+
if (!Number.isFinite(received) || received < 0) return;
|
|
7971
|
+
report3(
|
|
7972
|
+
received,
|
|
7973
|
+
total !== void 0 && Number.isFinite(total) && total > 0 ? total : void 0
|
|
7974
|
+
);
|
|
7975
|
+
}
|
|
7976
|
+
});
|
|
7887
7977
|
} catch (err) {
|
|
7888
7978
|
return {
|
|
7889
7979
|
ok: false,
|
|
@@ -7904,6 +7994,7 @@ async function fetchFromHost(source, staging, opts) {
|
|
|
7904
7994
|
reason: t("plugin_install.host_fetch_no_file", { path: answer.archivePath })
|
|
7905
7995
|
};
|
|
7906
7996
|
}
|
|
7997
|
+
emitStep(opts, { phase: "extract", target: source.target });
|
|
7907
7998
|
return extractArchive(answer.archivePath, staging);
|
|
7908
7999
|
});
|
|
7909
8000
|
}
|
|
@@ -7915,6 +8006,7 @@ function fetchLocal(source) {
|
|
|
7915
8006
|
}
|
|
7916
8007
|
async function fetchGit(source, staging, opts) {
|
|
7917
8008
|
opts.onProgress?.(t("plugin_install.cloning", { target: source.target }));
|
|
8009
|
+
emitStep(opts, { phase: "git", target: source.target });
|
|
7918
8010
|
const result = await runCommand("git", ["clone", "--depth", "1", source.target, staging]);
|
|
7919
8011
|
if (!result.ok) {
|
|
7920
8012
|
return { ok: false, reason: t("plugin_install.clone_failed", { detail: result.detail }) };
|
|
@@ -7924,6 +8016,7 @@ async function fetchGit(source, staging, opts) {
|
|
|
7924
8016
|
}
|
|
7925
8017
|
async function fetchNpm(source, staging, opts) {
|
|
7926
8018
|
opts.onProgress?.(t("plugin_install.npm_fetching", { target: source.target }));
|
|
8019
|
+
emitStep(opts, { phase: "npm", target: source.target });
|
|
7927
8020
|
mkdirSync(staging, { recursive: true });
|
|
7928
8021
|
return withDownloadDir(async (dl) => {
|
|
7929
8022
|
const packed = await runCommand(
|
|
@@ -7936,11 +8029,13 @@ async function fetchNpm(source, staging, opts) {
|
|
|
7936
8029
|
}
|
|
7937
8030
|
const tarball = packed.stdout.trim().split("\n").pop()?.trim();
|
|
7938
8031
|
if (!tarball) return { ok: false, reason: t("plugin_install.npm_no_tarball") };
|
|
8032
|
+
emitStep(opts, { phase: "extract", target: source.target });
|
|
7939
8033
|
return extractArchive(isAbsolute(tarball) ? tarball : join(dl, tarball), staging);
|
|
7940
8034
|
});
|
|
7941
8035
|
}
|
|
7942
8036
|
async function fetchArchive(source, staging, opts) {
|
|
7943
8037
|
opts.onProgress?.(t("plugin_install.downloading", { target: source.target }));
|
|
8038
|
+
emitStep(opts, { phase: "download", target: source.target });
|
|
7944
8039
|
mkdirSync(staging, { recursive: true });
|
|
7945
8040
|
let bytes;
|
|
7946
8041
|
try {
|
|
@@ -7954,7 +8049,7 @@ async function fetchArchive(source, staging, opts) {
|
|
|
7954
8049
|
})
|
|
7955
8050
|
};
|
|
7956
8051
|
}
|
|
7957
|
-
bytes =
|
|
8052
|
+
bytes = await readBodyWithProgress(response, byteReporter(opts, "download", source.target));
|
|
7958
8053
|
} catch (err) {
|
|
7959
8054
|
return {
|
|
7960
8055
|
ok: false,
|
|
@@ -7979,6 +8074,7 @@ async function fetchArchive(source, staging, opts) {
|
|
|
7979
8074
|
return withDownloadDir(async (dl) => {
|
|
7980
8075
|
const archive = join(dl, `download${archiveExt(source.target)}`);
|
|
7981
8076
|
writeFileSync(archive, bytes);
|
|
8077
|
+
emitStep(opts, { phase: "extract", target: source.target });
|
|
7982
8078
|
return extractArchive(archive, staging);
|
|
7983
8079
|
});
|
|
7984
8080
|
}
|
|
@@ -8560,6 +8656,7 @@ async function hashOf(path) {
|
|
|
8560
8656
|
var MAX_PATHS = 256;
|
|
8561
8657
|
var PATH_KEYS = ["path", "filePath", "file_path"];
|
|
8562
8658
|
var PATHS_KEYS = ["paths", "files"];
|
|
8659
|
+
var EDITS_KEY = "edits";
|
|
8563
8660
|
var V4A_FILE = /^\*\*\* (?:Update|Add|Delete) File:\s*(.+)$/gm;
|
|
8564
8661
|
function affectedPaths(args, workDir) {
|
|
8565
8662
|
const out = /* @__PURE__ */ new Set();
|
|
@@ -8570,6 +8667,7 @@ function affectedPaths(args, workDir) {
|
|
|
8570
8667
|
for (const key of PATHS_KEYS) {
|
|
8571
8668
|
for (const p of asStringList(args[key])) out.add(toAbsolute(p, workDir));
|
|
8572
8669
|
}
|
|
8670
|
+
for (const p of editPaths(args[EDITS_KEY])) out.add(toAbsolute(p, workDir));
|
|
8573
8671
|
const patch = args["patch"];
|
|
8574
8672
|
if (typeof patch === "string") {
|
|
8575
8673
|
for (const m of patch.matchAll(V4A_FILE)) {
|
|
@@ -8579,6 +8677,17 @@ function affectedPaths(args, workDir) {
|
|
|
8579
8677
|
}
|
|
8580
8678
|
return [...out].slice(0, MAX_PATHS);
|
|
8581
8679
|
}
|
|
8680
|
+
function editPaths(value) {
|
|
8681
|
+
if (!Array.isArray(value)) return [];
|
|
8682
|
+
const out = [];
|
|
8683
|
+
for (const item of value) {
|
|
8684
|
+
if (typeof item !== "object" || item === null) continue;
|
|
8685
|
+
const rec = item;
|
|
8686
|
+
const key = PATH_KEYS.find((k) => typeof rec[k] === "string" && rec[k] !== "");
|
|
8687
|
+
if (key) out.push(rec[key]);
|
|
8688
|
+
}
|
|
8689
|
+
return out;
|
|
8690
|
+
}
|
|
8582
8691
|
function asStringList(value) {
|
|
8583
8692
|
if (typeof value === "string") return value ? [value] : [];
|
|
8584
8693
|
if (!Array.isArray(value)) return [];
|
|
@@ -11519,8 +11628,8 @@ function sourceLabel2(toolName) {
|
|
|
11519
11628
|
let label = toolName;
|
|
11520
11629
|
if (toolName.startsWith("mcp__")) {
|
|
11521
11630
|
const rest = toolName.slice("mcp__".length);
|
|
11522
|
-
const
|
|
11523
|
-
label = `mcp:${
|
|
11631
|
+
const sep8 = rest.indexOf("__");
|
|
11632
|
+
label = `mcp:${sep8 > 0 ? rest.slice(0, sep8) : rest}`;
|
|
11524
11633
|
}
|
|
11525
11634
|
return label.replace(/[^A-Za-z0-9_.:-]/g, "_");
|
|
11526
11635
|
}
|
|
@@ -12820,6 +12929,9 @@ var SidebarMenuItemSchema = z.object({
|
|
|
12820
12929
|
label: z.string().min(1),
|
|
12821
12930
|
icon: z.string().min(1).optional()
|
|
12822
12931
|
});
|
|
12932
|
+
var SidebarNavItemSchema = SidebarMenuItemSchema.extend({
|
|
12933
|
+
pinned: z.boolean().optional()
|
|
12934
|
+
});
|
|
12823
12935
|
var BlankCardSchema = z.object({
|
|
12824
12936
|
id: z.string().min(1),
|
|
12825
12937
|
title: z.string().min(1),
|
|
@@ -12903,7 +13015,7 @@ var EpochConfigSchema = z.object({
|
|
|
12903
13015
|
statusLine: StatusLineSchema.optional(),
|
|
12904
13016
|
display: DisplaySchema2.optional(),
|
|
12905
13017
|
brand: z.string().min(1).optional(),
|
|
12906
|
-
sidebarMenu: z.array(
|
|
13018
|
+
sidebarMenu: z.array(SidebarNavItemSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
|
|
12907
13019
|
message: "sidebarMenu: id must be unique"
|
|
12908
13020
|
}).optional(),
|
|
12909
13021
|
userMenu: z.array(SidebarMenuItemSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
|
|
@@ -24573,4 +24685,4 @@ function trunc(stdout, stderr) {
|
|
|
24573
24685
|
* `--tree` 的命令帮助里,让用户自己知道 `--tree` 意味着什么。
|
|
24574
24686
|
*/
|
|
24575
24687
|
|
|
24576
|
-
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, AgentLoop, AppearanceStore, ApprovalCache, BLOCKED_TOOLS, BudgetGuard, BudgetStore, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, CheckpointManager, CheckpointStore, CodeSandbox, ComplianceEngine, ContextCompressor, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_MAX_HOLD_CHARS, DelegateManager, EMPTY_RULES, EPOCH_DISK_LEDGER, EpochConfigSchema, FTS_TABLES, FTS_TRIGGERS, GOAL_BLOCK_CODES, GoalService, GoalStore, HEADLESS_AUDIT_CODES, HookManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, ImageLoadError, ImportTrustStore, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, LastOpenSessions, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, ManagedPolicyError, ManagedSettingsSchema, MemoryManager, ModelFailureTracker, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, PACK_EXCLUDES, PACK_MAX_BYTES, PACK_MAX_FILES, PERMISSION_AUDIT_CODES, PLUGIN_LAYOUT, PLUGIN_MANIFEST_FILE, PLUGIN_MANIFEST_KEYS, PLUGIN_NAME_PATTERN, PLUGIN_ROOT_ENV, PLUGIN_ROOT_TOKEN, PLUGIN_VISIBILITY, POLICY_DECISIONS, PROBE_VERSION, PROJECT_AGENTS_SUBDIR, PROVIDER_NO_CREDENTIAL, PermissionManager, PlanModeState, PluginAuthorSchema, PluginStore, PolicyRuleSchema, ProviderError, ProviderRouter, RECORDING_KEEP_RUNS, RECORDING_MAX_BYTES, ROLE_FRONTMATTER_SCHEMA, RUN_CODE_TOOL, RecentWorkspaces, SANDBOX_COVERS, SANDBOX_EXCLUDES, SCALAR_KEYS, SCHEDULE_DEFAULTS, SCHEDULE_DEFAULT_ALLOWLIST, SCHEDULE_FORM_BUDGET_USD, SCHEDULE_ISSUE_CODES, SCHTASKS_FOLDER, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, SessionManager, SessionQueries, SessionReferences, SettingsFileError, SettingsFileSchema, SkillLearner, SkillSystem, TOOL_SEARCH_TOOL, TaskNoticeTracker, ToolRegistry, TrackerDB, TrustManager, Workspace, acquireScheduleLock, addMarketplace, addUsage, admitArtifact, admitArtifacts, affectedPaths, approvalEntryFor, approvalRootFor, artifactLaunchArgv, artifactOpenRefusal, assertLevelAllowed, blockedRoleTools, buildContextBreakdown, buildFireArgv, buildFtsMatchQuery, buildSchemaExports, buildSystemPrompt, buildTrigramMatchQuery, builtinRoles, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, defaultModelOf, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelListCandidates, needsAllowlist, nextFallbackModel, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, openArtifact, originOf, packFileName, packPlugin, parseClaudeSettingsHooks, parseClock, parseDate, parseFrontmatter, parseHooksConfig, parseHooksConfigVerbose, parseImportLine, parseModelList, parseRoleDefinition, parseScheduleDraft, parseSkillFrontmatter, parseTrigger, pendingImageTokens, persistFailureCode, persistParts, persistToolResults, persistedUsage, planPack, previewSkillImport, pricingFor, projectEntryForDisplay, pruneArtifacts, pruneAttachments, pruneRecordings, pruneSchedules, readImageSize, readMarketplaces, readPluginAbout, readPluginManifest, readPluginRecords, readProviderKeyEnv, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, resolveArtifactRetention, resolveCodeModeWorker, resolveComplianceDirs, resolveEntrySource, resolveInWorkspace, resolveMarketplaceRef, resolveMentions, resolveMultimodalPolicy, resolvePolicyDirs, resolvePricingAt, resolveProjectRoot, resolveScheduleBackend, resolveSessionReference, resolveSessionVisibility, resolveSettings, resolveSkillDirs, resolveSource, resolveTar, resolveWorkspace, restoreParts, revealScopedProvider, roleScopedProvider, roleSourceLabel, ruleCovers, ruleFromString, ruleToString, runCode, runCommand2 as runCommand, sanitizeArgNames, sanitizeCommand, sanitizeFtsQuery, sanitizePath, sanitizeToolOutput, scanInstructions, scanPluginDir, scanSkillDirs, searchMarketplaces, setDisplayCurrency, setImportGate, setPluginEnabled, setTrustGate, settingValueChoices, settingValueKind, settingWriteApply, settingWriteLayers, settingWriteTargets, skillIndexDescription, skillIndexResidency, skillIndexStats, sniffMediaType, splitFrontmatter, staticToolProvider, stripArtifactData, substitutePluginRoot, suggestRuleFromApproval, systemOpenArgv, systemPromptSegments, toPosix, toolDefinitionTokens, toolMatches, toolTableTokens, totalTokens, traceSession, triggerPeriodMs, unescapeRuleContent, uninstallPlugin, unknownRoleSkills, unknownRoleTools, unloadedInstructionFiles, updateMarketplace, updatePlugin, usdToMicros, validateSchedule, validateTrigger, validateWindow, withGoalCompression, withGoalPrompt, workspaceDisplayPath, writeSettingValue };
|
|
24688
|
+
export { ABOUT_DESC_MAX_CHARS, ABOUT_README_MAX_CHARS, AGENT_ROLE_DIAG_MODULE, ARTIFACT_MAX_TOTAL_BYTES, ARTIFACT_RETENTION_DEFAULTS, ATTACHMENT_MAX_TOTAL_BYTES, ATTACHMENT_RETENTION_DEFAULTS, AgentLoop, AppearanceStore, ApprovalCache, BLOCKED_TOOLS, BudgetGuard, BudgetStore, CHECKPOINT_MAX_TOTAL_BYTES, CLAUDE_EVENT_NAMES, CLAUDE_TOOL_NAMES, CODE_MODE_LIMITS, CODE_MODE_SDK_TAG, CONFIG_KEYS, CURRENT_CONFIG_VERSION, CheckpointManager, CheckpointStore, CodeSandbox, ComplianceEngine, ContextCompressor, DEFAULT_COMPLIANCE_ACTIONS, DEFAULT_COMPLIANCE_SETTINGS, DEFAULT_COMPRESSION_THRESHOLD, DEFAULT_GOAL_MAX_ROUNDS, DEFAULT_MAX_HOLD_CHARS, DelegateManager, EMPTY_RULES, EPOCH_DISK_LEDGER, EpochConfigSchema, FTS_TABLES, FTS_TRIGGERS, GOAL_BLOCK_CODES, GoalService, GoalStore, HEADLESS_AUDIT_CODES, HookManager, INSTRUCTION_BUDGET_CHARS, INSTRUCTION_FILES, ImageLoadError, ImportTrustStore, LAUNCHD_LABEL_PREFIX, LOCK_HEARTBEAT_MS, LOCK_STALE_MS, LastOpenSessions, MARKETPLACE_DISPLAY_FIELDS, MARKETPLACE_FILE, MAX_AUDIT_ENTRIES, MAX_COMMAND_DEPTH, MAX_GOAL_MAX_ROUNDS, MAX_IMPORT_DEPTH, MAX_LAST_OPEN_SESSIONS, MAX_OBJECTIVE_CHARS, MAX_REASON_CHARS, MAX_RECENT_WORKSPACES, MODEL_GIVE_UP_THRESHOLD, MULTIMODAL_DEFAULTS, ManagedPolicyError, ManagedSettingsSchema, MemoryManager, ModelFailureTracker, NOMINAL_TOTAL_BYTES, NO_REVEALED_TOOLS, PACK_EXCLUDES, PACK_MAX_BYTES, PACK_MAX_FILES, PERMISSION_AUDIT_CODES, PLUGIN_ICON_MAX_BYTES, PLUGIN_LAYOUT, PLUGIN_MANIFEST_FILE, PLUGIN_MANIFEST_KEYS, PLUGIN_NAME_PATTERN, PLUGIN_ROOT_ENV, PLUGIN_ROOT_TOKEN, PLUGIN_VISIBILITY, POLICY_DECISIONS, PROBE_VERSION, PROJECT_AGENTS_SUBDIR, PROVIDER_NO_CREDENTIAL, PermissionManager, PlanModeState, PluginAuthorSchema, PluginStore, PolicyRuleSchema, ProviderError, ProviderRouter, RECORDING_KEEP_RUNS, RECORDING_MAX_BYTES, ROLE_FRONTMATTER_SCHEMA, RUN_CODE_TOOL, RecentWorkspaces, SANDBOX_COVERS, SANDBOX_EXCLUDES, SCALAR_KEYS, SCHEDULE_DEFAULTS, SCHEDULE_DEFAULT_ALLOWLIST, SCHEDULE_FORM_BUDGET_USD, SCHEDULE_ISSUE_CODES, SCHTASKS_FOLDER, SESSION_MESSAGES_READ_TOOL, SESSION_MESSAGES_SEARCH_TOOL, SESSION_QUERY_TOOLS, SESSION_SEARCH_TOOL, SESSION_TRACE_TOOL, SETTINGS_LAYER_ORDER, SETTING_WRITE_KEYS, SETTING_WRITE_LAYERS, SKILL_ASSET_DIRS, SKILL_CREATE_TOOL, SKILL_EDIT_TOOL, SKILL_FILE, SKILL_PATCH_TOOL, SKILL_VIEW_TOOL, SKILL_WRITE_FILE_TOOL, SLASH_COMMANDS_DIAG_MODULE, ScheduleRecorder, ScheduleRegistrar, ScheduleStore, SessionManager, SessionQueries, SessionReferences, SettingsFileError, SettingsFileSchema, SkillLearner, SkillSystem, TOOL_SEARCH_TOOL, TaskNoticeTracker, ToolRegistry, TrackerDB, TrustManager, Workspace, acquireScheduleLock, addMarketplace, addUsage, admitArtifact, admitArtifacts, affectedPaths, approvalEntryFor, approvalRootFor, artifactLaunchArgv, artifactOpenRefusal, assertLevelAllowed, blockedRoleTools, buildContextBreakdown, buildFireArgv, buildFtsMatchQuery, buildSchemaExports, buildSystemPrompt, buildTrigramMatchQuery, builtinRoles, checkEpochVersion, checkFtsHealth, checkShadowing, classifyPersistFailure, classifyProviderError, clearModelCache, coalesceRecording, codeModeWorkerPath, commandNameFromRelPath, compileRuleLists, compressionOptions, computeCost, computeCostMicros, computeExecHash, countRules, createAllowAllGate, createAllowAllImportGate, createAskQuestionTool, createCodeExecTool, createDelegateTool, createDenyAllGate, createDenyAllImportGate, createGoalTool, createImportGate, createMemoryTool, createPlanModeTools, createRoleFile, createRoleScope, createRunCodeTool, createScheduleDraftTool, createSessionMessagesReadTool, createSessionMessagesSearchTool, createSessionSearchTool, createSessionSearchTools, createSessionTraceTool, createSkillViewTool, createSkillWriteTools, createTodoTool, createToolRevealState, createToolScope, createToolSearchTool, createTrustGate, currentEpochVersion, decideImport, decideTrust, defaultConfig, defaultModelOf, describeArtifactRefusal, describeBackgroundTask, describeHeadlessPolicy, describeIsolation, describeJsonError, diagnoseSchedules, discoverMarkdown, discoverModels, discoverProject, displayAllows, displayCurrency, draftCommandLine, draftWidening, escapeRuleContent, estimateImageTokens, estimateRunTokens, estimateTokens, evaluateSelection, expandCommand, expandImports, explainSetting, extractArchive, findInstructionFiles, findProjectInstructions, findRole, formatBytes, formatSkillIndex, formatUsd, gateForTool, getCapability, getConfigIssues, getConfigOrigins, getImportGate, getTrustGate, grantedPathsFor, hasDedicatedExecContent, hasExecTierContent, hasPromptCaching, hasProviderCredentials, hasReadTierContent, imageFromBase64, imageFromPath, imagePartTokens, importParts, importSkills, installPlugin, instructionDirs, instructionNotices, intervalSlots, inventoryProjectExtensions, inventoryTotal, isBlockCode, isCodeModeDeferred, isEmptyRules, isGoalPhase, isNonInteractive, isReadOnlySubCall, isSettingWriteLayer, isTransientPersistFailure, isValidPluginName, isWithinWindow, isWritableSettingKey, labelSlug, layerRank, listRunningSchedules, listSessionCandidates, listWorkspaceFiles, loadCommandDefinitions, loadCommandFile, loadCommands, loadConfig, loadHookSources, loadKeybindings, loadLexiconDir, loadLexiconFiles, loadPlugins, loadPolicyFiles, loadPolicyRules, loadRoleDefinitions, loadRoleDir, loadedImports, localDateString, managedSwitchNotes, mapClaudeToolName, mapEpochToolName, mapOperationType, matchPreauthorization, matchRuleLists, matchesHook, mentionsPluginRoot, mergeHeadlessPolicy, mergeRoles, mergeSchedulePatch, microsToUsd, modelListCandidates, needsAllowlist, nextFallbackModel, nextRunAt, noConfigOrigins, noManagedPolicy, noPlugins, openArtifact, originOf, packFileName, packPlugin, parseClaudeSettingsHooks, parseClock, parseDate, parseFrontmatter, parseHooksConfig, parseHooksConfigVerbose, parseImportLine, parseModelList, parseRoleDefinition, parseScheduleDraft, parseSkillFrontmatter, parseTrigger, pendingImageTokens, persistFailureCode, persistParts, persistToolResults, persistedUsage, planPack, previewSkillImport, pricingFor, projectEntryForDisplay, pruneArtifacts, pruneAttachments, pruneRecordings, pruneSchedules, readImageSize, readMarketplaces, readPluginAbout, readPluginIcon, readPluginManifest, readPluginRecords, readProviderKeyEnv, readRecording, readSessionSurface, reclaimFtsSpace, redactLine, refreshOpenRouterMetadata, removeMarketplace, removeRecordings, removeRoleFile, removeSessionArtifacts, removeSessionAttachments, renderImportTree, renderProjectContext, renderSdkDeclaration, renderSelfIndex, repairSchedules, resolveArtifactRetention, resolveCodeModeWorker, resolveComplianceDirs, resolveEntrySource, resolveInWorkspace, resolveMarketplaceRef, resolveMentions, resolveMultimodalPolicy, resolvePolicyDirs, resolvePricingAt, resolveProjectRoot, resolveScheduleBackend, resolveSessionReference, resolveSessionVisibility, resolveSettings, resolveSkillDirs, resolveSource, resolveTar, resolveWorkspace, restoreParts, revealScopedProvider, roleScopedProvider, roleSourceLabel, ruleCovers, ruleFromString, ruleToString, runCode, runCommand2 as runCommand, sanitizeArgNames, sanitizeCommand, sanitizeFtsQuery, sanitizePath, sanitizeToolOutput, scanInstructions, scanPluginDir, scanSkillDirs, searchMarketplaces, setDisplayCurrency, setImportGate, setPluginEnabled, setTrustGate, settingValueChoices, settingValueKind, settingWriteApply, settingWriteLayers, settingWriteTargets, skillIndexDescription, skillIndexResidency, skillIndexStats, sniffMediaType, splitFrontmatter, staticToolProvider, stripArtifactData, substitutePluginRoot, suggestRuleFromApproval, systemOpenArgv, systemPromptSegments, toPosix, toolDefinitionTokens, toolMatches, toolTableTokens, totalTokens, traceSession, triggerPeriodMs, unescapeRuleContent, uninstallPlugin, unknownRoleSkills, unknownRoleTools, unloadedInstructionFiles, updateMarketplace, updatePlugin, usdToMicros, validateSchedule, validateTrigger, validateWindow, withGoalCompression, withGoalPrompt, workspaceDisplayPath, writeSettingValue };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epoch-agent/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "epoch-agent 核心引擎:ReAct 循环、Provider 路由、工具调度、记忆管理",
|
|
6
6
|
"repository": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"gpt-tokenizer": "^3.4.0",
|
|
28
28
|
"js-yaml": "^5.2.3",
|
|
29
29
|
"zod": "^4.4.3",
|
|
30
|
-
"@epoch-agent/infra": "0.
|
|
31
|
-
"@epoch-agent/protocol": "0.
|
|
30
|
+
"@epoch-agent/infra": "0.29.0",
|
|
31
|
+
"@epoch-agent/protocol": "0.29.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@ai-sdk/alibaba": "^2.0.59",
|