@epoch-agent/core 1.0.0 → 1.1.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 CHANGED
@@ -12336,6 +12336,10 @@ declare const EpochConfigSchema: z.ZodObject<{
12336
12336
  }, z.core.$strip>>;
12337
12337
  }, z.core.$strip>>;
12338
12338
  brand: z.ZodOptional<z.ZodString>;
12339
+ brandWhenSidebarCollapsed: z.ZodOptional<z.ZodEnum<{
12340
+ hide: "hide";
12341
+ show: "show";
12342
+ }>>;
12339
12343
  sidebarMenu: z.ZodOptional<z.ZodArray<z.ZodObject<{
12340
12344
  id: z.ZodString;
12341
12345
  label: z.ZodString;
@@ -15531,6 +15535,12 @@ interface StoredAppearance {
15531
15535
  theme?: string;
15532
15536
  /** 语言偏好(`system | zh | en`)。缺席 = 没选过 */
15533
15537
  lang?: string;
15538
+ /**
15539
+ * 宽屏侧栏宽度(px,2026-10-14 侧栏可拖之后)。缺席 = 没拖过。
15540
+ * 同上面两格:这一层**只判结构**(正整数),上下限归 protocol 的
15541
+ * `isAppearanceSidebarWidth`,由写入口和首屏那段脚本各自把关 —— 盘上一个越界的数是惰性的
15542
+ */
15543
+ sidebarWidth?: number;
15534
15544
  }
15535
15545
  declare class AppearanceStore {
15536
15546
  private readonly filePath;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { PROVIDER_TYPES, OPERATION_TYPES as OPERATION_TYPES$1, COMPLIANCE_CATEGORIES, COMPLIANCE_ACTIONS, SEARCH_PROVIDER_TYPES, CURRENCIES, LANGS, isSettingsPaneId, SETTINGS_PANE_IDS, PERMISSION_LEVELS, SHELL_KINDS, cronTimes, SCHEDULE_MAX_TIMES_PER_DAY, SCHEDULE_INTERVAL_MIN_MINUTES, SCHEDULE_INTERVAL_MAX_MINUTES, ToolExposure, MAX_OPTIONS, MIN_OPTIONS, MAX_HEADER_CHARS, MAX_QUESTIONS, isPermissionLevel, SCHEDULE_DRAFT_TOOL, isValidAgentRoleName, DEFAULT_AGENT_ROLE, isValidCommandName, RESERVED_COMMAND_NAMES, parseModelRef, isWirePluginArchiveName, systemNote, formatMoney, totalUsageTokens, NOOP_TELEMETRY, METRIC, contentToText, GEN_AI, isPromptOversize, promptTokens, apiKeyEnvVar, PROVIDER_INFOS, isProviderType, API_KEY_ENV_VARS, KEY_ACTIONS, tableOf, perAction, isKeyAction, parseSequence, RESERVED_CHORDS, chordId, sequenceId, ACTION_CONTEXTS, SEQUENCE_CONTEXTS, assertNeverPart, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_SESSION_REFS, utf8ByteLength, truncateToBudget, attachSessionSurface, isContextNearlyFull, isOperationType, normalizeApproval, imagePartOmittedSummary, MAX_ATTACH_BYTES, SIMULTANEOUS_CONTEXTS, SESSION_REFERENCE_ERROR_CODES, filePartSummary, sessionPartSummary } from '@epoch-agent/protocol';
1
+ import { PROVIDER_TYPES, OPERATION_TYPES as OPERATION_TYPES$1, COMPLIANCE_CATEGORIES, COMPLIANCE_ACTIONS, SEARCH_PROVIDER_TYPES, CURRENCIES, LANGS, isSettingsPaneId, SETTINGS_PANE_IDS, BRAND_WHEN_SIDEBAR_COLLAPSED, PERMISSION_LEVELS, SHELL_KINDS, cronTimes, SCHEDULE_MAX_TIMES_PER_DAY, SCHEDULE_INTERVAL_MIN_MINUTES, SCHEDULE_INTERVAL_MAX_MINUTES, ToolExposure, MAX_OPTIONS, MIN_OPTIONS, MAX_HEADER_CHARS, MAX_QUESTIONS, isPermissionLevel, SCHEDULE_DRAFT_TOOL, isValidAgentRoleName, DEFAULT_AGENT_ROLE, isValidCommandName, RESERVED_COMMAND_NAMES, parseModelRef, isWirePluginArchiveName, systemNote, formatMoney, totalUsageTokens, NOOP_TELEMETRY, METRIC, contentToText, GEN_AI, isPromptOversize, promptTokens, apiKeyEnvVar, PROVIDER_INFOS, isProviderType, API_KEY_ENV_VARS, KEY_ACTIONS, tableOf, perAction, isKeyAction, parseSequence, RESERVED_CHORDS, chordId, sequenceId, ACTION_CONTEXTS, SEQUENCE_CONTEXTS, assertNeverPart, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_SESSION_REFS, utf8ByteLength, truncateToBudget, attachSessionSurface, isContextNearlyFull, isOperationType, normalizeApproval, imagePartOmittedSummary, MAX_ATTACH_BYTES, SIMULTANEOUS_CONTEXTS, SESSION_REFERENCE_ERROR_CODES, filePartSummary, sessionPartSummary } from '@epoch-agent/protocol';
2
2
  export { API_KEY_ENV_VARS, COMPLIANCE_ACTIONS, COMPLIANCE_CATEGORIES, MAX_ATTACH_BYTES, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_SESSION_ATTACH_BYTES, MAX_SESSION_REFS, OPERATION_TYPES, PERMISSION_LEVELS, PLAN_OUTCOMES, PROVIDER_INFOS, PROVIDER_TYPES, ToolExposure, apiKeyEnvVar, extractAllMentions, extractMentions, extractSessionMentions, getProviderInfo, isOperationType, isPermissionLevel, isPlanOutcome, isProviderType, normalizeApproval } from '@epoch-agent/protocol';
3
3
  import { existsSync, statSync, readdirSync, readFileSync, mkdirSync, writeFileSync, rmSync, renameSync, realpathSync, symlinkSync, cpSync, lstatSync, unlinkSync, rmdirSync, mkdtempSync, copyFileSync, openSync, writeSync, closeSync, readSync } from 'fs';
4
4
  import { homedir, platform, tmpdir, hostname } from 'os';
@@ -13186,6 +13186,7 @@ var EpochConfigSchema = z.object({
13186
13186
  statusLine: StatusLineSchema.optional(),
13187
13187
  display: DisplaySchema2.optional(),
13188
13188
  brand: z.string().min(1).optional(),
13189
+ brandWhenSidebarCollapsed: z.enum(BRAND_WHEN_SIDEBAR_COLLAPSED).optional(),
13189
13190
  sidebarMenu: z.array(SidebarNavItemSchema).min(1).refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
13190
13191
  message: "sidebarMenu: id must be unique"
13191
13192
  }).refine((items) => items.filter((item) => item.primary === true).length <= 1, {
@@ -19105,6 +19106,7 @@ function isLastOpenSession(value) {
19105
19106
  const v = value;
19106
19107
  return typeof v["root"] === "string" && v["root"].length > 0 && typeof v["sessionId"] === "string" && v["sessionId"].length > 0 && typeof v["at"] === "number";
19107
19108
  }
19109
+ var isWidthShaped = (value) => typeof value === "number" && Number.isInteger(value) && value > 0;
19108
19110
  var FILE_VERSION4 = 1;
19109
19111
  function describe9(err) {
19110
19112
  return err instanceof Error ? err.message : String(err);
@@ -19127,7 +19129,10 @@ var AppearanceStore = class {
19127
19129
  const value = patch[key];
19128
19130
  if (typeof value === "string" && value.length > 0) next[key] = value;
19129
19131
  }
19130
- if (next.theme === this.prefs.theme && next.lang === this.prefs.lang) return;
19132
+ if (isWidthShaped(patch.sidebarWidth)) next.sidebarWidth = patch.sidebarWidth;
19133
+ if (next.theme === this.prefs.theme && next.lang === this.prefs.lang && next.sidebarWidth === this.prefs.sidebarWidth) {
19134
+ return;
19135
+ }
19131
19136
  this.prefs = next;
19132
19137
  this.save();
19133
19138
  }
@@ -19151,6 +19156,7 @@ var AppearanceStore = class {
19151
19156
  if (file.version !== FILE_VERSION4) return;
19152
19157
  if (typeof file.theme === "string" && file.theme.length > 0) this.prefs.theme = file.theme;
19153
19158
  if (typeof file.lang === "string" && file.lang.length > 0) this.prefs.lang = file.lang;
19159
+ if (isWidthShaped(file.sidebarWidth)) this.prefs.sidebarWidth = file.sidebarWidth;
19154
19160
  }
19155
19161
  save() {
19156
19162
  const body2 = JSON.stringify(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epoch-agent/core",
3
- "version": "1.0.0",
3
+ "version": "1.1.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": "1.0.0",
31
- "@epoch-agent/protocol": "1.0.0"
30
+ "@epoch-agent/infra": "1.1.0",
31
+ "@epoch-agent/protocol": "1.1.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@ai-sdk/alibaba": "^2.0.59",