scream-code 0.9.2 → 0.9.3

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.
@@ -46,9 +46,9 @@ import { lookup } from "node:dns/promises";
46
46
  import { isIP } from "node:net";
47
47
  import { AsyncLocalStorage } from "node:async_hooks";
48
48
  import { Command, Option } from "commander";
49
- import { CombinedAutocompleteProvider, Container, Editor, Image, Input, Key, Markdown, ProcessTerminal, Spacer, TUI, Text, decodeKittyPrintable, deleteAllKittyImages, fuzzyFilter, fuzzyMatch, getCapabilities, getImageDimensions, isKeyRelease, matchesKey, truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
50
- import chalk, { chalkStderr } from "chalk";
51
49
  import { createInterface } from "node:readline/promises";
50
+ import chalk, { chalkStderr } from "chalk";
51
+ import { CombinedAutocompleteProvider, Container, Editor, Image, Input, Key, Markdown, ProcessTerminal, Spacer, TUI, Text, decodeKittyPrintable, deleteAllKittyImages, fuzzyFilter, fuzzyMatch, getCapabilities, getImageDimensions, isKeyRelease, matchesKey, truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
52
52
  import { highlight, supportsLanguage } from "cli-highlight";
53
53
  import { diffWords } from "diff";
54
54
  import { promisify } from "node:util";
@@ -81345,10 +81345,10 @@ function blockDecision(event, results) {
81345
81345
  }
81346
81346
  function toHookInputData(input) {
81347
81347
  const result = {};
81348
- for (const [key, value] of Object.entries(input)) result[camelToSnake$2(key)] = value;
81348
+ for (const [key, value] of Object.entries(input)) result[camelToSnake$1(key)] = value;
81349
81349
  return result;
81350
81350
  }
81351
- function camelToSnake$2(value) {
81351
+ function camelToSnake$1(value) {
81352
81352
  return value.replaceAll(/[A-Z]/g, (ch) => `_${ch.toLowerCase()}`);
81353
81353
  }
81354
81354
  //#endregion
@@ -99668,7 +99668,7 @@ function rawThinking(config) {
99668
99668
  function snakeToCamel(str) {
99669
99669
  return str.replaceAll(/_([a-z])/g, (_, ch) => ch.toUpperCase());
99670
99670
  }
99671
- function camelToSnake$1(str) {
99671
+ function camelToSnake(str) {
99672
99672
  return str.replaceAll(/[A-Z]/g, (ch) => `_${ch.toLowerCase()}`);
99673
99673
  }
99674
99674
  const DEFAULT_CONFIG_FILE_TEXT = `# ~/.scream-code/config.toml
@@ -99835,7 +99835,7 @@ function configToTomlData(config) {
99835
99835
  "defaultPlanMode",
99836
99836
  "mergeAllAvailableSkills",
99837
99837
  "extraSkillDirs"
99838
- ]) setDefined(out, camelToSnake$1(key), config[key]);
99838
+ ]) setDefined(out, camelToSnake(key), config[key]);
99839
99839
  setRecordSection(out, "providers", config.providers, providerToToml);
99840
99840
  setRecordSection(out, "models", config.models, modelToToml);
99841
99841
  setSection(out, "thinking", config.thinking, thinkingToToml);
@@ -99868,20 +99868,20 @@ function setSection(out, snakeKey, value, toToml) {
99868
99868
  }
99869
99869
  function providerToToml(provider, rawProvider) {
99870
99870
  const out = cloneRecord(rawProvider);
99871
- for (const [key, value] of Object.entries(provider)) if (key === "oauth" && value !== void 0) out[camelToSnake$1(key)] = oauthToToml(value);
99872
- else if ((key === "env" || key === "customHeaders") && value !== void 0) out[camelToSnake$1(key)] = cloneUnknown(value);
99873
- else setDefined(out, camelToSnake$1(key), value);
99871
+ for (const [key, value] of Object.entries(provider)) if (key === "oauth" && value !== void 0) out[camelToSnake(key)] = oauthToToml(value);
99872
+ else if ((key === "env" || key === "customHeaders") && value !== void 0) out[camelToSnake(key)] = cloneUnknown(value);
99873
+ else setDefined(out, camelToSnake(key), value);
99874
99874
  return out;
99875
99875
  }
99876
99876
  function modelToToml(model, rawModel) {
99877
99877
  const out = cloneRecord(rawModel);
99878
- for (const [key, value] of Object.entries(model)) if (key === "capabilities" && Array.isArray(value)) out[camelToSnake$1(key)] = [...value];
99879
- else setDefined(out, camelToSnake$1(key), value);
99878
+ for (const [key, value] of Object.entries(model)) if (key === "capabilities" && Array.isArray(value)) out[camelToSnake(key)] = [...value];
99879
+ else setDefined(out, camelToSnake(key), value);
99880
99880
  return out;
99881
99881
  }
99882
99882
  function thinkingToToml(thinking, rawThinking) {
99883
99883
  const out = cloneRecord(rawThinking);
99884
- for (const [key, value] of Object.entries(thinking)) setDefined(out, camelToSnake$1(key), value);
99884
+ for (const [key, value] of Object.entries(thinking)) setDefined(out, camelToSnake(key), value);
99885
99885
  return out;
99886
99886
  }
99887
99887
  function permissionToToml(permission, rawPermission) {
@@ -99895,7 +99895,7 @@ function permissionToToml(permission, rawPermission) {
99895
99895
  }
99896
99896
  function permissionRuleToToml(rule) {
99897
99897
  const out = {};
99898
- for (const [key, value] of Object.entries(rule)) setDefined(out, camelToSnake$1(key), value);
99898
+ for (const [key, value] of Object.entries(rule)) setDefined(out, camelToSnake(key), value);
99899
99899
  return out;
99900
99900
  }
99901
99901
  function servicesToToml(services, rawServices) {
@@ -99908,19 +99908,19 @@ function servicesToToml(services, rawServices) {
99908
99908
  }
99909
99909
  function serviceToToml(service) {
99910
99910
  const out = {};
99911
- for (const [key, value] of Object.entries(service)) if (key === "oauth" && value !== void 0) out[camelToSnake$1(key)] = oauthToToml(value);
99912
- else if (key === "customHeaders" && value !== void 0) out[camelToSnake$1(key)] = cloneUnknown(value);
99913
- else setDefined(out, camelToSnake$1(key), value);
99911
+ for (const [key, value] of Object.entries(service)) if (key === "oauth" && value !== void 0) out[camelToSnake(key)] = oauthToToml(value);
99912
+ else if (key === "customHeaders" && value !== void 0) out[camelToSnake(key)] = cloneUnknown(value);
99913
+ else setDefined(out, camelToSnake(key), value);
99914
99914
  return out;
99915
99915
  }
99916
99916
  function loopControlToToml(loopControl, rawLoopControl) {
99917
99917
  const out = cloneRecord(rawLoopControl);
99918
- for (const [key, value] of Object.entries(loopControl)) setDefined(out, camelToSnake$1(key), value);
99918
+ for (const [key, value] of Object.entries(loopControl)) setDefined(out, camelToSnake(key), value);
99919
99919
  return out;
99920
99920
  }
99921
99921
  function backgroundToToml(background, rawBackground) {
99922
99922
  const out = cloneRecord(rawBackground);
99923
- for (const [key, value] of Object.entries(background)) setDefined(out, camelToSnake$1(key), value);
99923
+ for (const [key, value] of Object.entries(background)) setDefined(out, camelToSnake(key), value);
99924
99924
  return out;
99925
99925
  }
99926
99926
  function setHooks(out, hooks) {
@@ -99932,12 +99932,12 @@ function setHooks(out, hooks) {
99932
99932
  }
99933
99933
  function hookToToml(hook) {
99934
99934
  const out = {};
99935
- for (const [key, value] of Object.entries(hook)) setDefined(out, camelToSnake$1(key), value);
99935
+ for (const [key, value] of Object.entries(hook)) setDefined(out, camelToSnake(key), value);
99936
99936
  return out;
99937
99937
  }
99938
99938
  function oauthToToml(oauth) {
99939
99939
  const out = {};
99940
- for (const [key, value] of Object.entries(oauth)) out[camelToSnake$1(key)] = value;
99940
+ for (const [key, value] of Object.entries(oauth)) out[camelToSnake(key)] = value;
99941
99941
  return out;
99942
99942
  }
99943
99943
  function isPlainObject$1(value) {
@@ -121767,7 +121767,7 @@ const dictionaries = {
121767
121767
  "skill.skill_removed": "该 Skill 及其子 Skill 已从当前会话中移除。",
121768
121768
  "skill.delete_failed": "删除失败。",
121769
121769
  "skill.delete_failed_msg": "删除失败: {msg}",
121770
- "skill.confirm_uninstall": "确认卸载",
121770
+ "skill.confirm_uninstall": "确认卸载 \"{label}\"?",
121771
121771
  "skill.uninstall_reversible": "卸载后可在 Skill 中心重新安装",
121772
121772
  "skill.uninstall_yes": "是,卸载",
121773
121773
  "toolcall.bg_agent_lost": "后台 agent 丢失(会话在完成前已重启)",
@@ -122139,8 +122139,6 @@ const dictionaries = {
122139
122139
  "market.design_card_desc": "14 种设计卡片生成(封面/图文/社交分享/长篇排版),Parchment × Swiss 双风格体系",
122140
122140
  "market.superpowers_name": "Superpowers 开发技能包",
122141
122141
  "market.superpowers_desc": "14 个开发方法论技能:TDD、系统调试、代码审查、子代理驱动开发、并行代理、头脑风暴等",
122142
- "market.audio_name": "Audio Skill 录音分析",
122143
- "market.audio_desc": "本地录音分析自动化,含 RAG 知识库。适用于销售录音复盘、会议纪要、质量评分等",
122144
122142
  "market.scrapling_name": "Scrapling 网页爬取",
122145
122143
  "market.scrapling_desc": "基于 Scrapling 的智能爬虫技能,支持 Cloudflare/WAF 绕过、登录会话、自动抓取解析",
122146
122144
  "market.astock_name": "A 股数据分析",
@@ -122843,7 +122841,7 @@ const dictionaries = {
122843
122841
  "skill.skill_removed": "This skill and its sub-skills have been removed from the current session.",
122844
122842
  "skill.delete_failed": "Delete failed.",
122845
122843
  "skill.delete_failed_msg": "Delete failed: {msg}",
122846
- "skill.confirm_uninstall": "Confirm Uninstall",
122844
+ "skill.confirm_uninstall": "Uninstall \"{label}\"?",
122847
122845
  "skill.uninstall_reversible": "You can reinstall from the Skill center later",
122848
122846
  "skill.uninstall_yes": "Yes, uninstall",
122849
122847
  "toolcall.bg_agent_lost": "Background agent lost (session restarted before completion)",
@@ -123215,8 +123213,6 @@ const dictionaries = {
123215
123213
  "market.design_card_desc": "14 design card generators (cover/photo/social/long-form), Parchment × Swiss dual-style system",
123216
123214
  "market.superpowers_name": "Superpowers Dev Skill Pack",
123217
123215
  "market.superpowers_desc": "14 dev methodology skills: TDD, system debugging, code review, subagent-driven dev, parallel agents, brainstorming, etc.",
123218
- "market.audio_name": "Audio Skill Recording Analysis",
123219
- "market.audio_desc": "Local recording analysis automation with RAG knowledge base. For sales review, meeting minutes, quality scoring, etc.",
123220
123216
  "market.scrapling_name": "Scrapling Web Scraper",
123221
123217
  "market.scrapling_desc": "Smart scraper based on Scrapling, supports Cloudflare/WAF bypass, login sessions, auto-extraction",
123222
123218
  "market.astock_name": "A-Share Data Analysis",
@@ -124742,66 +124738,6 @@ const DEFAULT_OAUTH_PROVIDER_NAME = "managed:scream-code";
124742
124738
  ErrorCodes.AUTH_LOGIN_REQUIRED;
124743
124739
  const SCREAM_CODE_PLUGIN_MARKETPLACE_URL_ENV = "SCREAM_CODE_PLUGIN_MARKETPLACE_URL";
124744
124740
  //#endregion
124745
- //#region src/migration/command.ts
124746
- function registerMigrateCommand(parent, _onMigrate) {
124747
- parent.command("migrate").description("将旧版 scream-cli 安装的数据迁移到 scream-code。(已停用)").action(() => {
124748
- process.stdout.write("迁移功能已取消,不再支持从 scream-cli 导入数据。\n");
124749
- process.exit(0);
124750
- });
124751
- }
124752
- //#endregion
124753
- //#region src/migration/badge.ts
124754
- /**
124755
- * Pure helpers for composing session labels in the session picker.
124756
- *
124757
- * Detection rule for the `[imported]` badge: `metadata.imported_from_scream_cli`
124758
- * is strictly the boolean `true`. This mirrors the value written by
124759
- * `migration-legacy` into the session's `state.json` `custom` block.
124760
- */
124761
- const IMPORTED_BADGE = "[已导入]";
124762
- const IMPORTED_FLAG_KEY = "imported_from_scream_cli";
124763
- function isImportedSession(metadata) {
124764
- if (metadata === void 0) return false;
124765
- return metadata[IMPORTED_FLAG_KEY] === true;
124766
- }
124767
- function formatSessionLabel(input) {
124768
- return `${isImportedSession(input.metadata) ? `${IMPORTED_BADGE} ` : ""}${input.title}`;
124769
- }
124770
- //#endregion
124771
- //#region ../../packages/migration-legacy/src/scream-cli-schema.ts
124772
- const OldWorkDirMetaSchema = z.object({
124773
- path: z.string(),
124774
- jian: z.string().default("local"),
124775
- last_session_id: z.string().nullable().optional()
124776
- });
124777
- z.object({ work_dirs: z.array(OldWorkDirMetaSchema).default([]) });
124778
- z.object({
124779
- version: z.number().optional(),
124780
- approval: z.object({
124781
- yolo: z.boolean().optional(),
124782
- afk: z.boolean().optional(),
124783
- auto_approve_actions: z.array(z.string()).optional()
124784
- }).partial().optional(),
124785
- additional_dirs: z.array(z.string()).optional(),
124786
- custom_title: z.string().nullable().optional(),
124787
- title_generated: z.boolean().optional(),
124788
- title_generate_attempts: z.number().optional(),
124789
- plan_mode: z.boolean().optional(),
124790
- plan_session_id: z.string().nullable().optional(),
124791
- plan_slug: z.string().nullable().optional(),
124792
- wire_mtime: z.number().nullable().optional(),
124793
- archived: z.boolean().optional(),
124794
- archived_at: z.number().nullable().optional(),
124795
- auto_archive_exempt: z.boolean().optional(),
124796
- todos: z.array(z.unknown()).optional()
124797
- }).passthrough();
124798
- //#endregion
124799
- //#region ../../packages/migration-legacy/src/steps/config.ts
124800
- function camelToSnake(s) {
124801
- return s.replaceAll(/[A-Z]/g, (c) => `_${c.toLowerCase()}`);
124802
- }
124803
- new Set(Object.keys(ScreamConfigSchema.shape).filter((k) => k !== "raw" && k !== "providers" && k !== "models" && k !== "hooks").map(camelToSnake));
124804
- //#endregion
124805
124741
  //#region src/cli/update/types.ts
124806
124742
  function emptyUpdateCache() {
124807
124743
  return {
@@ -124874,7 +124810,7 @@ function optionalBuildString(value) {
124874
124810
  return typeof value === "string" && value.length > 0 ? value : void 0;
124875
124811
  }
124876
124812
  const SCREAM_BUILD_INFO = {
124877
- version: optionalBuildString("0.9.2"),
124813
+ version: optionalBuildString("0.9.3"),
124878
124814
  channel: optionalBuildString(""),
124879
124815
  commit: optionalBuildString(""),
124880
124816
  buildTarget: optionalBuildString("darwin-arm64")
@@ -125031,11 +124967,10 @@ function errorMessage(error) {
125031
124967
  }
125032
124968
  //#endregion
125033
124969
  //#region src/cli/commands.ts
125034
- function createProgram(version, onMain, onMigrate, onPluginNodeRunner = () => {}, onStreamJson = () => {}, onChannelSetup = () => {}) {
124970
+ function createProgram(version, onMain, onPluginNodeRunner = () => {}, onStreamJson = () => {}, onChannelSetup = () => {}) {
125035
124971
  const program = new Command(CLI_COMMAND_NAME).description("下一代智能体的起点").version(version, "-V, --version").allowUnknownOption(false).configureHelp({ helpWidth: 100 }).helpOption("-h, --help", "显示帮助。").addHelpText("after", "\n文档: https://scream-cli.github.io/scream-code/\n");
125036
124972
  program.addOption(new Option("-S, --session [id]", "恢复会话。带 ID:恢复该会话。不带 ID:交互式选择。").argParser((val) => val === true ? "" : val)).addOption(new Option("-r, --resume [id]").hideHelp().argParser((val) => val === true ? "" : val)).option("-C, --continue", "继续当前工作目录的上一个会话。", false).option("-y, --yolo", "自动批准所有操作。", false).option("--auto", "以自动权限模式启动。", false).addOption(new Option("-m, --model <model>", "本次调用使用的 LLM 模型别名。默认使用 config.toml 中的 default_model。")).addOption(new Option("-p, --prompt <prompt>", "非交互式运行一条提示并打印响应。")).addOption(new Option("--output-format <format>", "提示模式的输出格式。默认为 text。").choices(["text", "stream-json"])).addOption(new Option("--skills-dir <dir>", "从该目录加载技能,而不是自动发现的用户和项目目录。可多次指定。").argParser((value, previous) => [...previous ?? [], value]).default([])).addOption(new Option("--yes").hideHelp().default(false)).addOption(new Option("--auto-approve").hideHelp().default(false)).option("--plan", "以计划模式启动。", false).option("--wolfpack", "启动时默认开启 WolfPack 批量并发模式。", false);
125037
124973
  registerExportCommand(program);
125038
- registerMigrateCommand(program, onMigrate);
125039
124974
  program.command("stream-json", { hidden: true }).option("--input-format <fmt>", "stream-json").option("--output-format <fmt>", "stream-json").option("--resume <id>", "resume a previous session").option("--model <model>", "model to use").option("--permission-mode <mode>", "permission mode").option("--permission-prompt-tool <mode>", "(ignored, cc-connect compat)").option("--replay-user-messages", "(ignored, cc-connect compat)").option("--verbose", "(ignored, cc-connect compat)").option("--system-prompt <text>", "(ignored, cc-connect compat)").option("--append-system-prompt <text>", "(passed through to agent)").option("--append-system-prompt-file <path>", "(passed through to agent; file contents are read and merged)").option("--allowedTools <list>", "(ignored, cc-connect compat)").option("--disallowedTools <list>", "(ignored, cc-connect compat)").option("--effort <value>", "(ignored, cc-connect compat)").option("--max-context-tokens <N>", "(ignored, cc-connect compat)").option("--skills-dir <dir>", "additional skills directory (repeatable)", (value, previous) => [...previous ?? [], value], []).option("--plugin-dir <dir>", "(ignored, cc-connect compat; repeatable)", (value, previous) => [...previous ?? [], value], []).action((subOpts) => {
125040
124975
  onStreamJson({
125041
124976
  resume: subOpts["resume"],
@@ -125111,7 +125046,6 @@ function validateOptions(opts) {
125111
125046
  * Agent/runtime settings live in core's `config.toml`; this file owns only
125112
125047
  * terminal UI preferences for the scream-code client.
125113
125048
  */
125114
- const INVALID_TUI_CONFIG_MESSAGE = t("tui.invalid_config");
125115
125049
  const TuiThemeSchema = z.enum([
125116
125050
  "dark",
125117
125051
  "light",
@@ -125179,7 +125113,7 @@ var TuiConfigParseError = class extends Error {
125179
125113
  name = "TuiConfigParseError";
125180
125114
  fallback;
125181
125115
  constructor(fallback) {
125182
- super(INVALID_TUI_CONFIG_MESSAGE);
125116
+ super(t("tui.invalid_config"));
125183
125117
  this.fallback = fallback;
125184
125118
  }
125185
125119
  };
@@ -135580,134 +135514,130 @@ var MoonLoader = class extends Text {
135580
135514
  *
135581
135515
  * Used when the remote marketplace cannot be fetched at runtime.
135582
135516
  */
135583
- const FALLBACK_SKILL_MARKETPLACE = [
135584
- {
135585
- id: "gsap-skills",
135586
- displayName: t("market.gsap_name"),
135587
- description: t("market.gsap_desc"),
135588
- source: "https://github.com/greensock/gsap-skills"
135589
- },
135590
- {
135591
- id: "claude-design-card",
135592
- displayName: t("market.design_card_name"),
135593
- description: t("market.design_card_desc"),
135594
- source: "https://github.com/geekjourneyx/claude-design-card"
135595
- },
135596
- {
135597
- id: "superpowers",
135598
- displayName: t("market.superpowers_name"),
135599
- description: t("market.superpowers_desc"),
135600
- source: "https://github.com/obra/superpowers"
135601
- },
135602
- {
135603
- id: "audio-skill",
135604
- displayName: t("market.audio_name"),
135605
- description: t("market.audio_desc"),
135606
- source: "https://github.com/LIUTod/audio-skill"
135607
- },
135608
- {
135609
- id: "scrapling-skill",
135610
- displayName: t("market.scrapling_name"),
135611
- description: t("market.scrapling_desc"),
135612
- source: "https://github.com/Cedriccmh/claude-code-skill-scrapling"
135613
- },
135614
- {
135615
- id: "a-stock-data",
135616
- displayName: t("market.astock_name"),
135617
- description: t("market.astock_desc"),
135618
- source: "https://github.com/simonlin1212/a-stock-data"
135619
- },
135620
- {
135621
- id: "humanizer",
135622
- displayName: t("market.humanizer_name"),
135623
- description: t("market.humanizer_desc"),
135624
- source: "https://github.com/blader/humanizer"
135625
- },
135626
- {
135627
- id: "patent-disclosure-skill",
135628
- displayName: t("market.patent_name"),
135629
- description: t("market.patent_desc"),
135630
- source: "https://github.com/handsomestWei/patent-disclosure-skill"
135631
- },
135632
- {
135633
- id: "contract-review-pro",
135634
- displayName: t("market.contract_name"),
135635
- description: t("market.contract_desc"),
135636
- source: "https://github.com/CSlawyer1985/contract-review-pro"
135637
- },
135638
- {
135639
- id: "academic-research-skills",
135640
- displayName: t("market.academic_name"),
135641
- description: t("market.academic_desc"),
135642
- source: "https://github.com/Imbad0202/academic-research-skills"
135643
- },
135644
- {
135645
- id: "headroom",
135646
- displayName: t("market.headroom_name"),
135647
- description: t("market.headroom_desc"),
135648
- source: "https://github.com/chopratejas/headroom"
135649
- },
135650
- {
135651
- id: "xiaohu-wechat-format",
135652
- displayName: t("market.xiaohu_wechat_name"),
135653
- description: t("market.xiaohu_wechat_desc"),
135654
- source: "https://github.com/xiaohuailabs/xiaohu-wechat-format"
135655
- },
135656
- {
135657
- id: "huashu-design",
135658
- displayName: t("market.huashu_name"),
135659
- description: t("market.huashu_desc"),
135660
- source: "https://github.com/alchaincyf/huashu-design"
135661
- },
135662
- {
135663
- id: "html-video",
135664
- displayName: t("market.html_video_name"),
135665
- description: t("market.html_video_desc"),
135666
- source: "https://github.com/nexu-io/html-video"
135667
- },
135668
- {
135669
- id: "xiaohu-video-translate",
135670
- displayName: t("market.xiaohu_translate_name"),
135671
- description: t("market.xiaohu_translate_desc"),
135672
- source: "https://github.com/xiaohuailabs/xiaohu-video-translate"
135673
- },
135674
- {
135675
- id: "videocut-skills",
135676
- displayName: t("market.videocut_name"),
135677
- description: t("market.videocut_desc"),
135678
- source: "https://github.com/Ceeon/videocut-skills"
135679
- },
135680
- {
135681
- id: "taste-skill",
135682
- displayName: t("market.taste_name"),
135683
- description: t("market.taste_desc"),
135684
- source: "https://github.com/Leonxlnx/taste-skill"
135685
- },
135686
- {
135687
- id: "vtake-skills",
135688
- displayName: t("market.vtake_name"),
135689
- description: t("market.vtake_desc"),
135690
- source: "https://github.com/notedit/vtake-skills"
135691
- },
135692
- {
135693
- id: "remotion-skills",
135694
- displayName: t("market.remotion_name"),
135695
- description: t("market.remotion_desc"),
135696
- source: "https://github.com/remotion-dev/skills"
135697
- },
135698
- {
135699
- id: "html-anything",
135700
- displayName: t("market.html_anything_name"),
135701
- description: t("market.html_anything_desc"),
135702
- source: "https://github.com/nexu-io/html-anything"
135703
- },
135704
- {
135705
- id: "guizang-social-card-skill",
135706
- displayName: t("market.guizang_name"),
135707
- description: t("market.guizang_desc"),
135708
- source: "https://github.com/op7418/guizang-social-card-skill"
135709
- }
135710
- ];
135517
+ function getFallbackSkillMarketplace() {
135518
+ return [
135519
+ {
135520
+ id: "gsap-skills",
135521
+ displayName: t("market.gsap_name"),
135522
+ description: t("market.gsap_desc"),
135523
+ source: "https://github.com/greensock/gsap-skills"
135524
+ },
135525
+ {
135526
+ id: "claude-design-card",
135527
+ displayName: t("market.design_card_name"),
135528
+ description: t("market.design_card_desc"),
135529
+ source: "https://github.com/geekjourneyx/claude-design-card"
135530
+ },
135531
+ {
135532
+ id: "superpowers",
135533
+ displayName: t("market.superpowers_name"),
135534
+ description: t("market.superpowers_desc"),
135535
+ source: "https://github.com/obra/superpowers"
135536
+ },
135537
+ {
135538
+ id: "scrapling-skill",
135539
+ displayName: t("market.scrapling_name"),
135540
+ description: t("market.scrapling_desc"),
135541
+ source: "https://github.com/Cedriccmh/claude-code-skill-scrapling"
135542
+ },
135543
+ {
135544
+ id: "a-stock-data",
135545
+ displayName: t("market.astock_name"),
135546
+ description: t("market.astock_desc"),
135547
+ source: "https://github.com/simonlin1212/a-stock-data"
135548
+ },
135549
+ {
135550
+ id: "humanizer",
135551
+ displayName: t("market.humanizer_name"),
135552
+ description: t("market.humanizer_desc"),
135553
+ source: "https://github.com/blader/humanizer"
135554
+ },
135555
+ {
135556
+ id: "patent-disclosure-skill",
135557
+ displayName: t("market.patent_name"),
135558
+ description: t("market.patent_desc"),
135559
+ source: "https://github.com/handsomestWei/patent-disclosure-skill"
135560
+ },
135561
+ {
135562
+ id: "contract-review-pro",
135563
+ displayName: t("market.contract_name"),
135564
+ description: t("market.contract_desc"),
135565
+ source: "https://github.com/CSlawyer1985/contract-review-pro"
135566
+ },
135567
+ {
135568
+ id: "academic-research-skills",
135569
+ displayName: t("market.academic_name"),
135570
+ description: t("market.academic_desc"),
135571
+ source: "https://github.com/Imbad0202/academic-research-skills"
135572
+ },
135573
+ {
135574
+ id: "headroom",
135575
+ displayName: t("market.headroom_name"),
135576
+ description: t("market.headroom_desc"),
135577
+ source: "https://github.com/chopratejas/headroom"
135578
+ },
135579
+ {
135580
+ id: "xiaohu-wechat-format",
135581
+ displayName: t("market.xiaohu_wechat_name"),
135582
+ description: t("market.xiaohu_wechat_desc"),
135583
+ source: "https://github.com/xiaohuailabs/xiaohu-wechat-format"
135584
+ },
135585
+ {
135586
+ id: "huashu-design",
135587
+ displayName: t("market.huashu_name"),
135588
+ description: t("market.huashu_desc"),
135589
+ source: "https://github.com/alchaincyf/huashu-design"
135590
+ },
135591
+ {
135592
+ id: "html-video",
135593
+ displayName: t("market.html_video_name"),
135594
+ description: t("market.html_video_desc"),
135595
+ source: "https://github.com/nexu-io/html-video"
135596
+ },
135597
+ {
135598
+ id: "xiaohu-video-translate",
135599
+ displayName: t("market.xiaohu_translate_name"),
135600
+ description: t("market.xiaohu_translate_desc"),
135601
+ source: "https://github.com/xiaohuailabs/xiaohu-video-translate"
135602
+ },
135603
+ {
135604
+ id: "videocut-skills",
135605
+ displayName: t("market.videocut_name"),
135606
+ description: t("market.videocut_desc"),
135607
+ source: "https://github.com/Ceeon/videocut-skills"
135608
+ },
135609
+ {
135610
+ id: "taste-skill",
135611
+ displayName: t("market.taste_name"),
135612
+ description: t("market.taste_desc"),
135613
+ source: "https://github.com/Leonxlnx/taste-skill"
135614
+ },
135615
+ {
135616
+ id: "vtake-skills",
135617
+ displayName: t("market.vtake_name"),
135618
+ description: t("market.vtake_desc"),
135619
+ source: "https://github.com/notedit/vtake-skills"
135620
+ },
135621
+ {
135622
+ id: "remotion-skills",
135623
+ displayName: t("market.remotion_name"),
135624
+ description: t("market.remotion_desc"),
135625
+ source: "https://github.com/remotion-dev/skills"
135626
+ },
135627
+ {
135628
+ id: "html-anything",
135629
+ displayName: t("market.html_anything_name"),
135630
+ description: t("market.html_anything_desc"),
135631
+ source: "https://github.com/nexu-io/html-anything"
135632
+ },
135633
+ {
135634
+ id: "guizang-social-card-skill",
135635
+ displayName: t("market.guizang_name"),
135636
+ description: t("market.guizang_desc"),
135637
+ source: "https://github.com/op7418/guizang-social-card-skill"
135638
+ }
135639
+ ];
135640
+ }
135711
135641
  //#endregion
135712
135642
  //#region src/tui/commands/skill-center.ts
135713
135643
  const SKILL_DESC_MAX = 60;
@@ -135807,7 +135737,7 @@ async function loadMarketplace(host) {
135807
135737
  const { plugins } = await loadPluginMarketplace({ workDir: host.state.appState.workDir });
135808
135738
  return plugins;
135809
135739
  } catch {
135810
- return [...FALLBACK_SKILL_MARKETPLACE];
135740
+ return [...getFallbackSkillMarketplace()];
135811
135741
  }
135812
135742
  }
135813
135743
  function buildOptions(host, skills, plugins, marketplace) {
@@ -136006,7 +135936,7 @@ async function uninstallManualSkill(host, skill) {
136006
135936
  async function confirmUninstall(host, label, description) {
136007
135937
  return new Promise((resolve) => {
136008
135938
  const picker = new ChoicePickerComponent({
136009
- title: `${t("skill.confirm_uninstall")} "${label}"?`,
135939
+ title: t("skill.confirm_uninstall", { label }),
136010
135940
  hint: t("skill.uninstall_reversible"),
136011
135941
  options: [{
136012
135942
  value: "no",
@@ -136837,7 +136767,7 @@ function resize(){
136837
136767
  ctx.setTransform(DPR,0,0,DPR,0,0);
136838
136768
  }
136839
136769
  resize();
136840
- window.addEventListener('resize',resize);
136770
+ window.addEventListener('resize',function(){resize();markDirty()});
136841
136771
 
136842
136772
  // 相机
136843
136773
  var camRotX=0.25,camRotY=0.4;
@@ -136855,33 +136785,6 @@ var graphData;
136855
136785
  var nodePositions={};
136856
136786
  var nodeData=[];
136857
136787
 
136858
- // 节点漂浮参数:每个节点独立相位,渲染时叠加微小偏移
136859
- var floatParams={};
136860
- var frameTime=0;
136861
- function ensureFloat(id){
136862
- if(floatParams[id])return;
136863
- floatParams[id]={
136864
- phaseX:Math.random()*Math.PI*2,
136865
- phaseY:Math.random()*Math.PI*2,
136866
- phaseZ:Math.random()*Math.PI*2,
136867
- ampX:1.5+Math.random()*2.5,
136868
- ampY:1.5+Math.random()*2.5,
136869
- ampZ:1+Math.random()*2,
136870
- speed:0.0004+Math.random()*0.0004
136871
- };
136872
- }
136873
- // 返回某节点当前帧的漂浮后位置(不修改原 nodePositions,避免拾取错位)
136874
- function floatingPos(id,t){
136875
- var p=nodePositions[id];if(!p)return p;
136876
- var f=floatParams[id];if(!f)return p;
136877
- if(t===undefined)t=frameTime;
136878
- return{
136879
- x:p.x+Math.sin(t*f.speed+f.phaseX)*f.ampX,
136880
- y:p.y+Math.cos(t*f.speed*1.1+f.phaseY)*f.ampY,
136881
- z:p.z+Math.sin(t*f.speed*0.8+f.phaseZ)*f.ampZ
136882
- };
136883
- }
136884
-
136885
136788
  // ─── 3D 投影 ──────────────────────────────────────────
136886
136789
  function project(p){
136887
136790
  var cosY=Math.cos(camRotY),sinY=Math.sin(camRotY);
@@ -136985,10 +136888,6 @@ function buildNebulae(){
136985
136888
  baseX:p.x+r*Math.sin(phi)*Math.cos(theta),
136986
136889
  baseY:p.y+r*Math.sin(phi)*Math.sin(theta),
136987
136890
  baseZ:p.z+r*Math.cos(phi),
136988
- phase:Math.random()*Math.PI*2,
136989
- ampX:2+Math.random()*4,
136990
- ampY:2+Math.random()*4,
136991
- ampZ:1+Math.random()*3,
136992
136891
  size:0.5+Math.random()*0.8,
136993
136892
  op:0.15+Math.random()*0.2
136994
136893
  });
@@ -136996,19 +136895,14 @@ function buildNebulae(){
136996
136895
  });
136997
136896
  }
136998
136897
 
136999
- function drawNebulae(t){
136898
+ function drawNebulae(){
137000
136899
  ctx.save();
137001
136900
  for(var i=0;i<nebulaDots.length;i++){
137002
136901
  var d=nebulaDots[i];
137003
- // 不规则漂浮
137004
- var x=d.baseX+Math.sin(t*0.0003+d.phase)*d.ampX;
137005
- var y=d.baseY+Math.cos(t*0.0004+d.phase*1.3)*d.ampY;
137006
- var z=d.baseZ+Math.sin(t*0.0002+d.phase*0.7)*d.ampZ;
137007
- var p=project({x:x,y:y,z:z});
136902
+ var p=project({x:d.baseX,y:d.baseY,z:d.baseZ});
137008
136903
  if(p.z<=0)continue;
137009
136904
  var r=Math.max(0.3,d.size*p.scale*0.5);
137010
136905
  if(r<0.4)continue;
137011
- // 远处淡,近处稍清晰
137012
136906
  var alpha=d.op*Math.min(1,p.scale*1.5);
137013
136907
  ctx.fillStyle='rgba(0,0,0,'+alpha.toFixed(3)+')';
137014
136908
  ctx.beginPath();
@@ -137185,7 +137079,7 @@ function computeProjMap(){
137185
137079
  vis.events.forEach(function(id){visAll.add(id)});
137186
137080
  var map={allIds:visAll};
137187
137081
  visAll.forEach(function(id){
137188
- var p=floatingPos(id);
137082
+ var p=nodePositions[id];
137189
137083
  if(p)map[id]=project(p);
137190
137084
  });
137191
137085
  return map;
@@ -137217,6 +137111,7 @@ function startInertia(){
137217
137111
  camRotY+=velRotY;
137218
137112
  camRotX=Math.max(-1.2,Math.min(1.2,camRotX+velRotX));
137219
137113
  velRotX*=0.94;velRotY*=0.94;
137114
+ markDirty();
137220
137115
  inertiaRAF=requestAnimationFrame(step);
137221
137116
  }
137222
137117
  inertiaRAF=requestAnimationFrame(step);
@@ -137255,7 +137150,7 @@ function pickNode(sx,sy){
137255
137150
  vis.events.forEach(function(id){visAll.add(id)});
137256
137151
  var best=null,bestDist=Infinity;
137257
137152
  visAll.forEach(function(id){
137258
- var p=floatingPos(id);if(!p)return;
137153
+ var p=nodePositions[id];if(!p)return;
137259
137154
  var sp=project(p);
137260
137155
  if(sp.z<=0)return;
137261
137156
  var data=nodeData.find(function(n){return n.id===id});
@@ -137294,14 +137189,16 @@ canvas.addEventListener('mousemove',function(e){
137294
137189
  velRotY=(e.clientX-lastMoveX)/dt*0.005;
137295
137190
  velRotX=(e.clientY-lastMoveY)/dt*0.005;
137296
137191
  lastMoveTime=now;lastMoveX=e.clientX;lastMoveY=e.clientY;
137192
+ markDirty();
137297
137193
  }else if(isPanning){
137298
137194
  var pdx=e.clientX-dragStart.x,pdy=e.clientY-dragStart.y;
137299
137195
  var scale=fov/camDist;
137300
137196
  camTargetX=dragStart.panX - pdx*scale;
137301
137197
  camTargetY=dragStart.panY + pdy*scale;
137198
+ markDirty();
137302
137199
  }else{
137303
137200
  var id=pickNode(e.clientX,e.clientY);
137304
- if(id!==hoveredId){hoveredId=id;canvas.style.cursor=id?'pointer':'grab';}
137201
+ if(id!==hoveredId){hoveredId=id;canvas.style.cursor=id?'pointer':'grab';markDirty();}
137305
137202
  if(id)showTooltip(e.clientX,e.clientY,id);
137306
137203
  else hideTooltip();
137307
137204
  }
@@ -137325,10 +137222,10 @@ canvas.addEventListener('mouseup',function(e){
137325
137222
  if(data.kind==='event'&&!expEv.has(id))expEv.add(id);
137326
137223
  }
137327
137224
  selId=id;navStack=[];
137328
- focusOn(id);rebuildLabels();
137225
+ focusOn(id);rebuildLabels();markDirty();
137329
137226
  },250);
137330
137227
  }else{
137331
- selId=null;rebuildLabels();closeModal();
137228
+ selId=null;rebuildLabels();closeModal();markDirty();
137332
137229
  }
137333
137230
  });
137334
137231
 
@@ -137344,13 +137241,13 @@ canvas.addEventListener('dblclick',function(e){
137344
137241
  if(data){
137345
137242
  if(!expEnt.has(id)&&!expEv.has(id)){expEnt.add(id);}
137346
137243
  selId=id;navStack=[];
137347
- focusOn(id);rebuildLabels();
137244
+ focusOn(id);rebuildLabels();markDirty();
137348
137245
  showModal(id,data.kind);
137349
137246
  }
137350
137247
  }else{
137351
137248
  expEnt.clear();expEv.clear();selId=null;
137352
137249
  if(graphData)graphData.entities.forEach(function(en){expEnt.add(en.id)});
137353
- closeModal();rebuildLabels();fitView();
137250
+ closeModal();rebuildLabels();fitView();markDirty();
137354
137251
  }
137355
137252
  });
137356
137253
 
@@ -137368,6 +137265,7 @@ canvas.addEventListener('wheel',function(e){
137368
137265
  var scaleAfter=fov/camDist;
137369
137266
  camTargetX=worldX - (mx-W/2)/scaleAfter;
137370
137267
  camTargetY=worldY + (my-H/2)/scaleAfter;
137268
+ markDirty();
137371
137269
  },{passive:false});
137372
137270
 
137373
137271
  function focusOn(id){
@@ -137387,6 +137285,7 @@ function focusOn(id){
137387
137285
  camTargetY=startTy+(endTy-startTy)*e;
137388
137286
  camTargetZ=startTz+(endTz-startTz)*e;
137389
137287
  camDist=startDist+(endDist-startDist)*e;
137288
+ markDirty();
137390
137289
  if(t<1)focusAnim=requestAnimationFrame(step);
137391
137290
  }
137392
137291
  focusAnim=requestAnimationFrame(step);
@@ -137397,7 +137296,7 @@ function fitView(){
137397
137296
  var ids=[];
137398
137297
  vis.entities.forEach(function(id){ids.push(id)});
137399
137298
  vis.events.forEach(function(id){ids.push(id)});
137400
- if(!ids.length){camTargetX=0;camTargetY=0;camTargetZ=0;camDist=700;return}
137299
+ if(!ids.length){camTargetX=0;camTargetY=0;camTargetZ=0;camDist=700;markDirty();return}
137401
137300
  var x0=Infinity,x1=-Infinity,y0=Infinity,y1=-Infinity,z0=Infinity,z1=-Infinity;
137402
137301
  ids.forEach(function(id){var p=nodePositions[id];if(!p)return;if(p.x<x0)x0=p.x;if(p.x>x1)x1=p.x;if(p.y<y0)y0=p.y;if(p.y>y1)y1=p.y;if(p.z<z0)z0=p.z;if(p.z>z1)z1=p.z});
137403
137302
  var cx=(x0+x1)/2,cy=(y0+y1)/2,cz=(z0+z1)/2;
@@ -137418,6 +137317,7 @@ function fitView(){
137418
137317
  camDist=startDist+(endDist-startDist)*e;
137419
137318
  camRotX=startRotX+(endRotX-startRotX)*e;
137420
137319
  camRotY=startRotY+(endRotY-startRotY)*e;
137320
+ markDirty();
137421
137321
  if(t<1)focusAnim=requestAnimationFrame(step);
137422
137322
  }
137423
137323
  focusAnim=requestAnimationFrame(step);
@@ -137432,6 +137332,7 @@ function startAutoRotate(){
137432
137332
  var t=Math.min(1,elapsed/duration);
137433
137333
  var fade=1-t;
137434
137334
  camRotY+=speed*fade;
137335
+ markDirty();
137435
137336
  if(t<1)autoRotRAF=requestAnimationFrame(step);
137436
137337
  }
137437
137338
  autoRotRAF=requestAnimationFrame(step);
@@ -137494,14 +137395,14 @@ function esc(s){if(!s)return'';return String(s).replace(/&/g,'&amp;').replace(/<
137494
137395
  document.getElementById('btn-reset').onclick=function(){
137495
137396
  expEnt.clear();expEv.clear();selId=null;
137496
137397
  if(graphData)graphData.entities.forEach(function(e){expEnt.add(e.id)});
137497
- closeModal();rebuildLabels();fitView();
137398
+ closeModal();rebuildLabels();fitView();markDirty();
137498
137399
  };
137499
137400
  document.getElementById('btn-expand').onclick=function(){
137500
137401
  if(graphData){
137501
137402
  graphData.entities.forEach(function(e){expEnt.add(e.id)});
137502
137403
  graphData.events.forEach(function(e){expEv.add(e.id)});
137503
137404
  }
137504
- selId=null;closeModal();rebuildLabels();fitView();
137405
+ selId=null;closeModal();rebuildLabels();fitView();markDirty();
137505
137406
  };
137506
137407
  document.getElementById('btn-close').onclick=closeModal;
137507
137408
  document.getElementById('modal-mask').addEventListener('click',closeModal);
@@ -137543,11 +137444,12 @@ window.addEventListener('keydown',function(e){
137543
137444
  if(e.key==='Escape'){
137544
137445
  if(document.getElementById('modal').classList.contains('open'))closeModal();
137545
137446
  else{selId=null;rebuildLabels()}
137447
+ markDirty();
137546
137448
  }else if(e.key===' '){
137547
137449
  e.preventDefault();
137548
137450
  expEnt.clear();expEv.clear();selId=null;
137549
137451
  if(graphData)graphData.entities.forEach(function(en){expEnt.add(en.id)});
137550
- closeModal();rebuildLabels();fitView();
137452
+ closeModal();rebuildLabels();fitView();markDirty();
137551
137453
  }else if(e.key==='ArrowRight'||e.key==='ArrowDown'){e.preventDefault();navigateRelated('next');}
137552
137454
  else if(e.key==='ArrowLeft'||e.key==='ArrowUp'){e.preventDefault();navigateRelated('prev');}
137553
137455
  });
@@ -137557,7 +137459,7 @@ var searchInput=document.getElementById('search-input');
137557
137459
  var searchQuery='',searchMatches=null;
137558
137460
  searchInput.addEventListener('input',function(){
137559
137461
  searchQuery=searchInput.value.trim().toLowerCase();
137560
- if(!searchQuery){searchMatches=null;rebuildLabels();return}
137462
+ if(!searchQuery){searchMatches=null;rebuildLabels();markDirty();return}
137561
137463
  searchMatches=new Set();
137562
137464
  var firstMatch=null;
137563
137465
  if(graphData){
@@ -137588,9 +137490,10 @@ searchInput.addEventListener('input',function(){
137588
137490
  });
137589
137491
  selId=firstMatch;focusOn(firstMatch);rebuildLabels();
137590
137492
  }
137493
+ markDirty();
137591
137494
  });
137592
137495
  searchInput.addEventListener('keydown',function(e){
137593
- if(e.key==='Escape'){searchInput.value='';searchQuery='';searchMatches=null;rebuildLabels();searchInput.blur();}
137496
+ if(e.key==='Escape'){searchInput.value='';searchQuery='';searchMatches=null;rebuildLabels();searchInput.blur();markDirty();}
137594
137497
  else if(e.key==='Enter'&&searchMatches&&searchMatches.size>0){
137595
137498
  var first=Array.from(searchMatches)[0];
137596
137499
  var data=nodeData.find(function(n){return n.id===first});
@@ -137670,20 +137573,24 @@ miniCanvas.addEventListener('click',function(e){
137670
137573
  var e=t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2;
137671
137574
  camTargetX=startTx+(worldX-startTx)*e;
137672
137575
  camTargetZ=startTz+(worldZ-startTz)*e;
137576
+ markDirty();
137673
137577
  if(t<1)focusAnim=requestAnimationFrame(step);
137674
137578
  }
137675
137579
  focusAnim=requestAnimationFrame(step);
137676
137580
  });
137677
137581
 
137678
137582
  // ─── 主渲染循环 ──────────────────────────────────────
137583
+ var dirty=true;
137584
+ function markDirty(){dirty=true}
137679
137585
  function animate(){
137680
137586
  requestAnimationFrame(animate);
137681
137587
  if(!graphData)return;
137682
- frameTime=performance.now();
137588
+ if(!dirty)return;
137589
+ dirty=false;
137683
137590
  ctx.clearRect(0,0,W,H);
137684
137591
  ctx.fillStyle='#fafafa';
137685
137592
  ctx.fillRect(0,0,W,H);
137686
- drawNebulae(frameTime);
137593
+ drawNebulae();
137687
137594
  var projMap=computeProjMap();
137688
137595
  var connSet=computeConnSet(projMap.allIds);
137689
137596
  drawEdges(projMap,connSet);
@@ -137736,11 +137643,11 @@ fetch('/api/graph').then(function(r){return r.json()}).then(function(data){
137736
137643
  });
137737
137644
  forceLayout3D();
137738
137645
  buildNebulae();
137739
- nodeData.forEach(function(n){ensureFloat(n.id)});
137740
137646
  rebuildLabels();
137741
137647
  fitView();
137742
137648
  animate();
137743
137649
  startAutoRotate();
137650
+ new EventSource('/api/heartbeat');
137744
137651
  }).catch(function(err){
137745
137652
  document.getElementById('loading').style.display='none';
137746
137653
  errorMsg.style.display='block';
@@ -137864,6 +137771,22 @@ async function handleWeb(host) {
137864
137771
  serveGraphJSON(store, res);
137865
137772
  return;
137866
137773
  }
137774
+ if (req.url === "/api/heartbeat") {
137775
+ res.writeHead(200, {
137776
+ "Content-Type": "text/event-stream",
137777
+ "Cache-Control": "no-store",
137778
+ Connection: "keep-alive"
137779
+ });
137780
+ const timer = setInterval(() => {
137781
+ res.write(": ping\n\n");
137782
+ }, 15e3);
137783
+ res.on("close", () => {
137784
+ clearInterval(timer);
137785
+ server.close();
137786
+ });
137787
+ res.write(": ok\n\n");
137788
+ return;
137789
+ }
137867
137790
  serveHTML(res, getLocale());
137868
137791
  });
137869
137792
  registerServer(server);
@@ -147856,6 +147779,24 @@ var MemoryPickerComponent = class extends Container {
147856
147779
  }
147857
147780
  };
147858
147781
  //#endregion
147782
+ //#region src/tui/utils/session-label.ts
147783
+ /**
147784
+ * Helpers for composing session labels in the session picker.
147785
+ *
147786
+ * Detection rule for the `[imported]` badge: `metadata.imported_from_scream_cli`
147787
+ * is strictly the boolean `true`. This mirrors the value written by
147788
+ * the old migration-legacy package into the session's `state.json` `custom` block.
147789
+ */
147790
+ const IMPORTED_BADGE = "[已导入]";
147791
+ const IMPORTED_FLAG_KEY = "imported_from_scream_cli";
147792
+ function isImportedSession(metadata) {
147793
+ if (metadata === void 0) return false;
147794
+ return metadata[IMPORTED_FLAG_KEY] === true;
147795
+ }
147796
+ function formatSessionLabel(input) {
147797
+ return `${isImportedSession(input.metadata) ? `${IMPORTED_BADGE} ` : ""}${input.title}`;
147798
+ }
147799
+ //#endregion
147859
147800
  //#region src/tui/components/dialogs/session-picker.ts
147860
147801
  /**
147861
147802
  * SessionPicker — pi-tui version of the session selection dialog.
@@ -150658,11 +150599,6 @@ async function handleMainCommand(opts, version) {
150658
150599
  }
150659
150600
  await runShell(validated.options, version);
150660
150601
  }
150661
- /** `scream migrate` — permanently disabled. */
150662
- async function handleMigrateCommand() {
150663
- process.stdout.write("迁移功能已取消,不再支持从 scream-cli 导入数据。\n");
150664
- process.exit(0);
150665
- }
150666
150602
  function main() {
150667
150603
  initProcessName();
150668
150604
  const version = getVersion();
@@ -150674,13 +150610,6 @@ function main() {
150674
150610
  process.stderr.write(`查看日志:${resolveGlobalLogPath(resolveScreamHome())}\n`);
150675
150611
  process.exit(1);
150676
150612
  });
150677
- }, () => {
150678
- handleMigrateCommand().catch(async (error) => {
150679
- await logStartupFailure("运行迁移", error);
150680
- process.stderr.write(formatStartupError(error, { operation: "运行迁移" }));
150681
- process.stderr.write(`查看日志:${resolveGlobalLogPath(resolveScreamHome())}\n`);
150682
- process.exit(1);
150683
- });
150684
150613
  }, (entry, args) => {
150685
150614
  runPluginNodeEntry(entry, args).catch(async (error) => {
150686
150615
  await logStartupFailure("运行插件节点入口", error);
package/dist/main.mjs CHANGED
@@ -6,7 +6,7 @@ const __dirname = __cjsShimDirname(__filename);
6
6
  import "./suppress-sqlite-warning-C2VB0doZ.mjs";
7
7
  //#region src/main.ts
8
8
  try {
9
- (await import("./app-Ir0w8ElF.mjs")).main();
9
+ (await import("./app-BE3SBnF0.mjs")).main();
10
10
  } catch (error) {
11
11
  process.stderr.write(`${error instanceof Error ? error.stack ?? error.message : String(error)}\n`);
12
12
  process.exit(1);
package/icon.ico CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scream-code",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "A terminal-native AI agent for builders",
5
5
  "license": "MIT",
6
6
  "author": "ScreamCli",
@@ -74,7 +74,6 @@
74
74
  "@scream-code/config": "workspace:^",
75
75
  "@scream-code/knowledge": "workspace:*",
76
76
  "@scream-code/memory": "workspace:*",
77
- "@scream-code/migration-legacy": "workspace:^",
78
77
  "@scream-code/scream-code-sdk": "workspace:^",
79
78
  "@types/semver": "^7.7.0",
80
79
  "tsx": "^4.21.0"