Skip to content

Spot it. Save it. Free, local-first Chrome extension for images, videos and prompts. Explore 2,000+ curated cases and connect your library to AI Agents via MCP. 提示词导演

Organize extension sources and simplify release documentation

wchao6891510e6867f5cf
diff --git a/.github/workflows/release-safety.yml b/.github/workflows/release-safety.yml
index 2d7fef4..099bbf7 100644
--- a/.github/workflows/release-safety.yml
+++ b/.github/workflows/release-safety.yml
@@ -106,7 +106,7 @@ jobs:
run: |
python - <<'PY'
import json, os, pathlib, subprocess, sys, zipfile
- version = json.loads(pathlib.Path('manifest.json').read_text())['version']
+ version = json.loads(pathlib.Path('extension/manifest.json').read_text())['version']
destination = pathlib.Path(os.environ['RUNNER_TEMP']) / 'PromptDirector'
with zipfile.ZipFile(f'dist/PromptDirector-{version}-FIXED-ID-DEV.zip') as archive:
archive.extractall(destination)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ce32182..ea05ac3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,217 +1,169 @@
-# Changelog
+# 更新记录
-## 1.20.6
+了解每个版本带来的功能变化与使用改善。下载请前往 [GitHub Releases](https://github.com/wchao6891/PromptDirector/releases/latest)。
-- 插件精选页接入恢复后的完整公共目录,支持浏览和保存 10 包、467 条案例;未核验授权的来源案例如实标注,保存后保留来源权利状态。
+## 1.20.6
-- 采集、保存及补充素材均为纯程序处理;保留预览确认流程,文章与媒体提示词按内容用途呈现,逐素材提示词随分享导入保留。
-- 修复部分媒体下载失败时案例已保存、侧栏却未清空的问题;真正未保存的内容继续保留,媒体问题可在来源信息中检查。
-- X 视频按当前帖匹配正常页面加载的媒体地址,优先保存完整 MP4;移除整帖网页嵌入,支持独立视频与 HLS 播放、时间定位和关闭回收。
-- 补全 ArtStation 项目播放器、Krea 原图和风格参考的采集;通用结构化图片与视频读取保留原件地址,视频封面不再替代视频。各平台范围见 [采集说明](docs/CAPTURE_SUPPORT.md)。
-- 合并前端简化:分享包下载与公开投稿分开,设置中的规则保存和恢复就近排列,收紧 Skill、创作台与维护任务的日常界面。
+- 精选案例支持浏览和保存完整公共目录,并保留每个案例的来源说明。
+- 改善 X 视频、ArtStation 作品与 Krea 图片的采集,方便把作品和提示词一起收藏。
+- 修复案例保存后侧栏未清空的问题;未保存内容继续保留在草稿中。
+- 优化设置、分享、Skill 与创作台的操作布局。
## 1.20.5
-- 案例库项目侧栏支持直接拖动、搜索定位和移动到指定项目;保持项目关系及案例归属,提供移动撤销。
-- 大 ZIP 读取校验移至独立线程,显示字节进度;加速校验与批量资源写入,保留损坏检查和失败整体回滚。兼容部分工具提前生成的 ZIP64 目录。
-- 本地升级记住已验证的原安装目录,目录名称不影响实际版本;复用授权,不搬运案例或媒体。
-- 修复恢复中断后的接续、成功回执丢失和回退重复执行;保留结果未知的媒体及程序恢复副本,升级与清理共用操作锁。
+- 项目支持拖动排序、搜索定位和移动,误操作可以撤销。
+- 加快大型分享包导入,并显示读取进度。
+- 本地升级记住原安装目录,改善升级中断后的恢复与清理体验。
## 1.20.4
-- 修复本地版升级因哈希依赖文件被旧更新器拒绝的问题;保持插件身份和原安装目录,案例与媒体无需导出或重新导入。
-- 发布包使用旧更新器支持的程序布局,保留流式文件校验和完整依赖许可。
-- 发布验收加入历史更新器对最终 ZIP 的实际原位安装,以及同一浏览器资料库的案例、媒体、项目、标签和回收站保留验证。
+- 修复部分旧版无法升级本地插件的问题。
+- 升级继续使用原安装目录,已有案例和媒体无需导出或重新导入。
## 1.20.3
-- 采集侧栏统一选图、选区、剪贴板、截图和网页补充入口,同一案例可连续追加、去重、移除和撤销。
-- 修复 X 轮播组图漏采;主帖图片默认选中,引用帖图片可整组加入,减少无关页面内容。
-- 分类、项目和标签直接可见并随网页采集保存;只保存正文时保留未保存图片。
-- 修复采集取消、重新确认、截图完成与高亮定位的状态问题。
-- 图片和视频提示词案例按内容分类使用既有详情结构;清理帖子杂文、文章排版与重复媒体占位。
+- 同一案例可以连续追加选图、截图、剪贴板和网页内容,支持移除与撤销。
+- 改善 X 轮播组图采集,主帖和引用帖图片可以分开选择。
+- 采集时可直接设置分类、项目和标签;修复取消与重新确认后的显示问题。
## 1.20.2
-- 修复文件夹备份目录选择器丢失用户手势;预检后才创建备份目录,写入和回读验证后再生成完成标记,取消及失败反馈更准确。
-- 资料库导入导出支持 ZIP64 和 GB 级原件,按实际资源能力处理案例和文件数量;保留路径、校验和、容量与事务保护。
-- 大包逐包检查,解压与备份哈希逐段处理;补齐历史图片格式的恢复检查。
-- 发布验证加入原生目录选择器、多 GB ZIP 往返和升级后原始媒体保留检查。
+- 修复文件夹备份无法打开目录选择窗口的问题。
+- 改善大型 ZIP 和原始媒体的导入、导出与备份恢复,显示更清楚的进度和失败原因。
+- 修复部分历史 GIF、AVIF 图片恢复失败的问题。
## 1.20.1
-- 设置首页收紧布局:关联按钮与功能同排、保存改为图标,跨设备同步按需展开;许可与版本详情移到“关于”。
-- 商店版由 Chrome 自动更新;GitHub 本地版支持验证安装目录和更新包后原位替换程序,案例与媒体无需导出、迁移或重新导入。
-- 本地升级显示准备与写入进度,跳过未变化的程序文件;写入失败可回退,重启后核验实际版本,提供临时程序副本清理与中断恢复入口。
-- 修复返回案例库时的浏览位置与创作台搜索条件差异。
+- 本地版可在设置中原位升级,显示准备与写入进度,并提供中断恢复入口。
+- 设置页更紧凑,备份同步、许可和版本信息更容易查找。
+- 改善网页采集、案例管理、视频分析和分享包兼容性;修复返回案例库时浏览位置丢失的问题。
## 1.20.0
-- 网页采集补全 Higgsfield 作品、教程与 LibTV 公开案例的媒体、原始提示词、来源元信息和附件;重新保存可补齐缺失媒体,保留已编辑内容。
-- 图片原件上限统一为 32 MiB,原文件无损保存,封面单独生成;视频、文章和图片按实际内容呈现,文章正文与提示词分开编辑,避免重复展示。
-- 案例管理支持连续选择、按当前项目移动和多 ZIP 批次预检;冲突处理、资源写入与资料提交共享可恢复的导入事务。
-- 视频分析转入持久后台执行,保留阶段、请求预算、停止和迟到结果保护;分析模块统一识别服务错误、空结果和输出截断,模型设置按任务保持独立。
-- 创作台发送真实视频参考,支持流式对话与中断恢复;服务端失败、内容阻止和异常断流均不能误报完成,也不会自动重发。
-- 详情页统一提示词来源与编辑入口,优化媒体按钮、封面和空态;局部编辑及异步反馈保持阅读位置、草稿和播放状态。
-- 修复视频分享 ZIP、临时附件与生成结果恢复的大小规则不一致;导出自检使用接收端相同限制,阻止生成无法回导的分享包。
+- 改善 Higgsfield 作品、教程和 LibTV 案例的采集,重新保存时可以补充缺失媒体。
+- 案例支持连续选择、按项目移动和多个分享包导入。
+- 视频分析可在后台继续执行,详情编辑更好地保留阅读与播放位置。
+- 改善创作台流式回复恢复与视频分享包兼容性。
## 1.19.8
-- 创作台默认以一次模型请求直接完成文字或多模态交流;自动模式在同一响应内决定回答、分析或提示词装配,手动模式严格保持用户选择,不再为了“规划”固定增加第二次调用。
-- 文字回复支持流式显示并持久保存进行中的轮次;刷新、离页或浏览器中断会恢复已收到正文和明确的重试状态,不会自动重发可能已经计费的请求。
-- 本地案例检索改为用户本轮主动开启,检索结果、参考媒体、原始提示词、AI 逆推、Skill、系统指令和用户请求形成可查看的七层装配;每轮冻结去敏快照,后续修改不会覆盖历史事实。
-- 图片与视频创作只执行目标服务真实需要的请求;生成、整图修改、局部修改和基于新结果继续修改都保留独立装配与版本关系,临时图片预分析请求和正式创作请求分别计数。
-- 后台媒体任务持续记录准备、请求、下载与落库等实际阶段;停止、异常和浏览器恢复沿用真实累计状态,服务请求发出后的本地检查点失败也不会把在途付费请求误判成可安全重试。
+- 创作台支持流式回复,中断后可以找回已收到的文字。
+- 可按需使用本地案例作为创作参考,并查看每轮使用的素材和提示词。
+- 图片、视频生成及继续修改保留版本关系;后台任务显示当前进度。
## 1.19.7
-- AI 服务连接按任务分开选择模型:文字标签、Skill 提炼与创作规划共用“文字与创作模型”,图片和视频分析各自选择;保存后明确更新对应任务路由,未选择的任务保持原路由。
-- DeepSeek 账号目录按官方精确能力区分 V4 Flash / Pro 文字模型与 V4 Flash Vision 图片模型,不再把单一“分析模型”同时套给文字和视觉任务。
-- 创作台多模型菜单恢复中性列表视觉,仅当前模型使用克制的选中标记;窄窗口限制菜单高度并内部滚动,不再满屏青柠或溢出视口。
-- 固定 ID 浏览器回归新增窄视口、多任务连接路由和一键切换独立生图服务,锁定真实安装版截图暴露的两类回归。
+- 文字创作、图片分析和视频分析可以分别选择模型。
+- 优化创作台模型菜单的窄屏显示,避免遮挡页面。
## 1.19.6
-- AI 服务连接恢复展示当前账号目录中的全部可选分析模型;用户明确选择后才联动兼容的空缺任务,已有手动任务路由继续保持不变。
-- 创作台模型菜单恢复展示所有已连接的创作规划候选;新会话仍以“创作规划”任务路由为默认,本轮切换只更新当前会话,并按实际选择的服务、模型和凭据发送。
-- 图片生成与图片分析路由彻底解耦:已配置的独立生图服务不再因图片分析未分配而被禁用,xAI 图片分析模型也不会被误当成图片生成模型。
-- 固定 ID 本地扩展实验室新增多模型路由回归场景,长期锁定连接页多模型、创作台跨服务切换和独立图片生成三条行为。
+- 服务连接与创作台可选择已连接账号提供的模型。
+- 改善独立图片生成服务的使用,保留已有的手动模型选择。
## 1.19.5
-- AI 服务保持一次连接,任务路由直接展示文字、Skill、创作规划、图片与视频实际调用的服务和模型;新连接只补齐空缺或仍由连接管理的路由,不覆盖用户手动分配。
-- 案例详情右侧统一提供视频逆推、创意拆解、广告审片和自定义问题;每个入口直接编辑本次指令并一次发送,逆推结果保存在对应视频的 AI 提示词中,可选在同一次请求生成视觉标签且不覆盖原始提示词。
-- 图片与视频批量分析保持独立入口;视频批量默认并发 2,汇总展示并确认缺失文件、不兼容来源和正在分析的排除数量与原因,后台恢复不会自动重发状态未知的付费请求。
-- 创作台和 Skill 按具体素材分别使用原始提示词、当前 AI 视觉逆推与人工时间笔记;原始内容优先且不会被 AI 结果或其他视频的内容覆盖。
+- 连接 AI 服务后,可为文字、图片、视频等任务分别选择服务和模型。
+- 视频详情新增提示词反推、创意拆解、广告审片和自定义问题入口。
+- 图片与视频可分别批量分析,开始前会说明无法处理的素材及原因。
## 1.19.4
-- 新增智谱 GLM 服务连接和按任务模型分配,动态读取账号模型目录;GLM-5.3-Flash 可用于文字标签、Skill 提炼、创作规划、图片分析与视频分析,未确认能力的模型不会被静默代替。
-- 案例库本地视频可主动发送给 GLM-5.3-Flash 分析:发送前明确展示本地文件范围并使用原始 Base64;无法编码的格式或只有社交平台播放页时,会在付费请求前停止并说明原因,未公开的服务端大小边界不会被客户端擅自写死。
-- 创作台可选择已分配的智谱规划模型,并按具体模型分别发送 Data URL 或原始 Base64 参考图;不再展示模型没有提供的思考开关,也不会在刷新、失败或媒体生成阶段切换到其他规划服务。
-- AI 服务错误统一显示实际服务名称并脱敏密钥;本地扩展实验室会阻止未声明的外网请求,验证固定扩展身份、案例库、采集器、创作台、升级与可恢复状态,可长期用于发布前自动化验收。
+- 支持连接智谱 GLM,并按任务选择模型。
+- 本地视频可以在确认发送范围后交给支持视频输入的模型分析。
+- 改善服务错误提示,便于判断连接或素材问题。
## 1.19.3
-- ZIP 分享包、完整资料夹备份与手动跨设备同步共用同一套媒体格式、案例身份、项目关系和清理规则,覆盖音频、动图、现代图片、字幕、视频与文档等可携带资源。
-- 单个缺失、损坏、类型错误或结构不兼容的资源只隔离自身,其他健康案例继续导入、恢复或同步;预检会列出被跳过的案例和文件,提交后的资料库不保留悬空媒体、损坏 AI 标签或待修复占位。
-- 已标记完成的备份若后来发生局部资源损坏,会明确降级为救援恢复并禁止精确替换;未知解析错误、未来数据版本和无法证明逐项损失的异常仍会停止,避免静默吞掉资料。
-- 完整导入采用预检后单次事务提交,支持安全合并、精确替换、自动恢复点与失败回滚;同步在业务提交后才清理旧媒体,存储读取失败时不会写入半成品。
-- 保留既有用户数据的正式迁移、语义去重和多项目归属,继续用 1.19.2 正式版本夹具验证升级与完整资料往返。
+- 分享、备份与同步支持更多图片、音频、视频、字幕和文档格式。
+- 部分文件损坏时,可恢复的健康案例仍可继续导入,并显示跳过内容。
+- 改善完整资料库合并、恢复和同步的可靠性。
## 1.19.2
-- 历史分享包统一经过 v1–v5 迁移后再导入,兼容 `jpeg/jpg` 等同族格式;无效 AI 标签会被丢弃并记录,不再阻断仍可恢复的案例。
-- 分享 ZIP 按案例和媒体隔离失败:单个缺失、损坏、类型不符或描述不安全的文件会被跳过,其他正确案例继续导入;导入确认会明确列出保留、跳过和丢弃数量。
-- 导入写入改为可重复确认的事务流程,网络回执丢失不会造成重复案例或孤立媒体;完全相同的案例与媒体只跳过精确副本,不自动合并用户主动保存的相似内容。
-- 完整资料夹备份升级为可换电脑恢复:包含回收站案例和项目,并把仍可读取的本机链接原件复制进备份;写完后会回读自检,任一核心素材不可读时不写完成标记。
-- 修复项目删除与恢复关系、历史标签树在回收站中的迁移,以及坏 AI 标签随回收站案例或媒体复活的问题。
-- 创作台可复用带有效画面描述的旧版图片分析;图片分析改为可观察的后台任务,关闭窗口只断开本页,显式停止与再次分析分别处理,并让交互任务优先于后台导入分析。
-- 历史迁移继续保留分析请求次数和规范化诊断;无法由 Chrome 预览的本地 MPEG-4 视频在案例墙明确显示为本地文件,不再伪装成外部“视频来源”。
+- 改善历史分享包与图片格式兼容性,导入前显示可保留及跳过的内容。
+- 完整资料夹备份包含回收站与可读取的本地原件,便于换电脑恢复。
+- 修复项目删除恢复、标签保留与重复导入问题。
## 1.19.1
-- 修复项目侧栏与案例管理两处批量画面分析入口:选择范围、开始按钮、运行中进度、暂停与失败数量都会即时显示,旧任务也不会再用过期模型覆盖当前设置。
-- 画面分析改为原子保存:只有同时得到详细反推提示词与有效 AI 标签才算成功;缺字段、空标签和旧版半成品统一明确失败,不再写入不完整案例。
-- 反推提示词继续覆盖构图、主体、空间、镜头、光线、色彩、材质、风格、文字与画面关系等复刻维度;对兼容视觉服务默认关闭思考,并收敛为“提示词 + 标签”的结构化输出。
-- 分析任务使用统一的受控并发与后台恢复机制,区分网络、限流、服务端和格式错误;每张图的网络重试与格式纠正共享最多 3 次真实请求预算,界面提供可重试的中文结果。
-- 文字批量分析改为以实际保存的检索标签判定成功,并与案例当前主图提示词使用同一份分析输入,避免显示成功却在详情页看不到标签。
-- 分享包与完整资料库导入会校验并重建 AI 标签引用;即使图片 ID 冲突并被重命名,视觉标签也会跟随对应图片迁移,缺失词表则停止导入并说明问题。
-- 案例详情页移除重复的下方反推提示词模块,只保留一处可编辑提示词入口;本地索引维护也不再使用容易与 AI 失败混淆的“待补全”文案。
+- 修复项目与案例管理中的批量画面分析入口,进度、暂停和失败信息更清楚。
+- 改善画面提示词与 AI 标签的保存、检索和导入。
+- 案例详情中的提示词编辑入口更集中。
## 1.19.0
-- 项目升级为可嵌套的树形结构:支持空父项目、跨层级拖动、键盘管理、子树去重统计,并无损迁移原有项目、案例归属与顺序。
-- 项目内容区会先展示直接子项目,再展示直接案例;分享、批量分析、Composer 与 Skill 来源默认覆盖完整子树。
-- 案例勾选管理的“项目”菜单新增批量移出,只解除目标项目关系,不删除案例或影响其他项目。
-- 项目树已覆盖回收站恢复、新旧分享包、精选导入与手动同步;完整路径选择始终使用项目 ID,不再依赖可能重名的显示文字。
-- 批量 AI 分析改为可并发、可后台恢复的持久任务,修复多结果提交丢失、异常高频重试和中断后不继续执行的问题。
+- 项目支持多层嵌套、跨层移动和键盘管理。
+- 可以按完整项目分享或分析参考资料,也可以批量将案例移出项目。
+- 批量 AI 分析可在后台继续执行,改善中断后的恢复。
+
+## 1.18.17
+
+- 完善英文界面、采集反馈和系统分类的翻译。
+- 修复窄屏下侧栏、项目菜单、模型菜单和精选页的换行与遮挡问题。
## 1.18.16
-- 统一创作 Skill、精选 Skill 与创作台参考区的分段导航和卡片密度,去除多余空白、整卡高亮与页面间的尺寸漂移。
-- 精选 Skill 列表只突出名称、用途和保存操作;版本与许可移入详情折叠区,重复的正文标题不再重复显示。
-- 精选 Skill 支持从列表直接安全保存,并明确区分首次保存、同版已保存、新版本另存与校验过程。
+- 精选 Skill 列表更清楚地展示名称、用途和保存操作。
+- Skill 支持直接保存,并区分已保存与新版本。
+- 改善创作台参考区和精选页的布局。
## 1.18.15
-- 精选 Skill 目录与投稿保留用户可读调用名,稳定公开 ID 继续独立用于版本识别;保存到本地后不再显示内部 `creative-skill-*` 编号。
+- 精选 Skill 保留易读的名称,保存到本地后更容易辨认。
## 1.18.14
-- 精选 Skill 新增独立目录、手动投稿与本地保存流程;投稿只需公开署名、自动摘要和开放确认,维护字段移到人工审核阶段。
-- 精选案例与精选 Skill 统一深浅色、导航、按钮和空态;公共目录先行上线,空目录不再误报 404。
-- 图片分析支持把动态发现的模型手动分配给 DeepSeek;修复 JSON 视觉 Schema 断链、空响应原因不明以及 `OCR` 根字段大小写漂移。
-- 跨设备备份改为严格手动执行,未变化时零写入,重复启动合并为同一任务,取消后停止并回滚未完成写入。
+- 新增精选 Skill 浏览、保存与投稿入口。
+- 改善精选案例与 Skill 页面在深浅主题下的显示。
+- 改善图片分析结果解析与手动跨设备备份。
## 1.18.13
-- 项目排序时不再误选文字,案例选择期间排序入口保持原位并以禁用状态表达互斥关系。
-- 快速笔记、视频链接和导入确认的项目组合框会根据弹窗可用空间上下展开,不再被滚动区或底部操作栏裁切。
-- 案例排序与选择入口改为轻量工具条;案例删除入口移到来源信息旁,无来源案例仍在详情正文底部提供回收站操作。
+- 改善项目排序和案例选择的操作。
+- 笔记、视频链接与导入窗口中的项目菜单不再被遮挡。
## 1.18.12
-- 项目排序改为显式管理态下整行拖动,支持触摸与键盘移动,并在保存失败时恢复原顺序;项目菜单同步缩短并去除省略文案。
-- 批量选择栏只保留一个已选计数,详情删除操作移到内容末尾,单图案例不再显示共享提示词编辑入口,标题保存改为同行操作。
-- 快速笔记、视频链接和导入确认复用同一可创建项目组合框;精选案例排序回归公共主题 Select,清除残留的系统白灰菜单。
-- “补全资料索引”明确说明本地分类、色卡和相似匹配用途,按检查、补全与完成状态显示真实文字,不再使用无反馈的常驻进度条。
+- 项目支持拖动、触摸与键盘排序。
+- 改善批量选择、详情删除、标签与项目选择的布局。
+- 本地资料整理显示更清楚的检查与完成状态。
## 1.18.11
-- 统一 Chrome 134+ 下拉菜单视觉,保留原生键盘、表单与无障碍行为。
-- 详情、外部采集和导入确认统一使用多标签编辑器;界面术语收敛为“添加标签”和“AI 标签”,层级标签默认只显示叶子名称。
-- 批量栏恢复稳定居中,项目排序删除常驻下拉并改为按需上下移动,案例选择与排序完成使用不同图标。
-- 回收站新增真正的“全部恢复”,桌面项目侧栏支持拖动与键盘调整宽度并记住偏好。
+- 改善下拉菜单、标签编辑与多语言显示。
+- 回收站支持全部恢复,项目侧栏可以调整宽度。
## 1.18.10
-- 案例详情改用紧凑的多项目下拉,自由标签与回收站操作直接可用,不再被冗余说明和异常复选框布局干扰。
-- 修复全选筛选结果后无法清空的问题;案例与项目排序改为显式进入管理态,完成后立即隐藏移动控件。
-- 侧栏只保留项目与回收站,回收站增加素材封面、完整标题和图标操作。
-- 更新提醒只在真实存在新版本时强调可执行动作,当前已是最新版时保持中性。
+- 案例详情支持更紧凑的多项目选择,标签与回收站操作更直接。
+- 修复全选结果无法清空的问题,改善案例排序与更新提醒。
## 1.18.9
-- 分享包把 Chrome Web Store 设为普通用户的主安装入口,并保留源码仓库作为次级入口。
-- README 的普通用户安装说明改为商店安装与自动更新;GitHub Release 本地包只用于源码检查和开发验证。
-- AI 设置改为“任务默认”和“服务连接”分页,服务保存或模型刷新后会在当前窗口立即同步连接状态、模型目录和任务能力。
-- 服务配置存在未保存更改时,点击遮罩不再关闭;关闭、取消或 Escape 会先要求确认放弃。
-- 修复案例库图片墙最后一列和焦点框越出容器的问题,并加强缩放、追加与图片加载后的稳定布局。
-- 智能选图优先真实图片、视频和画布,去除同时包住提示词与按钮的重复外层候选,并按背景图实际绘制区域计算边界。
-- 网页采集会预检当前站点权限,按当前来源授权后在同一次操作中继续扫描,并分别提示拒绝授权、站点访问限制、不可注入页面与脚本启动失败。
-- 修复侧栏在工具栏图标已授予临时访问权后仍误判当前页不可访问的问题;授权状态会在同一次采集操作中重新读取并继续申请当前网站权限。
-- 工具栏图标改为只打开或保持侧栏,不再把已打开的侧栏切换关闭;Chrome 新标签页等内部页面会明确说明不可采集,普通网页仍可继续智能选图。
+- AI 设置支持分别管理任务默认模型与服务连接。
+- 修复图片墙越界和智能选图中的重复候选。
+- 改善网页采集授权提示;侧栏可保持打开,方便连续收藏。
## 1.18.8
-- 修复完整资料夹备份中的 RTF 文档恢复:旧备份即使以 `.bin` 保存,也会通过真实文件签名确认后安全恢复。
-- 新备份使用 `.rtf` 扩展名,并在浏览器未提供文件类型时沿用已保存的文档类型。
-- 损坏或伪装成 RTF 的文件仍会在写入资料库前被拒绝。
+- 修复历史备份中部分 RTF 文档无法恢复的问题。
+- 新备份更准确地保留 RTF 文档格式。
## 1.18.7
-- 锁定 Chrome Web Store 正式扩展身份;正式打包先用项目公钥校验目标 ID,再从商店上传清单中移除仅供本地开发使用的 `key` 字段。
-- 对齐中英文商店品牌名,移除超限的英文短名称,并把可选 DeepSeek 域名访问改为运行时请求。
-- 补齐固定精选目录域名、Limited Use 和商店隐私字段说明,增加可重复执行的商店材料检查。
-- 重建当前品牌图、宣传图和三张隔离生成的真实扩展截图。
-- 修复完整浏览器回归中的图片加载、后台状态同步和扩展页刷新竞态。
+- 统一中英文品牌显示与图标。
+- 改善扩展安装身份识别与按需申请网站访问权限。
## 1.18.5
-- 重做网页采集:先确认创作主体,再检查正文与媒体;同一列表批量采集不会进入详情页,也不会把未确认媒体静默写入案例。
-- 完整文章按原网页顺序保留标题、段落、列表、引用、代码、表格及相关媒体;安全文档可保存本地副本,未知文件只保留来源链接。
-- 精选案例恢复主资料库式浏览、详情查看、视频播放和选择性保存,保存内容真正进入个人本地资料库。
-- 创作台“参考”数量只统计案例;有原提示词或有效画面分析时,可完全不读图、不分析图片并以零图片载荷生成。
-- 修复生成完成后按钮仍显示运行状态的问题,并补充刷新竞态保护,完成后可以立即开始下一轮。
-- 参考图参与方式及其 token 影响已补齐中英文说明。
+- 网页采集支持先确认内容,再预览正文与媒体。
+- 文章保存保留段落、列表、表格和相关媒体的顺序。
+- 精选案例支持详情查看、视频播放和选择性保存。
+- 改善创作参考使用与生成完成后的操作反馈。
## 1.18.4
-PromptDirector 从这个经过开源边界清理和完整验证的版本开始维护公开历史。
-
-- 本地优先保存和整理文字、图片、视频、文档、提示词与创作 Skill。
-- 支持图片和视频参考、视觉分析、创作规划、媒体生成与结果版本记录。
-- 提供资料夹备份、加密同步、分享包、精选案例和可移植 Skill 工作流。
-- 外部 AI 请求由用户主动发起,并明确展示服务、模型、发送范围与付费确认。
-- 公开源码、测试和发布包可以在标准项目环境中独立验证。
+- 收藏和整理文字、图片、视频、文档与提示词。
+- 支持视觉分析、创作参考和生成结果保存。
+- 提供资料夹备份、加密同步、分享包与精选案例。
diff --git a/README.md b/README.md
index 6c01be0..c603d66 100644
--- a/README.md
+++ b/README.md
@@ -81,28 +81,12 @@ You can also install through the [Chrome Web Store](https://chromewebstore.googl
</details>
-<details>
-<summary>Development and verification</summary>
-
-Requires Node.js 22.13 or later.
-
-```sh
-npm install
-npm run verify
-```
-
-`npm run verify` runs the full verification gate: source and asset checks, historical-data compatibility and unit tests, packaged browser journeys in isolated Chrome for Testing, and an upgrade rehearsal with the previous release's data in the same Chrome profile. It builds packages but does not publish a GitHub release or upload to the Store.
-For a source-only check, run `npm run verify:source`; for the historical data contract, run `npm run check:compat`. `npm run test:local-extension` runs packaged browser acceptance. `npm run package` builds the fixed-ID local package; `npm run package:release` builds the Store upload package. Both share case, media and creative features. The Store package uses Chrome-managed updates; the local package includes in-place upgrading. Packaging fails if the official identity is missing.
-
-See [data compatibility](docs/DATA_COMPATIBILITY.md) and [known limitations](docs/KNOWN_LIMITATIONS.md) for support boundaries.
-
-</details>
## Contribute and license
Contributions to capture adaptations, interactions, tests and documentation are welcome. When [reporting an issue](https://github.com/wchao6891/PromptDirector/issues), describe the page type, observable behavior and reproduction steps. Remove API keys, private data and unauthorized media from examples. Run `npm run verify` before submitting code.
-For interface changes, read the [current design and acceptance principles](design-qa.md#当前设计与验收原则). Use the approved page appearance as the baseline and verify both visual presentation and existing interactions.
+See the [development guide](docs/DEVELOPMENT.md) and [interface guidelines](docs/DESIGN.md) to contribute.
Code is licensed under [Apache License 2.0](LICENSE). See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for dependencies. The code license does not grant rights to third-party case media.
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 3a7dc1d..ee3905f 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -83,28 +83,12 @@
</details>
-<details>
-<summary>开发与验证</summary>
-
-
-需要 Node.js 22.13 或更高版本。
-
-```sh
-npm install
-npm run verify
-```
-`npm run verify` 是完整验证门槛,构建与验证不会自动发布 GitHub Release 或上传商店:先完成源码、资源、历史数据兼容与单元测试,再把固定 ID 本地包加载到隔离的 Chrome for Testing 中跑完整浏览器 E2E;全部通过后生成商店包,并用上一正式版资料执行同一 Chrome Profile 的最终包升级演练。任一阶段失败都不会通过门禁。只需快速检查源码时可运行 `npm run verify:source`,只检查历史数据合同可运行 `npm run check:compat`。`npm run test:local-extension` 是打包后自动化主验收;`npm run package` 生成保留固定身份的本地安装包;`npm run package:release` 生成移除 `key` 的 Chrome Web Store 上传包。两者共用案例、媒体和创作功能。商店包移除本地程序安装器,只保留 Chrome 更新;固定身份本地包保留原位升级。正式身份缺失时命令会明确失败,避免用户资料被错误扩展 ID 隔离。
-
-已发布数据的长期支持规则、权威夹具和升级门禁见[数据兼容说明](docs/DATA_COMPATIBILITY.md)。当前浏览器兼容边界和已确认但延期的增强记录在[已知限制](docs/KNOWN_LIMITATIONS.md)。
-
-
-</details>
## 参与与许可
欢迎提交问题、改善交互、完善采集适配、补充测试与文档。[反馈问题](https://github.com/wchao6891/PromptDirector/issues)时,请说明页面类型、用户可见的问题和复现步骤;提供示例前移除 API Key、私人资料和未获授权的素材。提交代码前请运行 `npm run verify`。
-界面改动先阅读[当前设计与验收原则](design-qa.md#当前设计与验收原则),以用户已确认的页面效果为基线,同时验证视觉和原有操作流程。
+参与开发请阅读[开发指南](docs/DEVELOPMENT.md)和[界面规范](docs/DESIGN.md)。
代码采用 [Apache License 2.0](LICENSE)。第三方组件见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。代码许可不授予第三方案例素材的使用权。
diff --git a/docs/CAPTURE_SUPPORT.md b/docs/CAPTURE_SUPPORT.md
index e141e05..05ef5d2 100644
--- a/docs/CAPTURE_SUPPORT.md
+++ b/docs/CAPTURE_SUPPORT.md
@@ -4,7 +4,7 @@
文章保留文字与媒体顺序;作品说明不自动充当原始提示词。来源明确提供的逐张提示词与相应素材一起保存。视频封面只用于预览,不能代表视频已经保存或可以播放。
-## 当前路径
+## 支持的页面与内容
| 平台 | 提取和播放路径 |
|---|---|
@@ -16,7 +16,7 @@
| 花瓣、Dribbble、DeviantArt、站酷 | 当前作品页面的可见内容及页面提供的结构化媒体。 |
| TapNow、Lovart、Midjourney、Civitai、Runway、可灵 | 通用可见内容与结构化图片/视频提取。是否提供提示词、原图、可访问节点或完整视频,取决于当前作品页面;没有提供的内容不会推断生成。 |
-平台名称表示适用路径,不表示该站全部页面已通过真实账号验收。通用提取仍适用于其他网页;不要将首页推荐流误当作已经打开的单个作品。
+不同页面提供的内容可能不同。请打开具体作品或帖子再采集;尚未加载的图片、登录后才能访问的内容和未公开的提示词可能无法保存。
## 视频与保存结果
@@ -24,9 +24,3 @@
- 在线视频仍依赖来源可用性。登录失效、链接过期、限流或禁止播放时会显示问题,可回到原作品重新采集;不会用封面或网页嵌套冒充视频播放。
- 案例已保存但部分媒体未完整取得时,已保存内容从采集侧栏清除,具体媒体问题保留在案例的来源信息中。真正保存失败的内容留在草稿中。
- 日常使用不需要卸载扩展或重建案例库。本地版在原目录更新程序,既有案例与媒体继续留在当前浏览器。
-
-## 验证范围
-
-自动回归使用隔离浏览器与明确的合成页面,覆盖保存和重开、文章路由、逐素材提示词、原件字节、独立视频音画与拖动、播放器回收、失败与补采。合成测试不能替代真实账号验收。
-
-当前真实账号验收存在限制:小红书样本打开时要求登录;本次自动化工具不能操作用户日常扩展页面。因此新版本的真实 X 视频、受登录限制的页面和各平台全部页面形态尚未取得完整安装版验收证据。
diff --git a/docs/DATA_COMPATIBILITY.md b/docs/DATA_COMPATIBILITY.md
index da77c64..49ca34a 100644
--- a/docs/DATA_COMPATIBILITY.md
+++ b/docs/DATA_COMPATIBILITY.md
@@ -1,58 +1,29 @@
-# 数据兼容与升级门禁
+# 数据兼容与恢复
-PromptDirector 把正式发布的数据格式视为长期产品契约。应用版本、本机资料库结构版本和分享包格式版本彼此独立;应用更新不自动意味着数据格式变化。
+应用升级继续保留案例、原始媒体、用户编辑、标签、项目、回收站和创作记录。应用版本与数据格式版本分别管理;更新插件不需要常规导出或重新导入资料。
-## 兼容承诺
+## 分享包
-- 当前版本只导出最新分享包格式,但导入端永久支持每个已正式发布的分享包版本。
-- 已知历史错误结构进入固定事故夹具;可恢复案例不因坏标签、坏媒体或同包其他坏案例而被拒绝。
-- 本机资料库结构版本只增不减。迁移后必须保留案例、用户文字、用户标签、项目、回收站和创作会话等核心资产。
-- 无法恢复的字节不会被伪造;程序跳过损坏对象、保留可用内容并返回逐项诊断。
-- 涉及破坏性持久化变化时,至少保留一个正式版本的紧急回滚兼容窗口。
+当前版本导出最新格式,同时支持导入已正式发布的历史分享包格式。导入前会检查版本、文件完整性和案例关系,并列出可保留或无法恢复的内容。单个损坏资源不会阻断其他可恢复案例。
-## 三条资料通道共用的安全合同
+## 完整资料夹备份
-- 分享 ZIP、完整资料夹备份和加密同步共用同一套案例身份、媒体资源和清理规则;容器只负责读写文件或加密对象,不能各自解释资料结构。
-- 导入和恢复必须先完成版本检查、迁移、逐项校验与计划确认,再一次性提交。一个损坏或不兼容的项目只影响自身,其他可恢复案例继续保留。
-- 完整资料夹备份用于跨设备灾难恢复。安全合并保留本机资料并处理冲突;精确替换只接收完整备份,提交前建立可回退状态,容量不足或写入失败不得改变现有资料库。
-- 完成标记有效但单个内容资源后来损坏时,恢复会降级为明确的救援流程,只隔离具体坏项并禁止精确替换;无法定位到具体坏项的解析错误仍停止,不以容错隐藏程序故障。
-- 同步保留版本合并和可见冲突副本;只有完整内容指纹能够证明相同的不同编号案例才会收敛。缺少完整媒体哈希时保留两份,不猜测覆盖。
-- 同步发现本机媒体确已缺失时会列出对应案例和文件,清理该坏引用后继续同步其他资料;媒体存储读取异常仍停止且不提交部分结果。
-- 恢复提交与成功回执一起持久化。后台中断后,同一次操作只能继续原确认方案或读取已提交结果;资料已变化时要求重新预检,不能重复替换。回复丢失且结果无法确认时保留本次媒体,不按失败清理。
-- 回退请求绑定用户确认的回退点和操作编号。同一次请求重发只返回原结果,不能把资料库再次交换回去。
-- 媒体物理删除只能发生在资料状态提交成功之后。清理失败只允许留下额外字节,并在后续手动同步重试;活动资料、回收站、创作记录、暂存任务和恢复回退点仍引用的媒体不得删除。
+完整备份用于换电脑恢复,包含回收站以及可读取的本机链接原件。安全合并保留现有资料;精确替换需要完整备份,并在提交前建立恢复点。写入失败或可用空间不足时,原资料库保持不变。
-## 权威清单
+文件夹写入和回读校验通过后才生成完成标记。部分资源损坏的备份可以尝试救援恢复,但不能直接精确替换整库。
-- `test/fixtures/compat/compatibility-matrix.json`:正式分享包和本机资料库结构清单。
-- `test/fixtures/compat/provenance.json`:历史分享包夹具的来源与真实性边界。
-- `tools/check-data-compatibility.mjs`:比较当前代码、上一正式标签和固定夹具的可执行门禁。
-- `test/release_upgrade_e2e.py`:上一正式版与当前最终固定 ID 包共用 Chrome Profile 的升级演练。
-- `test/local_upgrade_native_e2e.py`:旧版实际安装器对最终 ZIP 使用真实 Chrome 文件句柄写入原目录,再执行插件重启并核对身份、案例和媒体;临时目录权限预先授予,不替代日常 Chrome 原生授权验收。
-- `test/library_import_interruption_e2e.py`:在提交前后实际停止 Chrome 后台,验证恢复接续、回执重放、媒体保留和回退幂等。
+## 跨设备同步
-夹具是脱敏或重建的确定性回归证据,不冒充用户不可用的原始故障资料。取得新的真实事故样本后,应保留最小脱敏复现和来源说明,不能用新生成的正常文件替代故障证据。
+同步保留可见的冲突副本,避免覆盖无法确认相同的内容。原设备的安装目录授权不会作为另一台设备的有效授权;升级安装位置与可迁移的案例资料分开保存。
-## 修改数据结构时
+## 中断与重试
-1. 先判断变化属于应用行为、本机资料库结构还是分享包格式。
-2. 只在持久化合同真实变化时增加对应数据版本。
-3. 增加旧版本到当前版本的迁移和固定夹具;不得删除已发布版本。
-4. 为案例、媒体、标签、项目、回收站和创作会话写出保留或显式丢弃规则。
-5. 运行 `npm run check:compat`,再运行完整 `npm run verify`。
+导入、恢复或同步中断后,可以继续检查已有结果。无法确定是否成功时会保留相关媒体,避免误删。重复确认不会重复写入相同的案例或再次替换已恢复的资料。
-`npm run verify` 会在最终打包后执行上一正式版升级演练。GitHub 的 `Release safety` 工作流会对提交重复执行兼容检查、完整 Chromium E2E、两个 Chrome 包以及最终包升级演练。另一台设备上的真实事故备份仍需在取得文件后单独验收,重建夹具不能替代原文件证据。
+## 容量与原件
-## 共享媒体边界与迭代回归
+分享、备份和恢复支持 ZIP64,实际容量取决于浏览器与设备可用资源。原文件字节与衍生封面分别保存;文件路径、声明大小、校验值和内容关系都会检查。
-资料库 ZIP、文件夹备份和恢复按实际文件与目标可用空间处理,支持 ZIP64。资料搬迁使用 `LIBRARY_TRANSFER_LIMITS` 表达浏览器可精确表示的字节和计数范围;网页采集与模型附件使用独立的资源预算。路径安全、文件声明大小、CRC、备份哈希和内容关系仍须完整校验。多 ZIP 逐包检查,原件在独立读取线程中按流校验并报告进度,导入资源以 Blob 句柄整组写入事务,失败整组回滚;取消检查应停止读取,正式导入明确失败应保持原资料库,并仅清理确定未被活动资料、暂存任务或回退点引用的本次资源;结果未知时先保留。
+## 贡献者参考
-备份按钮在有效用户点击链路中立即打开目录选择器,随后检查资料,得到必要确认后才创建备份子目录。写入并回读验证通过后才生成完成标记;未写入完成标记的目录只能尝试救援恢复。
-
-发布包实验室强制包含资料延续性场景:原生目录选择器有效/失效手势对照、GIF/AVIF 原件保留、完整/救援/失败备份、历史格式恢复、多 GB ZIP64 与压缩 ZIP 的实际字节往返以及手动同步。规模场景经默认 UI 导入、导出后由 Python 独立校验。重建夹具、原生 headless 取消、原设备真实事故包和用户安装版验收分别记录证据;最终安装版与真实事故包缺失时不能报告完整验收。
-
-原文件字节与衍生封面分别保存。增加媒体类型或修改大小策略时,同时验证案例、回收站、临时参考、生成结果及附件;至少有一项“导出后走默认导入入口”的回归,不能只用生产者自行放宽参数的读回测试。
-
-产品版本、持久数据格式与界面实现分开演进。新界面或运行机制可以替换,原始资料、用户编辑、来源归属、历史恢复能力和付费请求的真实状态必须继续有行为测试;版本号升级不等于擅自改变数据协议或固化当前布局。
-
-安装目录授权仅保存在当前浏览器的升级器数据库,与可迁移案例资料分离;升级临时记录清理后仍保留已验证的安装位置。不能把旧设备目录句柄作为新设备的有效授权。目录名称不参与软件版本判断,也不以改名或搬库完成常规升级。
+数据结构改动需要补充历史版本迁移及回归测试,并运行 `npm run check:compat` 和 `npm run verify`。版本清单位于 [`compatibility-matrix.json`](../test/fixtures/compat/compatibility-matrix.json),测试数据来源位于 [`provenance.json`](../test/fixtures/compat/provenance.json)。
diff --git a/design-qa.md b/docs/DESIGN.md
similarity index 90%
rename from design-qa.md
rename to docs/DESIGN.md
index ec0f588..bc2cac9 100644
--- a/design-qa.md
+++ b/docs/DESIGN.md
@@ -12,4 +12,4 @@
- **高频操作直接可达。** 人工标签输入与确认直接可见;来源不同的采集动作清楚区分。补充内容、取消和重试围绕同一草稿继续,保留用户已选内容和编辑。
- **先确认效果,再实施。** 展示同一基准的当前版与优化版,覆盖受影响页面的桌面、窄屏、明暗主题、中英文、长名称及适用任务状态。整批已确认的页面按稿实施,局部反馈只调整相关区域;改变方案时再确认。
- **视觉与行为分别验证。** 无溢出不等于排版合格;对照最终实现实屏,检查视觉重心、按钮一致性、徽标居中和阅读路径。再验证原候选、提交参数、错误反馈,以及切换、关闭、取消后的草稿、选择和阅读位置;页面重载另列测试与结论。
-- **边界与证据可追溯。** 实施前列明可改与保留区域,限定样式影响范围。前端整理沿用原业务流程,资料连续性遵循[数据兼容说明](docs/DATA_COMPATIBILITY.md)。原型、源码验证、隔离安装、日用安装及最终发布包分别记录,截图关联实际源码状态;后续修改使相关截图失效时重新核验。
+- **边界与证据可追溯。** 实施前列明可改与保留区域,限定样式影响范围。前端整理沿用原业务流程,资料连续性遵循[数据兼容说明](DATA_COMPATIBILITY.md)。原型、源码验证、隔离安装、日用安装及最终发布包分别记录,截图关联实际源码状态;后续修改使相关截图失效时重新核验。
diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md
new file mode 100644
index 0000000..ef3829c
--- /dev/null
+++ b/docs/DEVELOPMENT.md
@@ -0,0 +1,27 @@
+# Development
+
+Requires Node.js 22.13 or later. Run commands from the repository root.
+
+```sh
+npm ci
+npm run verify:source
+npm run package
+```
+
+Load `extension/` in Chrome or Edge for source development, or extract the generated `dist/*-FIXED-ID-DEV.zip` and load that directory for packaged testing. Keep the existing fixed extension identity when switching source locations; do not uninstall the extension or delete browser data.
+
+## Repository layout
+
+- `extension/`: loadable extension source, bundled dependencies, assets and translations.
+- `test/`: automated tests and synthetic fixtures.
+- `tools/`: build and verification commands.
+- `docs/`: product and contribution documentation.
+- `store/`: listing text, privacy policy and distribution materials.
+
+Published ZIPs keep a top-level `manifest.json`. Source organization does not change the installation layout or the existing local upgrade path.
+
+## Checks and packaging
+
+`npm run verify` runs source checks, historical data compatibility, packaged Chromium journeys and an upgrade rehearsal using a previous release. `npm run check:compat` checks the supported data formats. `npm run package:release` builds the Store upload variant. These commands do not publish a release or upload to the Store.
+
+See [data compatibility](DATA_COMPATIBILITY.md), [capture support](CAPTURE_SUPPORT.md) and [known limitations](KNOWN_LIMITATIONS.md) for product behavior.
diff --git a/docs/EXTENSION_ID_MIGRATION.md b/docs/EXTENSION_ID_MIGRATION.md
index 98b7e61..7a769b1 100644
--- a/docs/EXTENSION_ID_MIGRATION.md
+++ b/docs/EXTENSION_ID_MIGRATION.md
@@ -2,7 +2,7 @@
Chrome 会把扩展资料绑定到浏览器配置和扩展 ID。更换为另一个扩展 ID 时,新版无法直接读取旧版本地资料。
-同一扩展 ID 的常规更新保留原资料库,按 [README](../README.md#本地版更新) 更新程序即可。下面的备份恢复步骤仅用于更换扩展身份。
+同一扩展 ID 的常规更新保留原资料库,按 [安装与更新说明](../README.zh-CN.md#安装与更新) 更新程序即可。下面的备份恢复步骤仅用于更换扩展身份。
## 安全迁移
diff --git a/docs/KNOWN_LIMITATIONS.md b/docs/KNOWN_LIMITATIONS.md
index 494d0f4..599cdbc 100644
--- a/docs/KNOWN_LIMITATIONS.md
+++ b/docs/KNOWN_LIMITATIONS.md
@@ -4,11 +4,10 @@
PromptDirector 目前依赖 Chrome 的原生媒体解码能力。遇到浏览器无法解码、但系统播放器可以播放的 MPEG-4 文件时,案例仍会保留原文件和来源信息,并提供使用系统播放器打开的路径;当前版本不在扩展内置软件解码器。
-后续如实施软件解码,至少需要同时满足以下验收条件:不改变原文件、不会把解码失败误报为导入成功、能中止长时间任务、限制内存与临时存储占用,并在发布包体积与浏览器安全策略检查通过后再启用。
## GLM-5.3-Flash 本地视频直传边界
-案例库中的本地视频可以在用户确认后,以 Base64 发送给 GLM-5.3-Flash 做视频分析。智谱当前公开的 [GLM-5.3-Flash 模型页](https://docs.bigmodel.cn/cn/guide/models/vlm/glm-5.3-flash)和 [Chat Completions 接口页](https://docs.bigmodel.cn/api-reference/%E6%A8%A1%E5%9E%8B-api/%E5%AF%B9%E8%AF%9D%E8%A1%A5%E5%85%A8)没有声明直连视频的文件大小上限,因此 PromptDirector 不擅自设置 8 MB 等未公开限制。
+案例库中的本地视频可以在用户确认后,以 Base64 发送给 GLM-5.3-Flash 做视频分析。智谱当前公开的 [GLM-5.3-Flash 模型页](https://docs.bigmodel.cn/cn/guide/models/vlm/glm-5.3-flash)和 [Chat Completions 接口页](https://docs.bigmodel.cn/api-reference/%E6%A8%A1%E5%9E%8B-api/%E5%AF%B9%E8%AF%9D%E8%A1%A5%E5%85%A8)没有声明直连视频的文件大小上限。能否处理某个文件取决于所选服务的格式、容量与账号限制。
当前版本不会自动压缩、截断、抽帧或改用其他模型,因为这些降级会改变分析对象或产生额外费用。若服务端拒绝文件大小、格式或内容,请求会显示所选服务返回的错误且不会自动重试。只有公网视频文件直链可走 URL 分析;YouTube、Bilibili、抖音、X 或 Vimeo 的播放页面不等同于视频文件直链。
diff --git a/_locales/en/messages.json b/extension/_locales/en/messages.json
similarity index 100%
rename from _locales/en/messages.json
rename to extension/_locales/en/messages.json
diff --git a/_locales/zh_CN/messages.json b/extension/_locales/zh_CN/messages.json
similarity index 100%
rename from _locales/zh_CN/messages.json
rename to extension/_locales/zh_CN/messages.json
diff --git a/ai-model-capabilities.js b/extension/ai-model-capabilities.js
similarity index 100%
rename from ai-model-capabilities.js
rename to extension/ai-model-capabilities.js
diff --git a/ai-preference-migrations.js b/extension/ai-preference-migrations.js
similarity index 100%
rename from ai-preference-migrations.js
rename to extension/ai-preference-migrations.js
diff --git a/ai-provider-module.js b/extension/ai-provider-module.js
similarity index 100%
rename from ai-provider-module.js
rename to extension/ai-provider-module.js
diff --git a/ai-provider-presets.js b/extension/ai-provider-presets.js
similarity index 100%
rename from ai-provider-presets.js
rename to extension/ai-provider-presets.js
diff --git a/ai-provider-registry.js b/extension/ai-provider-registry.js
similarity index 100%
rename from ai-provider-registry.js
rename to extension/ai-provider-registry.js
diff --git a/ai-runtime.js b/extension/ai-runtime.js
similarity index 100%
rename from ai-runtime.js
rename to extension/ai-runtime.js
diff --git a/ai-service-profiles.js b/extension/ai-service-profiles.js
similarity index 100%
rename from ai-service-profiles.js
rename to extension/ai-service-profiles.js
diff --git a/analysis-batch.js b/extension/analysis-batch.js
similarity index 100%
rename from analysis-batch.js
rename to extension/analysis-batch.js
diff --git a/analysis-candidates.js b/extension/analysis-candidates.js
similarity index 100%
rename from analysis-candidates.js
rename to extension/analysis-candidates.js
diff --git a/analysis-input.js b/extension/analysis-input.js
similarity index 100%
rename from analysis-input.js
rename to extension/analysis-input.js
diff --git a/analysis-response.js b/extension/analysis-response.js
similarity index 100%
rename from analysis-response.js
rename to extension/analysis-response.js
diff --git a/analysis-retry-policy.js b/extension/analysis-retry-policy.js
similarity index 100%
rename from analysis-retry-policy.js
rename to extension/analysis-retry-policy.js
diff --git a/analysis-revision.js b/extension/analysis-revision.js
similarity index 100%
rename from analysis-revision.js
rename to extension/analysis-revision.js
diff --git a/analysis-scheduler.js b/extension/analysis-scheduler.js
similarity index 100%
rename from analysis-scheduler.js
rename to extension/analysis-scheduler.js
diff --git a/analysis-task-registry.js b/extension/analysis-task-registry.js
similarity index 100%
rename from analysis-task-registry.js
rename to extension/analysis-task-registry.js
diff --git a/analysis-tasks.js b/extension/analysis-tasks.js
similarity index 100%
rename from analysis-tasks.js
rename to extension/analysis-tasks.js
diff --git a/article-document.js b/extension/article-document.js
similarity index 100%
rename from article-document.js
rename to extension/article-document.js
diff --git a/article-edit.js b/extension/article-edit.js
similarity index 100%
rename from article-edit.js
rename to extension/article-edit.js
diff --git a/article-editor.js b/extension/article-editor.js
similarity index 100%
rename from article-editor.js
rename to extension/article-editor.js
diff --git a/article-text-view.js b/extension/article-text-view.js
similarity index 100%
rename from article-text-view.js
rename to extension/article-text-view.js
diff --git a/asset-formats.js b/extension/asset-formats.js
similarity index 100%
rename from asset-formats.js
rename to extension/asset-formats.js
diff --git a/assets/icons/LUCIDE-LICENSE.txt b/extension/assets/icons/LUCIDE-LICENSE.txt
similarity index 100%
rename from assets/icons/LUCIDE-LICENSE.txt
rename to extension/assets/icons/LUCIDE-LICENSE.txt
diff --git a/assets/icons/icon-128.png b/extension/assets/icons/icon-128.png
similarity index 100%
rename from assets/icons/icon-128.png
rename to extension/assets/icons/icon-128.png
diff --git a/assets/icons/icon-16.png b/extension/assets/icons/icon-16.png
similarity index 100%
rename from assets/icons/icon-16.png
rename to extension/assets/icons/icon-16.png
diff --git a/assets/icons/icon-32.png b/extension/assets/icons/icon-32.png
similarity index 100%
rename from assets/icons/icon-32.png
rename to extension/assets/icons/icon-32.png
diff --git a/assets/icons/icon-48.png b/extension/assets/icons/icon-48.png
similarity index 100%
rename from assets/icons/icon-48.png
rename to extension/assets/icons/icon-48.png
diff --git a/assets/icons/icon-source.svg b/extension/assets/icons/icon-source.svg
similarity index 100%
rename from assets/icons/icon-source.svg
rename to extension/assets/icons/icon-source.svg
diff --git a/assets/ui-icons.svg b/extension/assets/ui-icons.svg
similarity index 100%
rename from assets/ui-icons.svg
rename to extension/assets/ui-icons.svg
diff --git a/automatic-vision.js b/extension/automatic-vision.js
similarity index 100%
rename from automatic-vision.js
rename to extension/automatic-vision.js
diff --git a/background.js b/extension/background.js
similarity index 100%
rename from background.js
rename to extension/background.js
diff --git a/blob-digest.js b/extension/blob-digest.js
similarity index 100%
rename from blob-digest.js
rename to extension/blob-digest.js
diff --git a/bounded-media.js b/extension/bounded-media.js
similarity index 100%
rename from bounded-media.js
rename to extension/bounded-media.js
diff --git a/browser-video-media.js b/extension/browser-video-media.js
similarity index 100%
rename from browser-video-media.js
rename to extension/browser-video-media.js
diff --git a/capture-additions.js b/extension/capture-additions.js
similarity index 100%
rename from capture-additions.js
rename to extension/capture-additions.js
diff --git a/capture-draft.js b/extension/capture-draft.js
similarity index 100%
rename from capture-draft.js
rename to extension/capture-draft.js
diff --git a/capture-permissions.js b/extension/capture-permissions.js
similarity index 100%
rename from capture-permissions.js
rename to extension/capture-permissions.js
diff --git a/capture-region.css b/extension/capture-region.css
similarity index 100%
rename from capture-region.css
rename to extension/capture-region.css
diff --git a/capture-region.js b/extension/capture-region.js
similarity index 100%
rename from capture-region.js
rename to extension/capture-region.js
diff --git a/capture-text-candidate.js b/extension/capture-text-candidate.js
similarity index 100%
rename from capture-text-candidate.js
rename to extension/capture-text-candidate.js
diff --git a/capture-workspace.js b/extension/capture-workspace.js
similarity index 100%
rename from capture-workspace.js
rename to extension/capture-workspace.js
diff --git a/case-presentation.js b/extension/case-presentation.js
similarity index 100%
rename from case-presentation.js
rename to extension/case-presentation.js
diff --git a/classifier.js b/extension/classifier.js
similarity index 100%
rename from classifier.js
rename to extension/classifier.js
diff --git a/collector-page-capture-view.js b/extension/collector-page-capture-view.js
similarity index 100%
rename from collector-page-capture-view.js
rename to extension/collector-page-capture-view.js
diff --git a/collector-view.js b/extension/collector-view.js
similarity index 100%
rename from collector-view.js
rename to extension/collector-view.js
diff --git a/collector.css b/extension/collector.css
similarity index 100%
rename from collector.css
rename to extension/collector.css
diff --git a/collector.html b/extension/collector.html
similarity index 100%
rename from collector.html
rename to extension/collector.html
diff --git a/collector.js b/extension/collector.js
similarity index 100%
rename from collector.js
rename to extension/collector.js
diff --git a/compatible-provider-presets.js b/extension/compatible-provider-presets.js
similarity index 100%
rename from compatible-provider-presets.js
rename to extension/compatible-provider-presets.js
diff --git a/composer-active-turn.js b/extension/composer-active-turn.js
similarity index 100%
rename from composer-active-turn.js
rename to extension/composer-active-turn.js
diff --git a/composer-agent.js b/extension/composer-agent.js
similarity index 100%
rename from composer-agent.js
rename to extension/composer-agent.js
diff --git a/composer-analysis-task-bridge.js b/extension/composer-analysis-task-bridge.js
similarity index 100%
rename from composer-analysis-task-bridge.js
rename to extension/composer-analysis-task-bridge.js
diff --git a/composer-auto-response.js b/extension/composer-auto-response.js
similarity index 100%
rename from composer-auto-response.js
rename to extension/composer-auto-response.js
diff --git a/composer-diagnostics.js b/extension/composer-diagnostics.js
similarity index 100%
rename from composer-diagnostics.js
rename to extension/composer-diagnostics.js
diff --git a/composer-image-workspace.js b/extension/composer-image-workspace.js
similarity index 100%
rename from composer-image-workspace.js
rename to extension/composer-image-workspace.js
diff --git a/composer-page.css b/extension/composer-page.css
similarity index 100%
rename from composer-page.css
rename to extension/composer-page.css
diff --git a/composer-page.js b/extension/composer-page.js
similarity index 100%
rename from composer-page.js
rename to extension/composer-page.js
diff --git a/composer-retrieval.js b/extension/composer-retrieval.js
similarity index 100%
rename from composer-retrieval.js
rename to extension/composer-retrieval.js
diff --git a/composer-service.js b/extension/composer-service.js
similarity index 100%
rename from composer-service.js
rename to extension/composer-service.js
diff --git a/composer-turn-core.js b/extension/composer-turn-core.js
similarity index 100%
rename from composer-turn-core.js
rename to extension/composer-turn-core.js
diff --git a/composer-turn-policy.js b/extension/composer-turn-policy.js
similarity index 100%
rename from composer-turn-policy.js
rename to extension/composer-turn-policy.js
diff --git a/composer-video-references.js b/extension/composer-video-references.js
similarity index 100%
rename from composer-video-references.js
rename to extension/composer-video-references.js
diff --git a/composer.html b/extension/composer.html
similarity index 100%
rename from composer.html
rename to extension/composer.html
diff --git a/composer.js b/extension/composer.js
similarity index 100%
rename from composer.js
rename to extension/composer.js
diff --git a/compound-cases.js b/extension/compound-cases.js
similarity index 100%
rename from compound-cases.js
rename to extension/compound-cases.js
diff --git a/context-menus.js b/extension/context-menus.js
similarity index 100%
rename from context-menus.js
rename to extension/context-menus.js
diff --git a/creative-experiment-package.js b/extension/creative-experiment-package.js
similarity index 100%
rename from creative-experiment-package.js
rename to extension/creative-experiment-package.js
diff --git a/creative-job-runner.js b/extension/creative-job-runner.js
similarity index 100%
rename from creative-job-runner.js
rename to extension/creative-job-runner.js
diff --git a/creative-jobs.js b/extension/creative-jobs.js
similarity index 100%
rename from creative-jobs.js
rename to extension/creative-jobs.js
diff --git a/creative-runs.js b/extension/creative-runs.js
similarity index 100%
rename from creative-runs.js
rename to extension/creative-runs.js
diff --git a/creative-skill-package.js b/extension/creative-skill-package.js
similarity index 100%
rename from creative-skill-package.js
rename to extension/creative-skill-package.js
diff --git a/creative-skill-service.js b/extension/creative-skill-service.js
similarity index 100%
rename from creative-skill-service.js
rename to extension/creative-skill-service.js
diff --git a/creative-skills.js b/extension/creative-skills.js
similarity index 100%
rename from creative-skills.js
rename to extension/creative-skills.js
diff --git a/curated-catalog.js b/extension/curated-catalog.js
similarity index 100%
rename from curated-catalog.js
rename to extension/curated-catalog.js
diff --git a/curated-config.js b/extension/curated-config.js
similarity index 100%
rename from curated-config.js
rename to extension/curated-config.js
diff --git a/curated-download.js b/extension/curated-download.js
similarity index 100%
rename from curated-download.js
rename to extension/curated-download.js
diff --git a/curated-import.js b/extension/curated-import.js
similarity index 100%
rename from curated-import.js
rename to extension/curated-import.js
diff --git a/curated-page.js b/extension/curated-page.js
similarity index 100%
rename from curated-page.js
rename to extension/curated-page.js
diff --git a/curated-skill-catalog.js b/extension/curated-skill-catalog.js
similarity index 100%
rename from curated-skill-catalog.js
rename to extension/curated-skill-catalog.js
diff --git a/curated-skill-install.js b/extension/curated-skill-install.js
similarity index 100%
rename from curated-skill-install.js
rename to extension/curated-skill-install.js
diff --git a/curated-skill-package.js b/extension/curated-skill-package.js
similarity index 100%
rename from curated-skill-package.js
rename to extension/curated-skill-package.js
diff --git a/curated-skill-page.css b/extension/curated-skill-page.css
similarity index 100%
rename from curated-skill-page.css
rename to extension/curated-skill-page.css
diff --git a/curated-skill-page.js b/extension/curated-skill-page.js
similarity index 100%
rename from curated-skill-page.js
rename to extension/curated-skill-page.js
diff --git a/curated-skills.html b/extension/curated-skills.html
similarity index 100%
rename from curated-skills.html
rename to extension/curated-skills.html
diff --git a/curated-submission.js b/extension/curated-submission.js
similarity index 100%
rename from curated-submission.js
rename to extension/curated-submission.js
diff --git a/curated.css b/extension/curated.css
similarity index 100%
rename from curated.css
rename to extension/curated.css
diff --git a/curated.html b/extension/curated.html
similarity index 100%
rename from curated.html
rename to extension/curated.html
diff --git a/deepseek.js b/extension/deepseek.js
similarity index 100%
rename from deepseek.js
rename to extension/deepseek.js
diff --git a/detail-position.js b/extension/detail-position.js
similarity index 100%
rename from detail-position.js
rename to extension/detail-position.js
diff --git a/document-ingestion.js b/extension/document-ingestion.js
similarity index 100%
rename from document-ingestion.js
rename to extension/document-ingestion.js
diff --git a/document-viewer.js b/extension/document-viewer.js
similarity index 100%
rename from document-viewer.js
rename to extension/document-viewer.js
diff --git a/extension-update.js b/extension/extension-update.js
similarity index 100%
rename from extension-update.js
rename to extension/extension-update.js
diff --git a/facet-history.js b/extension/facet-history.js
similarity index 100%
rename from facet-history.js
rename to extension/facet-history.js
diff --git a/facets.js b/extension/facets.js
similarity index 100%
rename from facets.js
rename to extension/facets.js
diff --git a/hls-runtime.js b/extension/hls-runtime.js
similarity index 100%
rename from hls-runtime.js
rename to extension/hls-runtime.js
diff --git a/i18n.js b/extension/i18n.js
similarity index 100%
rename from i18n.js
rename to extension/i18n.js
diff --git a/image-metadata.js b/extension/image-metadata.js
similarity index 100%
rename from image-metadata.js
rename to extension/image-metadata.js
diff --git a/image-prompt.js b/extension/image-prompt.js
similarity index 100%
rename from image-prompt.js
rename to extension/image-prompt.js
diff --git a/image-store.js b/extension/image-store.js
similarity index 100%
rename from image-store.js
rename to extension/image-store.js
diff --git a/image-transaction.js b/extension/image-transaction.js
similarity index 100%
rename from image-transaction.js
rename to extension/image-transaction.js
diff --git a/import-jobs.js b/extension/import-jobs.js
similarity index 100%
rename from import-jobs.js
rename to extension/import-jobs.js
diff --git a/import-staging.js b/extension/import-staging.js
similarity index 100%
rename from import-staging.js
rename to extension/import-staging.js
diff --git a/lib.js b/extension/lib.js
similarity index 100%
rename from lib.js
rename to extension/lib.js
diff --git a/library-asset-inventory.js b/extension/library-asset-inventory.js
similarity index 100%
rename from library-asset-inventory.js
rename to extension/library-asset-inventory.js
diff --git a/library-asset-salvage.js b/extension/library-asset-salvage.js
similarity index 100%
rename from library-asset-salvage.js
rename to extension/library-asset-salvage.js
diff --git a/library-export-plan.js b/extension/library-export-plan.js
similarity index 100%
rename from library-export-plan.js
rename to extension/library-export-plan.js
diff --git a/library-export-zip.js b/extension/library-export-zip.js
similarity index 100%
rename from library-export-zip.js
rename to extension/library-export-zip.js
diff --git a/library-import-client.js b/extension/library-import-client.js
similarity index 100%
rename from library-import-client.js
rename to extension/library-import-client.js
diff --git a/library-import-dialog.js b/extension/library-import-dialog.js
similarity index 100%
rename from library-import-dialog.js
rename to extension/library-import-dialog.js
diff --git a/library-import-media.js b/extension/library-import-media.js
similarity index 100%
rename from library-import-media.js
rename to extension/library-import-media.js
diff --git a/library-import-transaction.js b/extension/library-import-transaction.js
similarity index 100%
rename from library-import-transaction.js
rename to extension/library-import-transaction.js
diff --git a/library-maintenance.js b/extension/library-maintenance.js
similarity index 100%
rename from library-maintenance.js
rename to extension/library-maintenance.js
diff --git a/library-model.js b/extension/library-model.js
similarity index 100%
rename from library-model.js
rename to extension/library-model.js
diff --git a/library-package-contract.js b/extension/library-package-contract.js
similarity index 100%
rename from library-package-contract.js
rename to extension/library-package-contract.js
diff --git a/library-package-format.js b/extension/library-package-format.js
similarity index 100%
rename from library-package-format.js
rename to extension/library-package-format.js
diff --git a/library-package-migrations.js b/extension/library-package-migrations.js
similarity index 100%
rename from library-package-migrations.js
rename to extension/library-package-migrations.js
diff --git a/library-package.js b/extension/library-package.js
similarity index 100%
rename from library-package.js
rename to extension/library-package.js
diff --git a/library-recovery-point.js b/extension/library-recovery-point.js
similarity index 100%
rename from library-recovery-point.js
rename to extension/library-recovery-point.js
diff --git a/library-selection.js b/extension/library-selection.js
similarity index 100%
rename from library-selection.js
rename to extension/library-selection.js
diff --git a/library-semantic-identity.js b/extension/library-semantic-identity.js
similarity index 100%
rename from library-semantic-identity.js
rename to extension/library-semantic-identity.js
diff --git a/library-transfer.js b/extension/library-transfer.js
similarity index 100%
rename from library-transfer.js
rename to extension/library-transfer.js
diff --git a/library-view.js b/extension/library-view.js
similarity index 100%
rename from library-view.js
rename to extension/library-view.js
diff --git a/library.css b/extension/library.css
similarity index 100%
rename from library.css
rename to extension/library.css
diff --git a/library.html b/extension/library.html
similarity index 100%
rename from library.html
rename to extension/library.html
diff --git a/library.js b/extension/library.js
similarity index 100%
rename from library.js
rename to extension/library.js
diff --git a/libtv-capture.js b/extension/libtv-capture.js
similarity index 100%
rename from libtv-capture.js
rename to extension/libtv-capture.js
diff --git a/local-asset-store.js b/extension/local-asset-store.js
similarity index 100%
rename from local-asset-store.js
rename to extension/local-asset-store.js
diff --git a/local-extension-upgrade-ui.js b/extension/local-extension-upgrade-ui.js
similarity index 100%
rename from local-extension-upgrade-ui.js
rename to extension/local-extension-upgrade-ui.js
diff --git a/local-extension-upgrade.js b/extension/local-extension-upgrade.js
similarity index 100%
rename from local-extension-upgrade.js
rename to extension/local-extension-upgrade.js
diff --git a/local-installation-directory.js b/extension/local-installation-directory.js
similarity index 100%
rename from local-installation-directory.js
rename to extension/local-installation-directory.js
diff --git a/local-media.js b/extension/local-media.js
similarity index 100%
rename from local-media.js
rename to extension/local-media.js
diff --git a/local-similarity.js b/extension/local-similarity.js
similarity index 100%
rename from local-similarity.js
rename to extension/local-similarity.js
diff --git a/manifest.json b/extension/manifest.json
similarity index 100%
rename from manifest.json
rename to extension/manifest.json
diff --git a/manual-sync.js b/extension/manual-sync.js
similarity index 100%
rename from manual-sync.js
rename to extension/manual-sync.js
diff --git a/markdown-renderer.js b/extension/markdown-renderer.js
similarity index 100%
rename from markdown-renderer.js
rename to extension/markdown-renderer.js
diff --git a/media-playback.js b/extension/media-playback.js
similarity index 100%
rename from media-playback.js
rename to extension/media-playback.js
diff --git a/media-reference-resolver.js b/extension/media-reference-resolver.js
similarity index 100%
rename from media-reference-resolver.js
rename to extension/media-reference-resolver.js
diff --git a/media-store.js b/extension/media-store.js
similarity index 100%
rename from media-store.js
rename to extension/media-store.js
diff --git a/media.js b/extension/media.js
similarity index 100%
rename from media.js
rename to extension/media.js
diff --git a/migration.js b/extension/migration.js
similarity index 100%
rename from migration.js
rename to extension/migration.js
diff --git a/navigation-state.js b/extension/navigation-state.js
similarity index 100%
rename from navigation-state.js
rename to extension/navigation-state.js
diff --git a/offscreen.html b/extension/offscreen.html
similarity index 100%
rename from offscreen.html
rename to extension/offscreen.html
diff --git a/offscreen.js b/extension/offscreen.js
similarity index 100%
rename from offscreen.js
rename to extension/offscreen.js
diff --git a/organizer.js b/extension/organizer.js
similarity index 100%
rename from organizer.js
rename to extension/organizer.js
diff --git a/page-capture-adapter-registry.js b/extension/page-capture-adapter-registry.js
similarity index 100%
rename from page-capture-adapter-registry.js
rename to extension/page-capture-adapter-registry.js
diff --git a/page-capture-downloads.js b/extension/page-capture-downloads.js
similarity index 100%
rename from page-capture-downloads.js
rename to extension/page-capture-downloads.js
diff --git a/page-capture-frames.js b/extension/page-capture-frames.js
similarity index 100%
rename from page-capture-frames.js
rename to extension/page-capture-frames.js
diff --git a/page-capture-highlight.js b/extension/page-capture-highlight.js
similarity index 100%
rename from page-capture-highlight.js
rename to extension/page-capture-highlight.js
diff --git a/page-capture-repair.js b/extension/page-capture-repair.js
similarity index 100%
rename from page-capture-repair.js
rename to extension/page-capture-repair.js
diff --git a/page-capture-site-adapters.js b/extension/page-capture-site-adapters.js
similarity index 100%
rename from page-capture-site-adapters.js
rename to extension/page-capture-site-adapters.js
diff --git a/page-capture-video.js b/extension/page-capture-video.js
similarity index 100%
rename from page-capture-video.js
rename to extension/page-capture-video.js
diff --git a/page-capture.js b/extension/page-capture.js
similarity index 100%
rename from page-capture.js
rename to extension/page-capture.js
diff --git a/page-session-media.js b/extension/page-session-media.js
similarity index 100%
rename from page-session-media.js
rename to extension/page-session-media.js
diff --git a/palette.js b/extension/palette.js
similarity index 100%
rename from palette.js
rename to extension/palette.js
diff --git a/preferences.js b/extension/preferences.js
similarity index 100%
rename from preferences.js
rename to extension/preferences.js
diff --git a/product-links.js b/extension/product-links.js
similarity index 100%
rename from product-links.js
rename to extension/product-links.js
diff --git a/project-combobox.js b/extension/project-combobox.js
similarity index 100%
rename from project-combobox.js
rename to extension/project-combobox.js
diff --git a/project-tree.js b/extension/project-tree.js
similarity index 100%
rename from project-tree.js
rename to extension/project-tree.js
diff --git a/prompt-panel.js b/extension/prompt-panel.js
similarity index 100%
rename from prompt-panel.js
rename to extension/prompt-panel.js
diff --git a/prompt-sources.js b/extension/prompt-sources.js
similarity index 100%
rename from prompt-sources.js
rename to extension/prompt-sources.js
diff --git a/reference-readiness.js b/extension/reference-readiness.js
similarity index 100%
rename from reference-readiness.js
rename to extension/reference-readiness.js
diff --git a/remote-video-player.js b/extension/remote-video-player.js
similarity index 100%
rename from remote-video-player.js
rename to extension/remote-video-player.js
diff --git a/resource-limits.js b/extension/resource-limits.js
similarity index 100%
rename from resource-limits.js
rename to extension/resource-limits.js
diff --git a/save-history.js b/extension/save-history.js
similarity index 100%
rename from save-history.js
rename to extension/save-history.js
diff --git a/search-index.js b/extension/search-index.js
similarity index 100%
rename from search-index.js
rename to extension/search-index.js
diff --git a/search-query.js b/extension/search-query.js
similarity index 100%
rename from search-query.js
rename to extension/search-query.js
diff --git a/share-preview.js b/extension/share-preview.js
similarity index 100%
rename from share-preview.js
rename to extension/share-preview.js
diff --git a/skill-contact-sheet.js b/extension/skill-contact-sheet.js
similarity index 100%
rename from skill-contact-sheet.js
rename to extension/skill-contact-sheet.js
diff --git a/skill-source-picker.js b/extension/skill-source-picker.js
similarity index 100%
rename from skill-source-picker.js
rename to extension/skill-source-picker.js
diff --git a/skills-page.css b/extension/skills-page.css
similarity index 100%
rename from skills-page.css
rename to extension/skills-page.css
diff --git a/skills-page.js b/extension/skills-page.js
similarity index 100%
rename from skills-page.js
rename to extension/skills-page.js
diff --git a/skills.html b/extension/skills.html
similarity index 100%
rename from skills.html
rename to extension/skills.html
diff --git a/smart-visual-selection.js b/extension/smart-visual-selection.js
similarity index 100%
rename from smart-visual-selection.js
rename to extension/smart-visual-selection.js
diff --git a/stable-masonry.js b/extension/stable-masonry.js
similarity index 100%
rename from stable-masonry.js
rename to extension/stable-masonry.js
diff --git a/structured-output.js b/extension/structured-output.js
similarity index 100%
rename from structured-output.js
rename to extension/structured-output.js
diff --git a/sync-crypto.js b/extension/sync-crypto.js
similarity index 100%
rename from sync-crypto.js
rename to extension/sync-crypto.js
diff --git a/sync-model.js b/extension/sync-model.js
similarity index 100%
rename from sync-model.js
rename to extension/sync-model.js
diff --git a/sync-store.js b/extension/sync-store.js
similarity index 100%
rename from sync-store.js
rename to extension/sync-store.js
diff --git a/sync-vault.js b/extension/sync-vault.js
similarity index 100%
rename from sync-vault.js
rename to extension/sync-vault.js
diff --git a/tag-editor.js b/extension/tag-editor.js
similarity index 100%
rename from tag-editor.js
rename to extension/tag-editor.js
diff --git a/tag-taxonomy.js b/extension/tag-taxonomy.js
similarity index 100%
rename from tag-taxonomy.js
rename to extension/tag-taxonomy.js
diff --git a/taxonomy.js b/extension/taxonomy.js
similarity index 100%
rename from taxonomy.js
rename to extension/taxonomy.js
diff --git a/temp-references.js b/extension/temp-references.js
similarity index 100%
rename from temp-references.js
rename to extension/temp-references.js
diff --git a/theme-bootstrap.js b/extension/theme-bootstrap.js
similarity index 100%
rename from theme-bootstrap.js
rename to extension/theme-bootstrap.js
diff --git a/transient-menu.js b/extension/transient-menu.js
similarity index 100%
rename from transient-menu.js
rename to extension/transient-menu.js
diff --git a/trash.js b/extension/trash.js
similarity index 100%
rename from trash.js
rename to extension/trash.js
diff --git a/ui-dialogs.js b/extension/ui-dialogs.js
similarity index 100%
rename from ui-dialogs.js
rename to extension/ui-dialogs.js
diff --git a/ui-foundation.css b/extension/ui-foundation.css
similarity index 100%
rename from ui-foundation.css
rename to extension/ui-foundation.css
diff --git a/ui-icons.js b/extension/ui-icons.js
similarity index 100%
rename from ui-icons.js
rename to extension/ui-icons.js
diff --git a/vendor/document-ingestion/Readability.js b/extension/vendor/document-ingestion/Readability.js
similarity index 100%
rename from vendor/document-ingestion/Readability.js
rename to extension/vendor/document-ingestion/Readability.js
diff --git a/vendor/document-ingestion/readability-LICENSE b/extension/vendor/document-ingestion/readability-LICENSE
similarity index 100%
rename from vendor/document-ingestion/readability-LICENSE
rename to extension/vendor/document-ingestion/readability-LICENSE
diff --git a/vendor/document-ingestion/rtf-toolkit-LICENSE b/extension/vendor/document-ingestion/rtf-toolkit-LICENSE
similarity index 100%
rename from vendor/document-ingestion/rtf-toolkit-LICENSE
rename to extension/vendor/document-ingestion/rtf-toolkit-LICENSE
diff --git a/vendor/document-ingestion/rtf-toolkit/parser/parser.js b/extension/vendor/document-ingestion/rtf-toolkit/parser/parser.js
similarity index 100%
rename from vendor/document-ingestion/rtf-toolkit/parser/parser.js
rename to extension/vendor/document-ingestion/rtf-toolkit/parser/parser.js
diff --git a/vendor/document-ingestion/rtf-toolkit/parser/tokenizer.js b/extension/vendor/document-ingestion/rtf-toolkit/parser/tokenizer.js
similarity index 100%
rename from vendor/document-ingestion/rtf-toolkit/parser/tokenizer.js
rename to extension/vendor/document-ingestion/rtf-toolkit/parser/tokenizer.js
diff --git a/vendor/document-ingestion/rtf-toolkit/renderers/html.js b/extension/vendor/document-ingestion/rtf-toolkit/renderers/html.js
similarity index 100%
rename from vendor/document-ingestion/rtf-toolkit/renderers/html.js
rename to extension/vendor/document-ingestion/rtf-toolkit/renderers/html.js
diff --git a/vendor/document-ingestion/turndown-LICENSE b/extension/vendor/document-ingestion/turndown-LICENSE
similarity index 100%
rename from vendor/document-ingestion/turndown-LICENSE
rename to extension/vendor/document-ingestion/turndown-LICENSE
diff --git a/vendor/document-ingestion/turndown.browser.es.js b/extension/vendor/document-ingestion/turndown.browser.es.js
similarity index 100%
rename from vendor/document-ingestion/turndown.browser.es.js
rename to extension/vendor/document-ingestion/turndown.browser.es.js
diff --git a/vendor/noble-hashes/LICENSE b/extension/vendor/noble-hashes/LICENSE
similarity index 100%
rename from vendor/noble-hashes/LICENSE
rename to extension/vendor/noble-hashes/LICENSE
diff --git a/vendor/noble-hashes/_md.js b/extension/vendor/noble-hashes/_md.js
similarity index 100%
rename from vendor/noble-hashes/_md.js
rename to extension/vendor/noble-hashes/_md.js
diff --git a/vendor/noble-hashes/_u64.js b/extension/vendor/noble-hashes/_u64.js
similarity index 100%
rename from vendor/noble-hashes/_u64.js
rename to extension/vendor/noble-hashes/_u64.js
diff --git a/vendor/noble-hashes/sha2.js b/extension/vendor/noble-hashes/sha2.js
similarity index 100%
rename from vendor/noble-hashes/sha2.js
rename to extension/vendor/noble-hashes/sha2.js
diff --git a/vendor/noble-hashes/utils.js b/extension/vendor/noble-hashes/utils.js
similarity index 100%
rename from vendor/noble-hashes/utils.js
rename to extension/vendor/noble-hashes/utils.js
diff --git a/vendor/pdfjs/LICENSE b/extension/vendor/pdfjs/LICENSE
similarity index 100%
rename from vendor/pdfjs/LICENSE
rename to extension/vendor/pdfjs/LICENSE
diff --git a/vendor/pdfjs/cmaps/78-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/78-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/78-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/78-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/78-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/78-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/78-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/78-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/78-H.bcmap b/extension/vendor/pdfjs/cmaps/78-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/78-H.bcmap
rename to extension/vendor/pdfjs/cmaps/78-H.bcmap
diff --git a/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/78-RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap b/extension/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/78-RKSJ-V.bcmap
rename to extension/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap
diff --git a/vendor/pdfjs/cmaps/78-V.bcmap b/extension/vendor/pdfjs/cmaps/78-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/78-V.bcmap
rename to extension/vendor/pdfjs/cmaps/78-V.bcmap
diff --git a/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap b/extension/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap
rename to extension/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap
diff --git a/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap b/extension/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap
rename to extension/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap
diff --git a/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap b/extension/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap
rename to extension/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap
diff --git a/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap b/extension/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap
rename to extension/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap
diff --git a/vendor/pdfjs/cmaps/Add-H.bcmap b/extension/vendor/pdfjs/cmaps/Add-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Add-H.bcmap
rename to extension/vendor/pdfjs/cmaps/Add-H.bcmap
diff --git a/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap b/extension/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap
rename to extension/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap
diff --git a/vendor/pdfjs/cmaps/Add-V.bcmap b/extension/vendor/pdfjs/cmaps/Add-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Add-V.bcmap
rename to extension/vendor/pdfjs/cmaps/Add-V.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap
diff --git a/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap b/extension/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap
rename to extension/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap
diff --git a/vendor/pdfjs/cmaps/B5-H.bcmap b/extension/vendor/pdfjs/cmaps/B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/B5-V.bcmap b/extension/vendor/pdfjs/cmaps/B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/B5pc-H.bcmap b/extension/vendor/pdfjs/cmaps/B5pc-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/B5pc-H.bcmap
rename to extension/vendor/pdfjs/cmaps/B5pc-H.bcmap
diff --git a/vendor/pdfjs/cmaps/B5pc-V.bcmap b/extension/vendor/pdfjs/cmaps/B5pc-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/B5pc-V.bcmap
rename to extension/vendor/pdfjs/cmaps/B5pc-V.bcmap
diff --git a/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/CNS-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/CNS-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/CNS1-H.bcmap b/extension/vendor/pdfjs/cmaps/CNS1-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/CNS1-H.bcmap
rename to extension/vendor/pdfjs/cmaps/CNS1-H.bcmap
diff --git a/vendor/pdfjs/cmaps/CNS1-V.bcmap b/extension/vendor/pdfjs/cmaps/CNS1-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/CNS1-V.bcmap
rename to extension/vendor/pdfjs/cmaps/CNS1-V.bcmap
diff --git a/vendor/pdfjs/cmaps/CNS2-H.bcmap b/extension/vendor/pdfjs/cmaps/CNS2-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/CNS2-H.bcmap
rename to extension/vendor/pdfjs/cmaps/CNS2-H.bcmap
diff --git a/vendor/pdfjs/cmaps/CNS2-V.bcmap b/extension/vendor/pdfjs/cmaps/CNS2-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/CNS2-V.bcmap
rename to extension/vendor/pdfjs/cmaps/CNS2-V.bcmap
diff --git a/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/ETHK-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/ETHK-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/ETen-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/ETen-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/ETen-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/ETen-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/ETen-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/ETen-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/ETen-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/ETen-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/ETenms-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/ETenms-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/Ext-H.bcmap b/extension/vendor/pdfjs/cmaps/Ext-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Ext-H.bcmap
rename to extension/vendor/pdfjs/cmaps/Ext-H.bcmap
diff --git a/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap b/extension/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap
rename to extension/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap
diff --git a/vendor/pdfjs/cmaps/Ext-V.bcmap b/extension/vendor/pdfjs/cmaps/Ext-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Ext-V.bcmap
rename to extension/vendor/pdfjs/cmaps/Ext-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GB-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/GB-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GB-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GB-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GB-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/GB-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GB-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GB-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GB-H.bcmap b/extension/vendor/pdfjs/cmaps/GB-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GB-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GB-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GB-V.bcmap b/extension/vendor/pdfjs/cmaps/GB-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GB-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GB-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBK-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBK-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GBK2K-H.bcmap b/extension/vendor/pdfjs/cmaps/GBK2K-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBK2K-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GBK2K-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GBK2K-V.bcmap b/extension/vendor/pdfjs/cmaps/GBK2K-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBK2K-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GBK2K-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBT-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBT-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GBT-H.bcmap b/extension/vendor/pdfjs/cmaps/GBT-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBT-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GBT-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GBT-V.bcmap b/extension/vendor/pdfjs/cmaps/GBT-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBT-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GBT-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/H.bcmap b/extension/vendor/pdfjs/cmaps/H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/H.bcmap
rename to extension/vendor/pdfjs/cmaps/H.bcmap
diff --git a/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKdla-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKdla-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKm314-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKm314-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKm471-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKm471-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap b/extension/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKscs-B5-H.bcmap
rename to extension/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap
diff --git a/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap b/extension/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/HKscs-B5-V.bcmap
rename to extension/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap
diff --git a/vendor/pdfjs/cmaps/Hankaku.bcmap b/extension/vendor/pdfjs/cmaps/Hankaku.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Hankaku.bcmap
rename to extension/vendor/pdfjs/cmaps/Hankaku.bcmap
diff --git a/vendor/pdfjs/cmaps/Hiragana.bcmap b/extension/vendor/pdfjs/cmaps/Hiragana.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Hiragana.bcmap
rename to extension/vendor/pdfjs/cmaps/Hiragana.bcmap
diff --git a/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSC-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSC-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/KSC-H.bcmap b/extension/vendor/pdfjs/cmaps/KSC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/KSC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap b/extension/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSC-Johab-H.bcmap
rename to extension/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap
diff --git a/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap b/extension/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSC-Johab-V.bcmap
rename to extension/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap
diff --git a/vendor/pdfjs/cmaps/KSC-V.bcmap b/extension/vendor/pdfjs/cmaps/KSC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/KSC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap b/extension/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap b/extension/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap
rename to extension/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap
diff --git a/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap b/extension/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap
rename to extension/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap
diff --git a/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap b/extension/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap b/extension/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap
rename to extension/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap
diff --git a/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap b/extension/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap
rename to extension/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap
diff --git a/vendor/pdfjs/cmaps/Katakana.bcmap b/extension/vendor/pdfjs/cmaps/Katakana.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Katakana.bcmap
rename to extension/vendor/pdfjs/cmaps/Katakana.bcmap
diff --git a/vendor/pdfjs/cmaps/LICENSE b/extension/vendor/pdfjs/cmaps/LICENSE
similarity index 100%
rename from vendor/pdfjs/cmaps/LICENSE
rename to extension/vendor/pdfjs/cmaps/LICENSE
diff --git a/vendor/pdfjs/cmaps/NWP-H.bcmap b/extension/vendor/pdfjs/cmaps/NWP-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/NWP-H.bcmap
rename to extension/vendor/pdfjs/cmaps/NWP-H.bcmap
diff --git a/vendor/pdfjs/cmaps/NWP-V.bcmap b/extension/vendor/pdfjs/cmaps/NWP-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/NWP-V.bcmap
rename to extension/vendor/pdfjs/cmaps/NWP-V.bcmap
diff --git a/vendor/pdfjs/cmaps/RKSJ-H.bcmap b/extension/vendor/pdfjs/cmaps/RKSJ-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/RKSJ-H.bcmap
rename to extension/vendor/pdfjs/cmaps/RKSJ-H.bcmap
diff --git a/vendor/pdfjs/cmaps/RKSJ-V.bcmap b/extension/vendor/pdfjs/cmaps/RKSJ-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/RKSJ-V.bcmap
rename to extension/vendor/pdfjs/cmaps/RKSJ-V.bcmap
diff --git a/vendor/pdfjs/cmaps/Roman.bcmap b/extension/vendor/pdfjs/cmaps/Roman.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/Roman.bcmap
rename to extension/vendor/pdfjs/cmaps/Roman.bcmap
diff --git a/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap b/extension/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap b/extension/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap b/extension/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap b/extension/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap b/extension/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap b/extension/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap b/extension/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap b/extension/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap b/extension/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap b/extension/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap b/extension/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap b/extension/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap b/extension/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap b/extension/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap b/extension/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap b/extension/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap b/extension/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap b/extension/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap b/extension/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap b/extension/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap b/extension/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap b/extension/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap b/extension/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap b/extension/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap
diff --git a/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap b/extension/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap
rename to extension/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap
diff --git a/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap b/extension/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap
rename to extension/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap
diff --git a/vendor/pdfjs/cmaps/V.bcmap b/extension/vendor/pdfjs/cmaps/V.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/V.bcmap
rename to extension/vendor/pdfjs/cmaps/V.bcmap
diff --git a/vendor/pdfjs/cmaps/WP-Symbol.bcmap b/extension/vendor/pdfjs/cmaps/WP-Symbol.bcmap
similarity index 100%
rename from vendor/pdfjs/cmaps/WP-Symbol.bcmap
rename to extension/vendor/pdfjs/cmaps/WP-Symbol.bcmap
diff --git a/vendor/pdfjs/pdf.mjs b/extension/vendor/pdfjs/pdf.mjs
similarity index 100%
rename from vendor/pdfjs/pdf.mjs
rename to extension/vendor/pdfjs/pdf.mjs
diff --git a/vendor/pdfjs/pdf.worker.mjs b/extension/vendor/pdfjs/pdf.worker.mjs
similarity index 100%
rename from vendor/pdfjs/pdf.worker.mjs
rename to extension/vendor/pdfjs/pdf.worker.mjs
diff --git a/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitDingbats.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitFixed.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitFixed.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitFixed.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitFixed.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitSerif.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitSerif.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitSerif.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitSerif.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb
diff --git a/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb b/extension/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb
similarity index 100%
rename from vendor/pdfjs/standard_fonts/FoxitSymbol.pfb
rename to extension/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb
diff --git a/vendor/pdfjs/standard_fonts/LICENSE_FOXIT b/extension/vendor/pdfjs/standard_fonts/LICENSE_FOXIT
similarity index 100%
rename from vendor/pdfjs/standard_fonts/LICENSE_FOXIT
rename to extension/vendor/pdfjs/standard_fonts/LICENSE_FOXIT
diff --git a/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION b/extension/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION
similarity index 100%
rename from vendor/pdfjs/standard_fonts/LICENSE_LIBERATION
rename to extension/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION
diff --git a/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf b/extension/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf
similarity index 100%
rename from vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf
rename to extension/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf
diff --git a/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf b/extension/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf
similarity index 100%
rename from vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf
rename to extension/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf
diff --git a/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf b/extension/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf
similarity index 100%
rename from vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf
rename to extension/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf
diff --git a/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf b/extension/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf
similarity index 100%
rename from vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf
rename to extension/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf
diff --git a/vendor/pdfjs/wasm/LICENSE_JBIG2 b/extension/vendor/pdfjs/wasm/LICENSE_JBIG2
similarity index 100%
rename from vendor/pdfjs/wasm/LICENSE_JBIG2
rename to extension/vendor/pdfjs/wasm/LICENSE_JBIG2
diff --git a/vendor/pdfjs/wasm/LICENSE_OPENJPEG b/extension/vendor/pdfjs/wasm/LICENSE_OPENJPEG
similarity index 100%
rename from vendor/pdfjs/wasm/LICENSE_OPENJPEG
rename to extension/vendor/pdfjs/wasm/LICENSE_OPENJPEG
diff --git a/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2 b/extension/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2
similarity index 100%
rename from vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2
rename to extension/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2
diff --git a/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG b/extension/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG
similarity index 100%
rename from vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG
rename to extension/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG
diff --git a/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS b/extension/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS
similarity index 100%
rename from vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS
rename to extension/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS
diff --git a/vendor/pdfjs/wasm/LICENSE_QCMS b/extension/vendor/pdfjs/wasm/LICENSE_QCMS
similarity index 100%
rename from vendor/pdfjs/wasm/LICENSE_QCMS
rename to extension/vendor/pdfjs/wasm/LICENSE_QCMS
diff --git a/vendor/pdfjs/wasm/jbig2.wasm b/extension/vendor/pdfjs/wasm/jbig2.wasm
similarity index 100%
rename from vendor/pdfjs/wasm/jbig2.wasm
rename to extension/vendor/pdfjs/wasm/jbig2.wasm
diff --git a/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js b/extension/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js
similarity index 100%
rename from vendor/pdfjs/wasm/jbig2_nowasm_fallback.js
rename to extension/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js
diff --git a/vendor/pdfjs/wasm/openjpeg.wasm b/extension/vendor/pdfjs/wasm/openjpeg.wasm
similarity index 100%
rename from vendor/pdfjs/wasm/openjpeg.wasm
rename to extension/vendor/pdfjs/wasm/openjpeg.wasm
diff --git a/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js b/extension/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js
similarity index 100%
rename from vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js
rename to extension/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js
diff --git a/vendor/pdfjs/wasm/qcms_bg.wasm b/extension/vendor/pdfjs/wasm/qcms_bg.wasm
similarity index 100%
rename from vendor/pdfjs/wasm/qcms_bg.wasm
rename to extension/vendor/pdfjs/wasm/qcms_bg.wasm
diff --git a/vendor/pdfjs/wasm/quickjs-eval.js b/extension/vendor/pdfjs/wasm/quickjs-eval.js
similarity index 100%
rename from vendor/pdfjs/wasm/quickjs-eval.js
rename to extension/vendor/pdfjs/wasm/quickjs-eval.js
diff --git a/vendor/pdfjs/wasm/quickjs-eval.wasm b/extension/vendor/pdfjs/wasm/quickjs-eval.wasm
similarity index 100%
rename from vendor/pdfjs/wasm/quickjs-eval.wasm
rename to extension/vendor/pdfjs/wasm/quickjs-eval.wasm
diff --git a/video-analysis-runner.js b/extension/video-analysis-runner.js
similarity index 100%
rename from video-analysis-runner.js
rename to extension/video-analysis-runner.js
diff --git a/video-analysis.js b/extension/video-analysis.js
similarity index 100%
rename from video-analysis.js
rename to extension/video-analysis.js
diff --git a/video-hover-preview.js b/extension/video-hover-preview.js
similarity index 100%
rename from video-hover-preview.js
rename to extension/video-hover-preview.js
diff --git a/vision-analysis-cache.js b/extension/vision-analysis-cache.js
similarity index 100%
rename from vision-analysis-cache.js
rename to extension/vision-analysis-cache.js
diff --git a/vision.js b/extension/vision.js
similarity index 100%
rename from vision.js
rename to extension/vision.js
diff --git a/visual-analysis.js b/extension/visual-analysis.js
similarity index 100%
rename from visual-analysis.js
rename to extension/visual-analysis.js
diff --git a/visuals.js b/extension/visuals.js
similarity index 100%
rename from visuals.js
rename to extension/visuals.js
diff --git a/x-video-capture.js b/extension/x-video-capture.js
similarity index 100%
rename from x-video-capture.js
rename to extension/x-video-capture.js
diff --git a/x-video-observer.js b/extension/x-video-observer.js
similarity index 100%
rename from x-video-observer.js
rename to extension/x-video-observer.js
diff --git a/zip-reader-worker.js b/extension/zip-reader-worker.js
similarity index 100%
rename from zip-reader-worker.js
rename to extension/zip-reader-worker.js
diff --git a/zip-reader.js b/extension/zip-reader.js
similarity index 100%
rename from zip-reader.js
rename to extension/zip-reader.js
diff --git a/zip.js b/extension/zip.js
similarity index 100%
rename from zip.js
rename to extension/zip.js
diff --git a/zip64.js b/extension/zip64.js
similarity index 100%
rename from zip64.js
rename to extension/zip64.js
diff --git a/test/ai-background-v4.test.js b/test/ai-background-v4.test.js
index a33c557..660b284 100644
--- a/test/ai-background-v4.test.js
+++ b/test/ai-background-v4.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
test("background accepts only the Registry v4 AI configuration message", () => {
assert.match(source, /case "UPDATE_AI_PROVIDER_CONFIGURATION"/);
diff --git a/test/ai-provider-module.test.js b/test/ai-provider-module.test.js
index 3394e0e..cdf456e 100644
--- a/test/ai-provider-module.test.js
+++ b/test/ai-provider-module.test.js
@@ -1,9 +1,9 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { AI_MODEL_CAPABILITIES, getAiModelCapability } from "../ai-model-capabilities.js";
-import { createAiProviderModule } from "../ai-provider-module.js";
-import { PORTABLE_LIBRARY_LIMITS } from "../resource-limits.js";
+import { AI_MODEL_CAPABILITIES, getAiModelCapability } from "../extension/ai-model-capabilities.js";
+import { createAiProviderModule } from "../extension/ai-provider-module.js";
+import { PORTABLE_LIBRARY_LIMITS } from "../extension/resource-limits.js";
const MP4 = Uint8Array.from([0, 0, 0, 24, 102, 116, 121, 112, 105, 115, 111, 109]);
diff --git a/test/ai-provider-registry.test.js b/test/ai-provider-registry.test.js
index 1933070..9c919f3 100644
--- a/test/ai-provider-registry.test.js
+++ b/test/ai-provider-registry.test.js
@@ -14,9 +14,9 @@ import {
normalizeAiTaskAssignments,
publicAiProviderRegistry,
resolveAiProviderAssignment
-} from "../ai-provider-registry.js";
-import { AI_PROVIDER_PRESETS, getAiProviderPreset } from "../ai-provider-presets.js";
-import { getAiModelCapability } from "../ai-model-capabilities.js";
+} from "../extension/ai-provider-registry.js";
+import { AI_PROVIDER_PRESETS, getAiProviderPreset } from "../extension/ai-provider-presets.js";
+import { getAiModelCapability } from "../extension/ai-model-capabilities.js";
function configuredRegistry() {
return normalizeAiProviderRegistry({ providers: {
diff --git a/test/ai-runtime.test.js b/test/ai-runtime.test.js
index cc9a44d..9b0a1b4 100644
--- a/test/ai-runtime.test.js
+++ b/test/ai-runtime.test.js
@@ -12,7 +12,7 @@ import {
resolveVisionTaskSettings,
videoAnalysisRouteMatches,
videoAnalysisRouteSnapshot
-} from "../ai-runtime.js";
+} from "../extension/ai-runtime.js";
test("video reconstruction instructions migrate into the single AI preference record", () => {
const migrated = normalizeAiPreferences({
diff --git a/test/ai-service-profiles.test.js b/test/ai-service-profiles.test.js
index e560e7c..421142a 100644
--- a/test/ai-service-profiles.test.js
+++ b/test/ai-service-profiles.test.js
@@ -3,7 +3,7 @@ import assert from "node:assert/strict";
import {
normalizeAiServiceProfiles,
publicAiServiceProfiles
-} from "../ai-service-profiles.js";
+} from "../extension/ai-service-profiles.js";
test("runtime service profiles are normalized without inventing defaults", () => {
assert.deepEqual(normalizeAiServiceProfiles(), {
diff --git a/test/analysis-batch.test.js b/test/analysis-batch.test.js
index 09d7e39..f791ab9 100644
--- a/test/analysis-batch.test.js
+++ b/test/analysis-batch.test.js
@@ -29,11 +29,11 @@ import {
normalizeAnalysisBatchJob,
reconcileVisionBatchResults,
recoverInterruptedAnalysisBatch
-} from "../analysis-batch.js";
-import { ANALYSIS_PROMPT_VERSION } from "../deepseek.js";
-import { createFixedFacetCatalog } from "../tag-taxonomy.js";
+} from "../extension/analysis-batch.js";
+import { ANALYSIS_PROMPT_VERSION } from "../extension/deepseek.js";
+import { createFixedFacetCatalog } from "../extension/tag-taxonomy.js";
-const backgroundSource = await readFile(new URL("../background.js", import.meta.url), "utf8");
+const backgroundSource = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
test("analysis-file import wires the legacy baseline helper into the background runtime", () => {
const importEnd = backgroundSource.indexOf('} from "./analysis-batch.js";');
diff --git a/test/analysis-candidates.test.js b/test/analysis-candidates.test.js
index 8743a40..ef9e19a 100644
--- a/test/analysis-candidates.test.js
+++ b/test/analysis-candidates.test.js
@@ -14,8 +14,8 @@ import {
rejectAnalysisCandidate,
restoreVisionAfterScreenshot,
undoVisionAnalysis
-} from "../analysis-candidates.js";
-import { createDefaultFacetCatalog } from "../facets.js";
+} from "../extension/analysis-candidates.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
import {
DeepSeekApiError,
analyzeTextDetailedWithDeepSeek,
@@ -24,9 +24,9 @@ import {
mergeAiSettings,
normalizeAiSettings,
planComposerTurn
-} from "../deepseek.js";
-import { createComposerSession, normalizeComposerSettings } from "../composer.js";
-import { applyFixedAnalysisTags } from "../tag-taxonomy.js";
+} from "../extension/deepseek.js";
+import { createComposerSession, normalizeComposerSettings } from "../extension/composer.js";
+import { applyFixedAnalysisTags } from "../extension/tag-taxonomy.js";
test("structured fields become editable evidence-backed candidates without fixed dimensions", () => {
const candidates = extractStructureCandidates({ text: '{"lighting":"large softbox","camera":{"lens":"35mm"}}\nCUSTOM LOOK: faded print\nPrice: $20' });
diff --git a/test/analysis-input.test.js b/test/analysis-input.test.js
index e851464..087a8c5 100644
--- a/test/analysis-input.test.js
+++ b/test/analysis-input.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { canonicalTextAnalysisInput, hasCommittedTextAnalysisTags } from "../analysis-input.js";
+import { canonicalTextAnalysisInput, hasCommittedTextAnalysisTags } from "../extension/analysis-input.js";
test("canonical text analysis input prefers the primary image prompt over shared text", () => {
const entry = {
diff --git a/test/analysis-model-output-budget.test.js b/test/analysis-model-output-budget.test.js
index 69cfaa9..4673baa 100644
--- a/test/analysis-model-output-budget.test.js
+++ b/test/analysis-model-output-budget.test.js
@@ -1,10 +1,10 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { aiConfigurationFromStorage, resolveTextTaskSettings, resolveVisionTaskSettings, resolveVideoAnalysisTask } from "../ai-runtime.js";
-import { analyzeTextDetailedWithDeepSeek } from "../deepseek.js";
-import { analyzeImageWithVision } from "../vision.js";
-import { analyzeVideoWithChatCompletions } from "../video-analysis.js";
-import { createDefaultFacetCatalog } from "../facets.js";
+import { aiConfigurationFromStorage, resolveTextTaskSettings, resolveVisionTaskSettings, resolveVideoAnalysisTask } from "../extension/ai-runtime.js";
+import { analyzeTextDetailedWithDeepSeek } from "../extension/deepseek.js";
+import { analyzeImageWithVision } from "../extension/vision.js";
+import { analyzeVideoWithChatCompletions } from "../extension/video-analysis.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
const model = "glm-5.3-flash";
const tasks = ["textTags", "imageAnalysis", "videoAnalysis"];
diff --git a/test/analysis-response-regression.test.js b/test/analysis-response-regression.test.js
index 0f5c815..bb423ef 100644
--- a/test/analysis-response-regression.test.js
+++ b/test/analysis-response-regression.test.js
@@ -1,12 +1,12 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { analyzeTextDetailedWithDeepSeek } from "../deepseek.js";
-import { analyzeImageWithVision } from "../vision.js";
-import { analyzeVideoWithChatCompletions } from "../video-analysis.js";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { runScheduledAnalysisWithRetries } from "../analysis-scheduler.js";
-import { inspectAnalysisResponse, fetchAnalysisJson } from "../analysis-response.js";
-import { normalizeEntryMedia } from "../media.js";
+import { analyzeTextDetailedWithDeepSeek } from "../extension/deepseek.js";
+import { analyzeImageWithVision } from "../extension/vision.js";
+import { analyzeVideoWithChatCompletions } from "../extension/video-analysis.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { runScheduledAnalysisWithRetries } from "../extension/analysis-scheduler.js";
+import { inspectAnalysisResponse, fetchAnalysisJson } from "../extension/analysis-response.js";
+import { normalizeEntryMedia } from "../extension/media.js";
const catalog = createDefaultFacetCatalog();
test("unknown video cost remains unknown through save and normalization", () => {
diff --git a/test/analysis-revision.test.js b/test/analysis-revision.test.js
index aab7723..cb4f20c 100644
--- a/test/analysis-revision.test.js
+++ b/test/analysis-revision.test.js
@@ -7,7 +7,7 @@ import {
markEntryTextChanged,
updateEntryText,
textAnalysisReason
-} from "../analysis-revision.js";
+} from "../extension/analysis-revision.js";
test("legacy completed analysis is treated as unchanged without hashing the whole library", () => {
const entries = Array.from({ length: 6500 }, (_, index) => ({
diff --git a/test/analysis-rules-navigation.test.js b/test/analysis-rules-navigation.test.js
index d2d86bc..f9256b4 100644
--- a/test/analysis-rules-navigation.test.js
+++ b/test/analysis-rules-navigation.test.js
@@ -4,7 +4,7 @@ import { readFileSync } from "node:fs";
import { load } from "cheerio";
test("analysis methods are a first-level settings destination, not nested in connection settings", () => {
- const $ = load(readFileSync(new URL("../library.html", import.meta.url), "utf8"));
+ const $ = load(readFileSync(new URL("../extension/library.html", import.meta.url), "utf8"));
assert.equal($("[data-settings-tab=rules]").length, 1);
for (const kind of ["text", "vision", "video", "composer"]) {
assert.equal($(`[data-settings-panel=rules] [data-analysis-kind-panel=${kind}]`).length, 1);
diff --git a/test/analysis-scheduler.test.js b/test/analysis-scheduler.test.js
index 607cd95..8e1441b 100644
--- a/test/analysis-scheduler.test.js
+++ b/test/analysis-scheduler.test.js
@@ -6,7 +6,7 @@ import {
createAnalysisScheduler,
runScheduledAnalysisWithRetries,
scheduleAnalysis
-} from "../analysis-scheduler.js";
+} from "../extension/analysis-scheduler.js";
const delay = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
diff --git a/test/analysis-task-background.test.js b/test/analysis-task-background.test.js
index 01c33d2..651d1a0 100644
--- a/test/analysis-task-background.test.js
+++ b/test/analysis-task-background.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
+const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
test("background exposes the persisted Composer analysis task protocol and retires the direct paid entry point", () => {
for (const type of [
diff --git a/test/analysis-task-registry.test.js b/test/analysis-task-registry.test.js
index 5e7671e..85dcfdb 100644
--- a/test/analysis-task-registry.test.js
+++ b/test/analysis-task-registry.test.js
@@ -7,12 +7,12 @@ import {
normalizeAnalysisTaskRegistry,
recoverInterruptedAnalysisTasks,
replaceAnalysisTask
-} from "../analysis-task-registry.js";
+} from "../extension/analysis-task-registry.js";
import {
createAnalysisTask,
startAnalysisAttempt,
updateAnalysisTaskProgress
-} from "../analysis-tasks.js";
+} from "../extension/analysis-tasks.js";
test("video task progress records the paid request boundary and survives normalization", () => {
const task = createAnalysisTask({ id: "task:video", now: "2026-09-03T10:00:00.000Z" });
diff --git a/test/analysis-task.test.js b/test/analysis-task.test.js
index b42fd53..064a84a 100644
--- a/test/analysis-task.test.js
+++ b/test/analysis-task.test.js
@@ -13,7 +13,7 @@ import {
stopAnalysisTask,
startAnalysisAttempt,
updateAnalysisTaskProgress
-} from "../analysis-tasks.js";
+} from "../extension/analysis-tasks.js";
test("a restored failed attempt retains protocol facts and request counts without raw payload or secrets", () => {
let task = startAnalysisAttempt(createAnalysisTask({ id: "task:receipt" }), { attemptId: "attempt:receipt" });
diff --git a/test/analysis_diagnostics_e2e.py b/test/analysis_diagnostics_e2e.py
index f7005db..e4fddd9 100644
--- a/test/analysis_diagnostics_e2e.py
+++ b/test/analysis_diagnostics_e2e.py
@@ -9,7 +9,7 @@ from e2e_support import base_entry, extension_session
def main() -> None:
- extension_version = json.loads((Path(__file__).resolve().parents[1] / "manifest.json").read_text())["version"]
+ extension_version = json.loads((Path(__file__).resolve().parents[1] / "extension" / "manifest.json").read_text())["version"]
entry = base_entry(
"diagnostic-analysis",
"诊断分析",
diff --git a/test/article-document.test.js b/test/article-document.test.js
index e2da1dc..70625ac 100644
--- a/test/article-document.test.js
+++ b/test/article-document.test.js
@@ -7,7 +7,7 @@ import {
normalizeArticleDocument,
removeArticleDocumentAsset,
remapArticleDocumentAssets
-} from "../article-document.js";
+} from "../extension/article-document.js";
test("article documents preserve readable block order while discarding invalid blocks", () => {
const document = normalizeArticleDocument({
diff --git a/test/article-edit.test.js b/test/article-edit.test.js
index 0fe22e2..1b5ace2 100644
--- a/test/article-edit.test.js
+++ b/test/article-edit.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { updateArticleText } from "../article-edit.js";
-import { articleDocumentText, normalizeArticleDocument } from "../article-document.js";
+import { updateArticleText } from "../extension/article-edit.js";
+import { articleDocumentText, normalizeArticleDocument } from "../extension/article-document.js";
const entry = () => {
const articleDocument = normalizeArticleDocument({ blocks: [
diff --git a/test/asset-formats.test.js b/test/asset-formats.test.js
index d86480c..4fd141a 100644
--- a/test/asset-formats.test.js
+++ b/test/asset-formats.test.js
@@ -11,7 +11,7 @@ import {
importContainerKindForFile,
isReportedMimeCompatible,
resolvePortableAssetFormat
-} from "../asset-formats.js";
+} from "../extension/asset-formats.js";
test("asset format registry is the unique source for supported kinds extensions and picker values", () => {
assert.deepEqual(SUPPORTED_ASSET_KINDS, ["image", "video", "audio", "document", "attachment"]);
diff --git a/test/automatic-vision.test.js b/test/automatic-vision.test.js
index 410ef47..6b9a250 100644
--- a/test/automatic-vision.test.js
+++ b/test/automatic-vision.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { buildAutomaticVisionJob } from "../automatic-vision.js";
+import { buildAutomaticVisionJob } from "../extension/automatic-vision.js";
const entries = [{
id: "case-one",
diff --git a/test/bounded-media.test.js b/test/bounded-media.test.js
index 6a4a0e5..047a0aa 100644
--- a/test/bounded-media.test.js
+++ b/test/bounded-media.test.js
@@ -7,7 +7,7 @@ import {
detectImageDimensions,
fetchBoundedMedia,
isSupportedDocumentMimeType
-} from "../bounded-media.js";
+} from "../extension/bounded-media.js";
const PNG = Uint8Array.from([
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a,
diff --git a/test/browse-frame.test.js b/test/browse-frame.test.js
index 9afc6f3..534851b 100644
--- a/test/browse-frame.test.js
+++ b/test/browse-frame.test.js
@@ -4,13 +4,13 @@ import { readFile } from "node:fs/promises";
async function sources() {
const [curatedHtml, curatedSkillsHtml, skillsHtml, curatedCss, skillsCss, foundation, libraryCss] = await Promise.all([
- readFile(new URL("../curated.html", import.meta.url), "utf8"),
- readFile(new URL("../curated-skills.html", import.meta.url), "utf8"),
- readFile(new URL("../skills.html", import.meta.url), "utf8"),
- readFile(new URL("../curated.css", import.meta.url), "utf8"),
- readFile(new URL("../skills-page.css", import.meta.url), "utf8"),
- readFile(new URL("../ui-foundation.css", import.meta.url), "utf8"),
- readFile(new URL("../library.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/curated.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/curated-skills.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/skills.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/curated.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/skills-page.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.css", import.meta.url), "utf8")
]);
return { curatedHtml, curatedSkillsHtml, skillsHtml, curatedCss, skillsCss, foundation, libraryCss };
}
diff --git a/test/capture-additions.test.js b/test/capture-additions.test.js
index 142df4e..9a91d55 100644
--- a/test/capture-additions.test.js
+++ b/test/capture-additions.test.js
@@ -1,7 +1,7 @@
import test from 'node:test';
import assert from 'node:assert/strict';
-import { appendCaptureCandidate, draftCaptureAddition, savedDraftCaptureItems } from '../capture-additions.js';
-import { normalizePageCaptureCandidate, normalizePageCaptureBatch, applyPageCaptureSelections, pageCaptureDefaultMediaIds } from '../page-capture.js';
+import { appendCaptureCandidate, draftCaptureAddition, savedDraftCaptureItems } from '../extension/capture-additions.js';
+import { normalizePageCaptureCandidate, normalizePageCaptureBatch, applyPageCaptureSelections, pageCaptureDefaultMediaIds } from '../extension/page-capture.js';
const candidate = () => normalizePageCaptureCandidate({id:'main',title:'main',canonicalUrl:'https://x.com/user/status/1',contentText:'Original',
textBlocks:[{id:'body',kind:'paragraph',relevance:'explicit-creative',text:'Original'}],articleDocument:{blocks:[{id:'body',kind:'paragraph',relevance:'explicit-creative',text:'Original'}]},
media:[{id:'one',url:'https://pbs.twimg.com/media/image?format=jpg&name=small',kind:'image',placement:'inline'},
@@ -56,7 +56,7 @@ test('adding a webpage preserves headings and quotes without repeating original
test("saved capture outcomes consume partial and duplicate cases but preserve unsaved candidates", async () => {
- const { savedPageCaptureCandidateIds } = await import("../capture-additions.js");
+ const { savedPageCaptureCandidateIds } = await import("../extension/capture-additions.js");
const candidates = ["saved", "partial", "duplicate", "failed"].map(id => ({ id }));
const results = candidates.map(({ id }) => ({ candidateId: id, status: id, ...(id !== "failed" ? { entryId: `entry:${id}` } : {}) }));
assert.deepEqual([...savedPageCaptureCandidateIds({}, candidates, results)], ["saved", "partial", "duplicate"]);
diff --git a/test/capture-content-contract.test.js b/test/capture-content-contract.test.js
index 09bf237..31f1a83 100644
--- a/test/capture-content-contract.test.js
+++ b/test/capture-content-contract.test.js
@@ -1,14 +1,14 @@
import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-import { classifyContent } from "../classifier.js";
-import { CONTENT_IDS } from "../taxonomy.js";
-import { usesArticleReader } from "../case-presentation.js";
-import { normalizePageCaptureCandidate, resolvePageCapturePageType, applyPageCaptureSelections, collectPageCaptureSnapshot } from "../page-capture.js";
-import { normalizePageCaptureSitePayload } from "../page-capture-site-adapters.js";
-import { capturedMediaPrompts, planPageCaptureRepair, mergePageCaptureRepair } from "../page-capture-repair.js";
-import { normalizeEntryMedia, setEntryMediaPrompt } from "../media.js";
-import { detailPromptSources } from "../prompt-sources.js";
+import { classifyContent } from "../extension/classifier.js";
+import { CONTENT_IDS } from "../extension/taxonomy.js";
+import { usesArticleReader } from "../extension/case-presentation.js";
+import { normalizePageCaptureCandidate, resolvePageCapturePageType, applyPageCaptureSelections, collectPageCaptureSnapshot } from "../extension/page-capture.js";
+import { normalizePageCaptureSitePayload } from "../extension/page-capture-site-adapters.js";
+import { capturedMediaPrompts, planPageCaptureRepair, mergePageCaptureRepair } from "../extension/page-capture-repair.js";
+import { normalizeEntryMedia, setEntryMediaPrompt } from "../extension/media.js";
+import { detailPromptSources } from "../extension/prompt-sources.js";
test("structured work descriptions are not original generation prompts", () => {
for (const [kind, pageType, expected] of [["image", "artwork", CONTENT_IDS.imageCase], ["video", "video", CONTENT_IDS.videoCase]]) {
@@ -135,7 +135,7 @@ test("recapture fills missing per-image prompts without downloading saved media
});
test("capture save and additions cannot enqueue paid analysis as an automatic side effect", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
for (const name of ["commitPageCapture", "commitCaptureDraft", "commitCaptureIntoCompound", "addUploadedVisual", "addUploadedMedia"]) {
const start = source.indexOf(`async function ${name}(`);
assert.ok(start >= 0);
diff --git a/test/capture-draft.test.js b/test/capture-draft.test.js
index 8b0284c..78cca20 100644
--- a/test/capture-draft.test.js
+++ b/test/capture-draft.test.js
@@ -12,8 +12,8 @@ import {
removeDraftFragment,
reorderDraftFragments,
setDraftPrimaryVisual
-} from "../capture-draft.js";
-import { normalizeEntryVisuals, primaryVisual } from "../visuals.js";
+} from "../extension/capture-draft.js";
+import { normalizeEntryVisuals, primaryVisual } from "../extension/visuals.js";
test("a capture draft combines ordered highlights across pages without duplicating the same selection", () => {
let draft = createCaptureDraft();
diff --git a/test/capture-permission-flow.test.js b/test/capture-permission-flow.test.js
index 2471a38..6a227c7 100644
--- a/test/capture-permission-flow.test.js
+++ b/test/capture-permission-flow.test.js
@@ -20,10 +20,10 @@ import {
requestCapturePermissionBundle,
RESTRICTED_PAGE_MESSAGE,
resolveActivePage
-} from "../capture-permissions.js";
-import { runCaptureTransaction } from "../capture-workspace.js";
+} from "../extension/capture-permissions.js";
+import { runCaptureTransaction } from "../extension/capture-workspace.js";
-const projectRoot = new URL("../", import.meta.url);
+const projectRoot = new URL("../extension/", import.meta.url);
test("explicit clipboard extraction uses one optional permission with a recoverable grant", async () => {
const manifest = JSON.parse(await readFile(new URL("manifest.json", projectRoot), "utf8"));
diff --git a/test/capture-region.test.js b/test/capture-region.test.js
index a3c2f16..336cfa7 100644
--- a/test/capture-region.test.js
+++ b/test/capture-region.test.js
@@ -5,9 +5,9 @@ import { readFile } from "node:fs/promises";
import {
capturePermissionMessage,
captureVisibleTabWithRecovery
-} from "../capture-region.js";
+} from "../extension/capture-region.js";
-const sourceUrl = new URL("../capture-region.js", import.meta.url);
+const sourceUrl = new URL("../extension/capture-region.js", import.meta.url);
test("expired activeTab access becomes a recovery instruction instead of a Chrome permission error", () => {
const message = capturePermissionMessage(
diff --git a/test/capture-runtime-wiring.test.js b/test/capture-runtime-wiring.test.js
index 9eab106..c3f3e63 100644
--- a/test/capture-runtime-wiring.test.js
+++ b/test/capture-runtime-wiring.test.js
@@ -3,13 +3,13 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
test("the collector live-refreshes on draft storage changes", async () => {
- const source = await readFile(new URL("../collector.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/collector.js", import.meta.url), "utf8");
assert.match(source, /chrome\.storage\.onChanged\.addListener/);
assert.match(source, /changes\.captureDraft/);
});
test("opening the capture workspace never starts synchronization", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const start = source.indexOf('case "GET_CAPTURE_WORKSPACE"');
const end = source.indexOf('case "GET_DATA_SAFETY_STATUS"', start);
const branch = source.slice(start, end);
@@ -18,7 +18,7 @@ test("opening the capture workspace never starts synchronization", async () => {
});
test("reading library state never starts synchronization", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const start = source.indexOf('case "GET_STATE"');
const end = source.indexOf('case "GET_CAPTURE_WORKSPACE"', start);
const branch = source.slice(start, end);
@@ -28,7 +28,7 @@ test("reading library state never starts synchronization", async () => {
});
test("draft edits and save share one lightweight queue so the last capture cannot miss the commit", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
for (const messageType of [
"UPDATE_CAPTURE_DRAFT", "UPDATE_CAPTURE_FRAGMENT", "REMOVE_CAPTURE_FRAGMENT",
"REMOVE_CAPTURE_VISUAL", "CANCEL_CAPTURE_DRAFT", "COMMIT_CAPTURE_DRAFT"
@@ -41,7 +41,7 @@ test("draft edits and save share one lightweight queue so the last capture canno
});
test("creative result capture and metadata commit cross both queues as one transaction", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const start = source.indexOf("async function captureAndCommitCreativeOutputs");
const end = source.indexOf("function dispatchCaptureMessage", start);
const transaction = source.slice(start, end);
@@ -51,7 +51,7 @@ test("creative result capture and metadata commit cross both queues as one trans
});
test("captured posts retain real media facts when suggesting a case category", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const start = source.indexOf("async function commitPageCapture");
const end = source.indexOf("async function", start + 20);
const save = source.slice(start, end);
@@ -60,7 +60,7 @@ test("captured posts retain real media facts when suggesting a case category", a
});
test("restoring an overwritten screenshot marks that existing media id dirty", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const start = source.indexOf("async function undoLastSave()");
const end = source.indexOf("async function deleteEntry", start);
const undo = source.slice(start, end);
diff --git a/test/capture-save-mode.test.js b/test/capture-save-mode.test.js
index 0785425..f4cfa0d 100644
--- a/test/capture-save-mode.test.js
+++ b/test/capture-save-mode.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
+const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
test("cross-page draft parts save as one case unless the user targeted an existing compound", () => {
const commit = sourceBlock("async function commitCaptureDraft", "async function commitCaptureIntoCompound");
diff --git a/test/capture-workspace.test.js b/test/capture-workspace.test.js
index 66e71f7..bca65d7 100644
--- a/test/capture-workspace.test.js
+++ b/test/capture-workspace.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createCaptureWorkspace } from "../capture-workspace.js";
+import { createCaptureWorkspace } from "../extension/capture-workspace.js";
test("capture workspace persists a selected fragment behind one dispatch interface", async () => {
const stored = {};
diff --git a/test/case-management-ui.test.js b/test/case-management-ui.test.js
index a879771..27e8def 100644
--- a/test/case-management-ui.test.js
+++ b/test/case-management-ui.test.js
@@ -3,11 +3,11 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
const [html, source, background, css, icons] = await Promise.all([
- readFile(new URL("../library.html", import.meta.url), "utf8"),
- readFile(new URL("../library.js", import.meta.url), "utf8"),
- readFile(new URL("../background.js", import.meta.url), "utf8"),
- readFile(new URL("../library.css", import.meta.url), "utf8"),
- readFile(new URL("../assets/ui-icons.svg", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/assets/ui-icons.svg", import.meta.url), "utf8")
]);
test("selection mode exposes all filtered results, user tags, projects, sharing, and recycle-bin actions", () => {
diff --git a/test/case-presentation.test.js b/test/case-presentation.test.js
index 8ed5cbf..8c61a82 100644
--- a/test/case-presentation.test.js
+++ b/test/case-presentation.test.js
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { usesArticleReader, usesPostReader, mediaFormatLabel } from "../case-presentation.js";
+import { usesArticleReader, usesPostReader, mediaFormatLabel } from "../extension/case-presentation.js";
test("creative classifications open existing case details regardless of webpage origin", () => {
const articleDocument = { blocks: [{ kind: "paragraph", text: "Original prompt" }] };
diff --git a/test/classifier.test.js b/test/classifier.test.js
index 5e7f082..45d4a76 100644
--- a/test/classifier.test.js
+++ b/test/classifier.test.js
@@ -7,8 +7,8 @@ import {
classifyImportedMedia,
classifyImageCase,
confirmClassification
-} from "../classifier.js";
-import { CONTENT_IDS, CONTENT_ROLES, createContentType, createDefaultTaxonomy, removeContentType } from "../taxonomy.js";
+} from "../extension/classifier.js";
+import { CONTENT_IDS, CONTENT_ROLES, createContentType, createDefaultTaxonomy, removeContentType } from "../extension/taxonomy.js";
test("declared creative works use their medium even when prompt text resembles an article or a broad site rule", () => {
const entry = { url: "https://example.com/work", title: "Workflow", text: "First use the attached image. Then follow these steps, because identity consistency matters.",
diff --git a/test/collector-view.test.js b/test/collector-view.test.js
index 8b93859..fa4ba58 100644
--- a/test/collector-view.test.js
+++ b/test/collector-view.test.js
@@ -5,7 +5,7 @@ import { readFile } from "node:fs/promises";
import {
assignVisualPreviewSource,
collectorViewState
-} from "../collector-view.js";
+} from "../extension/collector-view.js";
test("cached screenshot URLs bind to newly created thumbnail nodes before they are connected", () => {
const image = { isConnected: false, src: "" };
@@ -41,7 +41,7 @@ test("one captured item stays in quick preview until the user asks to edit it",
});
test("quick preview exposes one-step removal for every captured text and image", async () => {
- const collectorSource = await readFile(new URL("../collector.js", import.meta.url), "utf8");
+ const collectorSource = await readFile(new URL("../extension/collector.js", import.meta.url), "utf8");
const quickPreview = collectorSource.slice(
collectorSource.indexOf("function createQuickPreview"),
collectorSource.indexOf("function createFragmentCard")
@@ -60,7 +60,7 @@ test("quick preview exposes one-step removal for every captured text and image",
});
test("page capture replaces failed remote thumbnails with an explicit unavailable preview", async () => {
- const collectorSource = await readFile(new URL("../collector.js", import.meta.url), "utf8");
+ const collectorSource = await readFile(new URL("../extension/collector.js", import.meta.url), "utf8");
const pageCaptureRenderer = collectorSource.slice(
collectorSource.indexOf("function renderPageCapture"),
collectorSource.indexOf("function updatePageCaptureSelection")
@@ -69,16 +69,16 @@ test("page capture replaces failed remote thumbnails with an explicit unavailabl
assert.match(pageCaptureRenderer, /image\.addEventListener\("error"/);
assert.match(pageCaptureRenderer, /preview\.replaceChildren\(textNode\("span", t\("预览不可用"\)\)\)/);
assert.match(pageCaptureRenderer, /pageCaptureMediaSourceLabel\(media\.sourceKind, media\.captureMethod\)/);
- const collectorHtml = await readFile(new URL("../collector.html", import.meta.url), "utf8");
+ const collectorHtml = await readFile(new URL("../extension/collector.html", import.meta.url), "utf8");
assert.match(collectorHtml, /id="page-capture-help"/);
assert.match(collectorSource, /t\("选择要保存的内容"\)/);
});
test("page capture uses the final save as media authorization and keeps uncertain media separate", async () => {
const [collectorSource, collectorHtml, backgroundSource] = await Promise.all([
- Promise.all(["../collector.js", "../collector-page-capture-view.js"].map(path => readFile(new URL(path, import.meta.url), "utf8"))).then(parts => parts.join("\n")),
- readFile(new URL("../collector.html", import.meta.url), "utf8"),
- readFile(new URL("../background.js", import.meta.url), "utf8")
+ Promise.all(["../extension/collector.js", "../extension/collector-page-capture-view.js"].map(path => readFile(new URL(path, import.meta.url), "utf8"))).then(parts => parts.join("\n")),
+ readFile(new URL("../extension/collector.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8")
]);
const pageCaptureRenderer = collectorSource.slice(
collectorSource.indexOf("function renderPageCapture"),
@@ -108,10 +108,10 @@ test("page capture uses the final save as media authorization and keeps uncertai
test("page capture can correct the confirmed DOM region and previews one ordered article", async () => {
const [collectorSource, collectorHtml, backgroundSource, librarySource] = await Promise.all([
- readFile(new URL("../collector.js", import.meta.url), "utf8"),
- readFile(new URL("../collector.html", import.meta.url), "utf8"),
- readFile(new URL("../background.js", import.meta.url), "utf8"),
- readFile(new URL("../library.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/collector.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/collector.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8")
]);
assert.match(collectorHtml, /id="page-capture-add-region"/);
assert.match(collectorHtml, /id="page-capture-exclude-region"/);
@@ -162,8 +162,8 @@ test("continuing an existing case keeps the target explicit at the final action"
test("collector translates only built-in capture content types", async () => {
const [collectorSource, backgroundSource] = await Promise.all([
- readFile(new URL("../collector.js", import.meta.url), "utf8"),
- readFile(new URL("../background.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/collector.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8")
]);
assert.match(collectorSource, /item\.customized \? item\.name : t\(item\.name\)/);
assert.match(collectorSource, /partContentType\?\.customized \? partContentType\.name : t\(partContentType\?\.name \|\| "待确认"\)/);
@@ -172,9 +172,9 @@ test("collector translates only built-in capture content types", async () => {
test("the collector auto-reads only highlights and reserves clipboard access for the extract buttons", async () => {
const [collectorSource, collectorHtml, backgroundSource] = await Promise.all([
- readFile(new URL("../collector.js", import.meta.url), "utf8"),
- readFile(new URL("../collector.html", import.meta.url), "utf8"),
- readFile(new URL("../background.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/collector.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/collector.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8")
]);
assert.match(collectorSource, /TRY_ACTIVE_SELECTION_TO_DRAFT/);
@@ -229,9 +229,9 @@ test("the collector auto-reads only highlights and reserves clipboard access for
test("every captured draft exposes project and the shared multi-tag editor before save", async () => {
const [collectorSource, collectorHtml, draftSource] = await Promise.all([
- readFile(new URL("../collector.js", import.meta.url), "utf8"),
- readFile(new URL("../collector.html", import.meta.url), "utf8"),
- readFile(new URL("../capture-draft.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/collector.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/collector.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/capture-draft.js", import.meta.url), "utf8")
]);
const metadata = collectorHtml.slice(
collectorHtml.indexOf('<section id="capture-metadata"'),
diff --git a/test/compatible-provider-presets.test.js b/test/compatible-provider-presets.test.js
index 03c323f..596cec6 100644
--- a/test/compatible-provider-presets.test.js
+++ b/test/compatible-provider-presets.test.js
@@ -5,7 +5,7 @@ import {
MICU_COMPATIBLE_PROVIDER_PRESET,
compatibleImageSizesFor,
compatibleProviderPresetForEndpoint
-} from "../compatible-provider-presets.js";
+} from "../extension/compatible-provider-presets.js";
test("Micu preset is the shared source for settings endpoints and model-specific sizes", () => {
const preset = MICU_COMPATIBLE_PROVIDER_PRESET;
diff --git a/test/composer-active-turn.test.js b/test/composer-active-turn.test.js
index a22af35..4185cfb 100644
--- a/test/composer-active-turn.test.js
+++ b/test/composer-active-turn.test.js
@@ -6,8 +6,8 @@ import {
createLatestCheckpointWriter,
recoverInterruptedComposerTurn,
updateComposerActiveTurn
-} from "../composer-active-turn.js";
-import { createComposerSession } from "../composer.js";
+} from "../extension/composer-active-turn.js";
+import { createComposerSession } from "../extension/composer.js";
test("an active text turn persists only recoverable request facts and partial text", () => {
const activeTurn = createComposerActiveTurn({
diff --git a/test/composer-agent.test.js b/test/composer-agent.test.js
index 4d3c5bd..980ff36 100644
--- a/test/composer-agent.test.js
+++ b/test/composer-agent.test.js
@@ -13,7 +13,7 @@ import {
normalizeComposerAgentSettings,
taskMethodFor,
updateAgentTaskMethod
-} from "../composer-agent.js";
+} from "../extension/composer-agent.js";
test("light agent compiles routing, button questions, and local search without a dimension contract", () => {
const settings = normalizeComposerAgentSettings();
diff --git a/test/composer-analysis-task-bridge.test.js b/test/composer-analysis-task-bridge.test.js
index 2a681d2..e380c78 100644
--- a/test/composer-analysis-task-bridge.test.js
+++ b/test/composer-analysis-task-bridge.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createComposerAnalysisTaskBridge } from "../composer-analysis-task-bridge.js";
+import { createComposerAnalysisTaskBridge } from "../extension/composer-analysis-task-bridge.js";
test("closing while task creation is pending detaches the consumer and rejects late automatic continuation", async () => {
const messages = [];
diff --git a/test/composer-auto-response.test.js b/test/composer-auto-response.test.js
index c309506..d5413a7 100644
--- a/test/composer-auto-response.test.js
+++ b/test/composer-auto-response.test.js
@@ -5,7 +5,7 @@ import {
composerAutoResponseProtocolFacts,
createComposerAutoResponseProjector,
parseComposerAutoResponse
-} from "../composer-auto-response.js";
+} from "../extension/composer-auto-response.js";
test("a valid automatic response exposes only the user-visible body", () => {
assert.deepEqual(parseComposerAutoResponse(
diff --git a/test/composer-diagnostics.test.js b/test/composer-diagnostics.test.js
index 0a21402..8c627d5 100644
--- a/test/composer-diagnostics.test.js
+++ b/test/composer-diagnostics.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { buildComposerDiagnostic, composerOutputChecks, diagnosticFilename } from "../composer-diagnostics.js";
-import { createComposerSession } from "../composer.js";
+import { buildComposerDiagnostic, composerOutputChecks, diagnosticFilename } from "../extension/composer-diagnostics.js";
+import { createComposerSession } from "../extension/composer.js";
test("local output checks catch aliases and fake placeholder instructions without another model call", () => {
const checks = composerOutputChecks(createComposerSession({ targetType: "image" }), {
diff --git a/test/composer-image-workspace.test.js b/test/composer-image-workspace.test.js
index 790cb0f..cd8f0dd 100644
--- a/test/composer-image-workspace.test.js
+++ b/test/composer-image-workspace.test.js
@@ -8,7 +8,7 @@ import {
maskAlphaAt,
scalePointerToImage,
undoMaskStroke
-} from "../composer-image-workspace.js";
+} from "../extension/composer-image-workspace.js";
test("mask coordinates follow the displayed image while transparent pixels mean edit", () => {
const point = scalePointerToImage({
diff --git a/test/composer-page.test.js b/test/composer-page.test.js
index 6213221..b477a53 100644
--- a/test/composer-page.test.js
+++ b/test/composer-page.test.js
@@ -4,10 +4,10 @@ import { readFile } from "node:fs/promises";
test("composer combines cases and Skills in one reference workspace while keeping assembly separate", async () => {
const [composerHtml, skillsHtml, libraryHtml, libraryJs] = await Promise.all([
- readFile(new URL("../composer.html", import.meta.url), "utf8"),
- readFile(new URL("../skills.html", import.meta.url), "utf8"),
- readFile(new URL("../library.html", import.meta.url), "utf8"),
- readFile(new URL("../library.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/composer.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/skills.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8")
]);
assert.match(composerHtml, /id="composer-timeline"/);
@@ -54,8 +54,8 @@ test("composer combines cases and Skills in one reference workspace while keepin
test("composer model menu renders every connected task candidate without static provider fallback", async () => {
const [composerJs, composerCss] = await Promise.all([
- readFile(new URL("../composer-page.js", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.css", import.meta.url), "utf8")
]);
const renderer = composerJs.slice(
composerJs.indexOf("function renderGenerationModelChoices"),
@@ -74,10 +74,10 @@ test("composer model menu renders every connected task candidate without static
test("composer reference selection is visual while Skill management stays on its own page", async () => {
const [composerJs, composerCss, skillsJs, i18nJs] = await Promise.all([
- readFile(new URL("../composer-page.js", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.css", import.meta.url), "utf8"),
- readFile(new URL("../skills-page.js", import.meta.url), "utf8"),
- readFile(new URL("../i18n.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/skills-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/i18n.js", import.meta.url), "utf8")
]);
assert.match(composerJs, /getScreenshotBlob/);
assert.match(composerJs, /renderMarkdownDocument/);
@@ -156,8 +156,8 @@ test("composer reference selection is visual while Skill management stays on its
test("composer temporary references share one attachment entry and block text-only sends before the draft is consumed", async () => {
const [composerHtml, composerJs] = await Promise.all([
- readFile(new URL("../composer.html", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/composer.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8")
]);
assert.match(composerHtml, /id="composer-attachment-files"[^>]*multiple/);
@@ -188,7 +188,7 @@ test("composer temporary references share one attachment entry and block text-on
});
test("composer sends a manual text task from the direct execution phase", async () => {
- const composerJs = await readFile(new URL("../composer-page.js", import.meta.url), "utf8");
+ const composerJs = await readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8");
const sendTurn = composerJs.slice(composerJs.indexOf("async function sendComposerTurn"), composerJs.indexOf("async function retryComposerTurn"));
assert.match(composerJs, /resolveComposerTurnPolicy/);
@@ -198,7 +198,7 @@ test("composer sends a manual text task from the direct execution phase", async
});
test("composer sends an automatic text task through the prepared one-response route", async () => {
- const composerJs = await readFile(new URL("../composer-page.js", import.meta.url), "utf8");
+ const composerJs = await readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8");
const runTurn = composerJs.slice(composerJs.indexOf("async function runComposerTurn"), composerJs.indexOf("function retrieveSourcesForTurn"));
assert.match(runTurn, /operation\.executionRoute/);
@@ -206,7 +206,7 @@ test("composer sends an automatic text task through the prepared one-response ro
});
test("composer checkpoints an active text turn and recovers it without automatic resend", async () => {
- const composerJs = await readFile(new URL("../composer-page.js", import.meta.url), "utf8");
+ const composerJs = await readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8");
const sendTurn = composerJs.slice(composerJs.indexOf("async function sendComposerTurn"), composerJs.indexOf("async function retryComposerTurn"));
const execution = composerJs.slice(composerJs.indexOf("async function runAgentExecution"), composerJs.indexOf("async function persistComposerFailure"));
const initialization = composerJs.slice(composerJs.indexOf("async function initializeComposer"), composerJs.indexOf("async function createNewSession"));
@@ -219,7 +219,7 @@ test("composer checkpoints an active text turn and recovers it without automatic
});
test("composer starts an explicit media task from its prepared generation phase", async () => {
- const composerJs = await readFile(new URL("../composer-page.js", import.meta.url), "utf8");
+ const composerJs = await readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8");
const sendTurn = composerJs.slice(composerJs.indexOf("async function sendComposerTurn"), composerJs.indexOf("async function retryComposerTurn"));
assert.match(sendTurn, /startPersistentCreativeJob\(\{ session: working, userMessageId, startPhase: prepared\.startPhase, imageEdit: null \}\)/);
@@ -227,7 +227,7 @@ test("composer starts an explicit media task from its prepared generation phase"
});
test("composer internal Skill and settings navigation stays in the current tab", async () => {
- const composerJs = await readFile(new URL("../composer-page.js", import.meta.url), "utf8");
+ const composerJs = await readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8");
const openSkill = composerJs.slice(composerJs.indexOf("async function openSkillCenter"), composerJs.indexOf("function openAssemblyDialog"));
assert.match(openSkill, /location\.assign\(url\.href\)/);
assert.match(openSkill, /url\.searchParams\.set\("session", composerSession\.id\)/);
@@ -239,9 +239,9 @@ test("composer internal Skill and settings navigation stays in the current tab",
test("composer keeps one stable creation toolbar and separates result action levels", async () => {
const [composerHtml, composerJs, composerCss] = await Promise.all([
- readFile(new URL("../composer.html", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.js", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/composer.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.css", import.meta.url), "utf8")
]);
const footer = composerHtml.slice(
composerHtml.indexOf('<div class="composer-input-footer">'),
diff --git a/test/composer-retrieval.test.js b/test/composer-retrieval.test.js
index 801d8ca..81d4e6a 100644
--- a/test/composer-retrieval.test.js
+++ b/test/composer-retrieval.test.js
@@ -1,9 +1,9 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { retrieveComposerSources } from "../composer-retrieval.js";
-import { buildSearchIndex } from "../search-index.js";
-import { CONTENT_IDS } from "../taxonomy.js";
+import { retrieveComposerSources } from "../extension/composer-retrieval.js";
+import { buildSearchIndex } from "../extension/search-index.js";
+import { CONTENT_IDS } from "../extension/taxonomy.js";
test("local composer retrieval keeps cases and guides as separate source roles", () => {
const sources = retrieveComposerSources({
diff --git a/test/composer-service.test.js b/test/composer-service.test.js
index daf9670..ec0c39c 100644
--- a/test/composer-service.test.js
+++ b/test/composer-service.test.js
@@ -12,8 +12,8 @@ import {
normalizeImageGenerationRequest,
normalizeVideoGenerationRequest,
planComposerTurnWithService
-} from "../composer-service.js";
-import { createComposerSession, normalizeComposerSettings } from "../composer.js";
+} from "../extension/composer-service.js";
+import { createComposerSession, normalizeComposerSettings } from "../extension/composer.js";
const settings = normalizeComposerSettings();
diff --git a/test/composer-turn-core.test.js b/test/composer-turn-core.test.js
index 4e5d146..324ed1d 100644
--- a/test/composer-turn-core.test.js
+++ b/test/composer-turn-core.test.js
@@ -1,9 +1,9 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createComposerSession, normalizeComposerSettings } from "../composer.js";
-import { applyComposerServiceResult, prepareComposerTurnStart } from "../composer-turn-core.js";
-import { resolveComposerTurnPolicy } from "../composer-turn-policy.js";
+import { createComposerSession, normalizeComposerSettings } from "../extension/composer.js";
+import { applyComposerServiceResult, prepareComposerTurnStart } from "../extension/composer-turn-core.js";
+import { resolveComposerTurnPolicy } from "../extension/composer-turn-policy.js";
test("a manual text task starts streaming execution with the saved user request", () => {
const session = createComposerSession({
diff --git a/test/composer-turn-policy.test.js b/test/composer-turn-policy.test.js
index e52a5bb..594bf8c 100644
--- a/test/composer-turn-policy.test.js
+++ b/test/composer-turn-policy.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { resolveComposerTurnPolicy } from "../composer-turn-policy.js";
+import { resolveComposerTurnPolicy } from "../extension/composer-turn-policy.js";
test("a manually selected text task executes directly in one model call", () => {
assert.deepEqual(resolveComposerTurnPolicy({
diff --git a/test/composer-video-references.test.js b/test/composer-video-references.test.js
index 5884e31..8df6b91 100644
--- a/test/composer-video-references.test.js
+++ b/test/composer-video-references.test.js
@@ -1,10 +1,10 @@
import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-import { prepareComposerVideos, sessionHasVideoReferences } from "../composer-video-references.js";
-import { createReferenceSnapshots } from "../composer.js";
-import { ASSET_FORMAT_REGISTRY } from "../asset-formats.js";
-import { TEMP_REFERENCE_FILE_ACCEPT, validateTempReferenceFile } from "../temp-references.js";
+import { prepareComposerVideos, sessionHasVideoReferences } from "../extension/composer-video-references.js";
+import { createReferenceSnapshots } from "../extension/composer.js";
+import { ASSET_FORMAT_REGISTRY } from "../extension/asset-formats.js";
+import { TEMP_REFERENCE_FILE_ACCEPT, validateTempReferenceFile } from "../extension/temp-references.js";
test("a video without prompts or analyses is still a usable library reference", () => {
const references = createReferenceSnapshots([{
@@ -46,8 +46,8 @@ test("video preparation reads each selected resource once and cannot send missin
test("video dialogue uses the durable runner and persists streamed partial text", async () => {
const [page, runner] = await Promise.all([
- readFile(new URL("../composer-page.js", import.meta.url), "utf8"),
- readFile(new URL("../creative-job-runner.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/creative-job-runner.js", import.meta.url), "utf8")
]);
assert.match(page, /sessionHasVideoReferences\(working\)[\s\S]*startPersistentCreativeJob/);
assert.doesNotMatch(page, /prepareSelectedReferenceVideos/);
diff --git a/test/composer-video-stream.test.js b/test/composer-video-stream.test.js
index d9a3f40..7e0ee4e 100644
--- a/test/composer-video-stream.test.js
+++ b/test/composer-video-stream.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createComposerSession } from "../composer.js";
-import { executeComposerTurnWithService } from "../composer-service.js";
+import { createComposerSession } from "../extension/composer.js";
+import { executeComposerTurnWithService } from "../extension/composer-service.js";
const model = "glm-5.3-flash";
const session = createComposerSession({
diff --git a/test/composer.test.js b/test/composer.test.js
index 35ec9b2..8153603 100644
--- a/test/composer.test.js
+++ b/test/composer.test.js
@@ -32,15 +32,15 @@ import {
updateComposerAgentInstruction,
updateComposerTaskMethod,
validateGeneratedPrompt
-} from "../composer.js";
+} from "../extension/composer.js";
import {
DeepSeekApiError,
deepSeekErrorDetails,
executeAgentTurn,
planComposerTurn,
readDeepSeekSse
-} from "../deepseek.js";
-import { CONTENT_IDS } from "../taxonomy.js";
+} from "../extension/deepseek.js";
+import { CONTENT_IDS } from "../extension/taxonomy.js";
const aiSettings = { apiKey: "secret", consent: true };
diff --git a/test/composer_video_dialogue_e2e.py b/test/composer_video_dialogue_e2e.py
index 389b585..632e0c6 100644
--- a/test/composer_video_dialogue_e2e.py
+++ b/test/composer_video_dialogue_e2e.py
@@ -2,12 +2,13 @@ from __future__ import annotations
import json
import threading
+from pathlib import Path
from contextlib import contextmanager
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from playwright.sync_api import expect
-from e2e_support import SOURCE_EXTENSION_DIR, ai_configuration_fixture, extension_session, wait_for_async_condition
+from e2e_support import ai_configuration_fixture, extension_session, wait_for_async_condition
from zhipu_glm_analysis_e2e import extension_with_local_provider_permission
@@ -87,7 +88,7 @@ def run_route(provider_id, model, temporary):
}''', {'providerId': provider_id, 'model': model, 'temporary': temporary})
page = run.open_page('composer.html?session=video-dialogue', wait_until='networkidle')
if temporary:
- page.locator('#composer-attachment-files').set_input_files(str(SOURCE_EXTENSION_DIR / 'test/fixtures/zhipu-local-video-smoke.mp4'))
+ page.locator('#composer-attachment-files').set_input_files(str(Path(__file__).parent / 'fixtures/zhipu-local-video-smoke.mp4'))
try:
expect(page.locator('.composer-temp-reference-card' if temporary else '.composer-input-reference-card')).to_have_count(1)
except AssertionError:
diff --git a/test/compound-cases.test.js b/test/compound-cases.test.js
index 89af36f..23f1e98 100644
--- a/test/compound-cases.test.js
+++ b/test/compound-cases.test.js
@@ -8,7 +8,7 @@ import {
normalizeCompoundCases,
splitCompoundCase,
updateCompoundCase
-} from "../compound-cases.js";
+} from "../extension/compound-cases.js";
const entries = [
entry("one", "分镜提示词", "content:prompt:image", "visual-one"),
diff --git a/test/compound-ui.test.js b/test/compound-ui.test.js
index dcbe8b9..ef87263 100644
--- a/test/compound-ui.test.js
+++ b/test/compound-ui.test.js
@@ -2,8 +2,8 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
-const styles = await readFile(new URL("../library.css", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+const styles = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
test("finishing a compound selection exits selection mode before the gallery refreshes", () => {
const block = functionBlock("async function saveCompoundSelection()", "async function saveProjectSelection()");
diff --git a/test/context-menus.test.js b/test/context-menus.test.js
index 1412478..f89658b 100644
--- a/test/context-menus.test.js
+++ b/test/context-menus.test.js
@@ -8,7 +8,7 @@ import {
handleContextMenuCapture,
syncContextMenus,
waitForStablePageLayout
-} from "../context-menus.js";
+} from "../extension/context-menus.js";
test("context menus expose one PromptDirector action for each right-click context", async () => {
const created = [];
@@ -157,7 +157,7 @@ test("non-text selection never opens the side panel as a text capture", () => {
});
test("background startup only uses Chromium context-menu events", async () => {
- const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
assert.doesNotMatch(background, /contextMenus\.onShown/);
assert.match(background, /contextMenus\.onClicked\.addListener/);
});
diff --git a/test/copy-feedback-ui.test.js b/test/copy-feedback-ui.test.js
index eb6d380..ee0e428 100644
--- a/test/copy-feedback-ui.test.js
+++ b/test/copy-feedback-ui.test.js
@@ -2,17 +2,17 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
-const libraryHtml = await readFile(new URL("../library.html", import.meta.url), "utf8");
-const composerHtml = await readFile(new URL("../composer.html", import.meta.url), "utf8");
-const collectorHtml = await readFile(new URL("../collector.html", import.meta.url), "utf8");
-const collector = await readFile(new URL("../collector.js", import.meta.url), "utf8");
-const i18n = await readFile(new URL("../i18n.js", import.meta.url), "utf8");
-const styles = await readFile(new URL("../library.css", import.meta.url), "utf8");
-const foundation = await readFile(new URL("../ui-foundation.css", import.meta.url), "utf8");
-const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
-const markdown = await readFile(new URL("../lib.js", import.meta.url), "utf8");
-const preview = await readFile(new URL("../share-preview.js", import.meta.url), "utf8");
+const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+const libraryHtml = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
+const composerHtml = await readFile(new URL("../extension/composer.html", import.meta.url), "utf8");
+const collectorHtml = await readFile(new URL("../extension/collector.html", import.meta.url), "utf8");
+const collector = await readFile(new URL("../extension/collector.js", import.meta.url), "utf8");
+const i18n = await readFile(new URL("../extension/i18n.js", import.meta.url), "utf8");
+const styles = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
+const foundation = await readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8");
+const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
+const markdown = await readFile(new URL("../extension/lib.js", import.meta.url), "utf8");
+const preview = await readFile(new URL("../extension/share-preview.js", import.meta.url), "utf8");
test("library clipboard actions show feedback on the clicked button", () => {
const clipboardCalls = [...library.matchAll(/navigator\.clipboard\.writeText/g)];
diff --git a/test/creative-experiment-package.test.js b/test/creative-experiment-package.test.js
index 52f4114..12a0bb8 100644
--- a/test/creative-experiment-package.test.js
+++ b/test/creative-experiment-package.test.js
@@ -5,8 +5,8 @@ import {
buildCreativeExperimentPackage,
mergeCreativeExperimentPackage,
parseCreativeExperimentPackage
-} from "../creative-experiment-package.js";
-import { createComposerSession, normalizeComposerSettings } from "../composer.js";
+} from "../extension/creative-experiment-package.js";
+import { createComposerSession, normalizeComposerSettings } from "../extension/composer.js";
function state() {
return {
diff --git a/test/creative-feedback-ui.test.js b/test/creative-feedback-ui.test.js
index 734d4cb..460b95a 100644
--- a/test/creative-feedback-ui.test.js
+++ b/test/creative-feedback-ui.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const root = new URL("../", import.meta.url);
+const root = new URL("../extension/", import.meta.url);
test("copy stays local while an explicit image action activates result capture", async () => {
const composer = await readFile(new URL("composer-page.js", root), "utf8");
diff --git a/test/creative-jobs.test.js b/test/creative-jobs.test.js
index 8eed347..d297c16 100644
--- a/test/creative-jobs.test.js
+++ b/test/creative-jobs.test.js
@@ -10,12 +10,12 @@ import {
retryCreativeJob,
settleCreativeJobStop,
updateCreativeJob
-} from "../creative-jobs.js";
+} from "../extension/creative-jobs.js";
const [background, offscreen, runner] = await Promise.all([
- readFile(new URL("../background.js", import.meta.url), "utf8"),
- readFile(new URL("../offscreen.js", import.meta.url), "utf8"),
- readFile(new URL("../creative-job-runner.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/offscreen.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/creative-job-runner.js", import.meta.url), "utf8")
]);
function request(overrides = {}) {
diff --git a/test/creative-runs.test.js b/test/creative-runs.test.js
index 9dc1540..ff23d48 100644
--- a/test/creative-runs.test.js
+++ b/test/creative-runs.test.js
@@ -15,7 +15,7 @@ import {
recordCreativeSignal,
removeCreativeOutput,
updateCreativeJudgment
-} from "../creative-runs.js";
+} from "../extension/creative-runs.js";
const promptVersion = {
id: "prompt:v1",
diff --git a/test/creative-skill-batching.test.js b/test/creative-skill-batching.test.js
index 18d948c..866f154 100644
--- a/test/creative-skill-batching.test.js
+++ b/test/creative-skill-batching.test.js
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { estimateSkillTokens, skillExtractionWorkload } from "../creative-skill-service.js";
+import { estimateSkillTokens, skillExtractionWorkload } from "../extension/creative-skill-service.js";
test("Skill extraction partitions all source text without sampling or truncation", () => {
const sources = [
diff --git a/test/creative-skill-package.test.js b/test/creative-skill-package.test.js
index d31e69e..eac8f89 100644
--- a/test/creative-skill-package.test.js
+++ b/test/creative-skill-package.test.js
@@ -11,7 +11,7 @@ import {
parseSkillArchive,
parseSkillFiles,
parseSkillMarkdown
-} from "../creative-skill-package.js";
+} from "../extension/creative-skill-package.js";
test("generated packages contain a standard SKILL.md and Markdown references only", async () => {
const archive = await exportGeneratedSkillPackage({
diff --git a/test/creative-skills.test.js b/test/creative-skills.test.js
index 5a9469e..f2990e2 100644
--- a/test/creative-skills.test.js
+++ b/test/creative-skills.test.js
@@ -12,11 +12,11 @@ import {
normalizeAppliedSkillSnapshots,
restoreCreativeSkillVersion,
saveCreativeSkillVersion
-} from "../creative-skills.js";
+} from "../extension/creative-skills.js";
import {
creativeRunEvidenceCandidates,
selectedCreativeRunEvidenceSources
-} from "../creative-skill-service.js";
+} from "../extension/creative-skill-service.js";
function createSkill(state, name = "国风视觉", overrides = {}) {
return createCreativeSkill(state, {
diff --git a/test/creative_feedback_e2e.py b/test/creative_feedback_e2e.py
index d5970c4..632b074 100644
--- a/test/creative_feedback_e2e.py
+++ b/test/creative_feedback_e2e.py
@@ -8,7 +8,7 @@ from playwright.sync_api import expect, sync_playwright
from e2e_support import launch_context
-EXTENSION_DIR = Path(__file__).resolve().parents[1]
+EXTENSION_DIR = Path(__file__).resolve().parents[1] / "extension"
def main() -> None:
diff --git a/test/csp-policy.test.js b/test/csp-policy.test.js
index b1a053e..c793bb1 100644
--- a/test/csp-policy.test.js
+++ b/test/csp-policy.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readdir, readFile } from "node:fs/promises";
-const root = new URL("../", import.meta.url);
+const root = new URL("../extension/", import.meta.url);
test("extension runtime keeps strict CSP and contains no dynamic JavaScript execution", async () => {
const manifest = JSON.parse(await readFile(new URL("manifest.json", root), "utf8"));
diff --git a/test/curated-catalog.test.js b/test/curated-catalog.test.js
index f0ba310..f5ad77e 100644
--- a/test/curated-catalog.test.js
+++ b/test/curated-catalog.test.js
@@ -12,7 +12,7 @@ import {
prepareCuratedPackageVersion,
validateCuratedPackageContents,
validateCuratedPackageIndex
-} from "../curated-catalog.js";
+} from "../extension/curated-catalog.js";
function catalogItem(overrides = {}) {
return {
diff --git a/test/curated-download.test.js b/test/curated-download.test.js
index 30a1f97..5003fbf 100644
--- a/test/curated-download.test.js
+++ b/test/curated-download.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { fetchCuratedPackage, readResponseBlobWithProgress } from "../curated-download.js";
+import { fetchCuratedPackage, readResponseBlobWithProgress } from "../extension/curated-download.js";
const DOWNLOAD_URL =
"https://github.com/wchao6891/PromptDirector-Curated/releases/download/example-1.0.0/example.zip";
diff --git a/test/curated-import.test.js b/test/curated-import.test.js
index 3148e54..679775b 100644
--- a/test/curated-import.test.js
+++ b/test/curated-import.test.js
@@ -1,10 +1,10 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { prepareCuratedPackageVersion } from "../curated-catalog.js";
-import { mergeCuratedLibraryPackage } from "../curated-import.js";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { CONTENT_IDS, createDefaultTaxonomy } from "../taxonomy.js";
+import { prepareCuratedPackageVersion } from "../extension/curated-catalog.js";
+import { mergeCuratedLibraryPackage } from "../extension/curated-import.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { CONTENT_IDS, createDefaultTaxonomy } from "../extension/taxonomy.js";
function item(version) {
return {
diff --git a/test/curated-navigation.test.js b/test/curated-navigation.test.js
index 94850a4..78bbbb5 100644
--- a/test/curated-navigation.test.js
+++ b/test/curated-navigation.test.js
@@ -4,10 +4,10 @@ import { readFile } from "node:fs/promises";
async function sources() {
const [library, page, html, css] = await Promise.all([
- readFile(new URL("../library.js", import.meta.url), "utf8"),
- readFile(new URL("../curated-page.js", import.meta.url), "utf8"),
- readFile(new URL("../curated.html", import.meta.url), "utf8"),
- readFile(new URL("../curated.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/curated-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/curated.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/curated.css", import.meta.url), "utf8")
]);
return { library, page, html, css };
}
diff --git a/test/curated-skill-catalog.test.js b/test/curated-skill-catalog.test.js
index 4fda878..139cf36 100644
--- a/test/curated-skill-catalog.test.js
+++ b/test/curated-skill-catalog.test.js
@@ -1,13 +1,13 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createZipBlob } from "../zip.js";
+import { createZipBlob } from "../extension/zip.js";
import {
normalizeCuratedSkillCatalog,
validateCuratedSkillPackage,
verifyCuratedSkillPackageBlob
-} from "../curated-skill-catalog.js";
-import { sha256Hex } from "../sync-crypto.js";
+} from "../extension/curated-skill-catalog.js";
+import { sha256Hex } from "../extension/sync-crypto.js";
async function fixture() {
const skill = new Blob(["---\nname: composition-method\ndescription: Compose clearly.\n---\n\n# Method\n\nUse depth.\n"]);
diff --git a/test/curated-skill-install.test.js b/test/curated-skill-install.test.js
index d6b3a86..f12b3a8 100644
--- a/test/curated-skill-install.test.js
+++ b/test/curated-skill-install.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { installCuratedSkillTransaction, planCuratedSkillInstall } from "../curated-skill-install.js";
+import { installCuratedSkillTransaction, planCuratedSkillInstall } from "../extension/curated-skill-install.js";
const item = { id: "[email protected]", skillId: "composition", version: "1.0.0", sha256: "a".repeat(64) };
const parsed = {
diff --git a/test/curated-skill-navigation.test.js b/test/curated-skill-navigation.test.js
index 51b1084..c4c1bba 100644
--- a/test/curated-skill-navigation.test.js
+++ b/test/curated-skill-navigation.test.js
@@ -4,14 +4,14 @@ import { readFile } from "node:fs/promises";
async function sources() {
const [casesHtml, skillsHtml, curatedSkillPage, skillsPage, skillsCenter, foundation, composerPage, composerStyle] = await Promise.all([
- readFile(new URL("../curated.html", import.meta.url), "utf8"),
- readFile(new URL("../curated-skills.html", import.meta.url), "utf8"),
- readFile(new URL("../curated-skill-page.js", import.meta.url), "utf8"),
- readFile(new URL("../skills-page.js", import.meta.url), "utf8"),
- readFile(new URL("../skills.html", import.meta.url), "utf8"),
- readFile(new URL("../ui-foundation.css", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.js", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/curated.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/curated-skills.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/curated-skill-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/skills-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/skills.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.css", import.meta.url), "utf8")
]);
return { casesHtml, skillsHtml, curatedSkillPage, skillsPage, skillsCenter, foundation, composerPage, composerStyle };
}
diff --git a/test/curated-skill-package.test.js b/test/curated-skill-package.test.js
index 9db2dbf..a58b7a0 100644
--- a/test/curated-skill-package.test.js
+++ b/test/curated-skill-package.test.js
@@ -4,9 +4,9 @@ import assert from "node:assert/strict";
import {
buildCuratedSkillSnapshot,
buildCuratedSkillSubmissionArchive
-} from "../curated-skill-package.js";
-import { currentCreativeSkillVersion, createCreativeSkill, createCreativeSkillsState } from "../creative-skills.js";
-import { readZipBlob } from "../zip.js";
+} from "../extension/curated-skill-package.js";
+import { currentCreativeSkillVersion, createCreativeSkill, createCreativeSkillsState } from "../extension/creative-skills.js";
+import { readZipBlob } from "../extension/zip.js";
function fixture(overrides = {}) {
return createCreativeSkill(createCreativeSkillsState(), {
diff --git a/test/curated-submission.test.js b/test/curated-submission.test.js
index 2f67740..dcb4e7e 100644
--- a/test/curated-submission.test.js
+++ b/test/curated-submission.test.js
@@ -7,7 +7,7 @@ import {
sanitizeCuratedSubmissionEntry,
submissionManifest,
submissionPartManifest
-} from "../curated-submission.js";
+} from "../extension/curated-submission.js";
test("精选投稿只保留公开案例字段和必要媒体", () => {
const prepared = prepareCuratedSubmissionState(fixtureState(), { entryIds: ["case-1"] });
diff --git a/test/custom-select-ui.test.js b/test/custom-select-ui.test.js
index 4641332..f15065f 100644
--- a/test/custom-select-ui.test.js
+++ b/test/custom-select-ui.test.js
@@ -3,9 +3,9 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
const [manifest, foundation, sharePreview] = await Promise.all([
- readFile(new URL("../manifest.json", import.meta.url), "utf8"),
- readFile(new URL("../ui-foundation.css", import.meta.url), "utf8"),
- readFile(new URL("../share-preview.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/manifest.json", import.meta.url), "utf8"),
+ readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/share-preview.js", import.meta.url), "utf8")
]);
test("Chrome 134 customizable selects use the shared PromptDirector surface", () => {
diff --git a/test/data-safety-ui.test.js b/test/data-safety-ui.test.js
index ea08c15..d39de18 100644
--- a/test/data-safety-ui.test.js
+++ b/test/data-safety-ui.test.js
@@ -3,7 +3,7 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
test("data safety lives inside general settings without a top-level entry", async () => {
- const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
+ const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
const topbar = html.slice(html.indexOf('<header class="topbar">'), html.indexOf("</header>"));
assert.doesNotMatch(topbar, /id="open-data-safety"|备份与同步/);
@@ -13,7 +13,7 @@ test("data safety lives inside general settings without a top-level entry", asyn
});
test("whole-library portable ZIP backup is removed while selected-case sharing remains", async () => {
- const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
assert.doesNotMatch(background, /case "CREATE_PORTABLE_BACKUP"/);
assert.match(background, /case "EXPORT_ARCHIVE"/);
const exporter = background.slice(background.indexOf("async function exportArchive"), background.indexOf("async function exportProjectArchive"));
@@ -22,7 +22,7 @@ test("whole-library portable ZIP backup is removed while selected-case sharing r
});
test("connecting a sync folder immediately states that it only verifies access", async () => {
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const actionBody = library.slice(
library.indexOf("async function runDataSafetyAction"),
library.indexOf("function showDataSafetyFeedback")
@@ -37,7 +37,7 @@ test("connecting a sync folder immediately states that it only verifies access",
});
test("a missing sync location shows a localized recovery action instead of the browser error", async () => {
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const renderBody = library.slice(
library.indexOf("async function renderDataSafetyStatus"),
library.indexOf("async function chooseSyncFolder")
@@ -55,7 +55,7 @@ test("a missing sync location shows a localized recovery action instead of the b
});
test("share-package import is separate from the two backup actions while sync stays collapsed", async () => {
- const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
+ const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
const panel = html.slice(
html.indexOf('<section id="data-safety-dialog"'),
html.indexOf('<footer class="settings-about"')
@@ -79,10 +79,10 @@ test("share-package import is separate from the two backup actions while sync st
});
test("share-package batch import preserves local configuration and accepts historical package versions", async () => {
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
- const parser = await readFile(new URL("../library-package.js", import.meta.url), "utf8");
- const migrations = await readFile(new URL("../library-package-migrations.js", import.meta.url), "utf8");
- const format = await readFile(new URL("../library-package-format.js", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+ const parser = await readFile(new URL("../extension/library-package.js", import.meta.url), "utf8");
+ const migrations = await readFile(new URL("../extension/library-package-migrations.js", import.meta.url), "utf8");
+ const format = await readFile(new URL("../extension/library-package-format.js", import.meta.url), "utf8");
const action = library.slice(
library.indexOf("async function importSharedLibraryPackage"),
library.indexOf("function backupMediaPaths")
@@ -98,8 +98,8 @@ test("share-package batch import preserves local configuration and accepts histo
});
test("multi-ZIP import uses one wide preflight with blocking failures and one batch apply", async () => {
- const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const dialog = html.slice(
html.indexOf('id="library-package-import-dialog"'),
html.indexOf('id="drawer-backdrop"')
@@ -133,7 +133,7 @@ test("multi-ZIP import uses one wide preflight with blocking failures and one ba
});
test("data safety cannot be dismissed accidentally while a storage operation is running", async () => {
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const bindings = library.slice(
library.indexOf("elements.settingsClose.addEventListener"),
library.indexOf("elements.connectSyncFolder.addEventListener")
@@ -145,7 +145,7 @@ test("data safety cannot be dismissed accidentally while a storage operation is
});
test("folder backup self-check covers project and media trash snapshots plus their relationships", async () => {
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const roundtrip = library.slice(
library.indexOf("function assertFolderBackupRoundtrip"),
library.indexOf("async function localAssetReferenceBackupBlob")
@@ -156,8 +156,8 @@ test("folder backup self-check covers project and media trash snapshots plus the
});
test("folder restore exposes safe merge and exact replace with aggregate capacity and a reversible recovery point", async () => {
- const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const restore = library.slice(
library.indexOf("async function restoreCompleteFolderBackup"),
library.indexOf("async function importSharedLibraryPackage")
diff --git a/test/deepseek-analysis-input.test.js b/test/deepseek-analysis-input.test.js
index 376c284..60b6555 100644
--- a/test/deepseek-analysis-input.test.js
+++ b/test/deepseek-analysis-input.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { analyzeTextDetailedWithDeepSeek } from "../deepseek.js";
-import { createFixedFacetCatalog } from "../tag-taxonomy.js";
+import { analyzeTextDetailedWithDeepSeek } from "../extension/deepseek.js";
+import { createFixedFacetCatalog } from "../extension/tag-taxonomy.js";
test("detail text analysis sends the canonical primary-image prompt to DeepSeek", async () => {
const requests = [];
diff --git a/test/detail-quick-organize-ui.test.js b/test/detail-quick-organize-ui.test.js
index c6ce9d0..6c2834c 100644
--- a/test/detail-quick-organize-ui.test.js
+++ b/test/detail-quick-organize-ui.test.js
@@ -2,10 +2,10 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
-const css = await readFile(new URL("../library.css", import.meta.url), "utf8");
-const foundation = await readFile(new URL("../ui-foundation.css", import.meta.url), "utf8");
-const tagEditor = await readFile(new URL("../tag-editor.js", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+const css = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
+const foundation = await readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8");
+const tagEditor = await readFile(new URL("../extension/tag-editor.js", import.meta.url), "utf8");
const quickOrganizer = source.slice(
source.indexOf("function createDetailQuickOrganization"),
diff --git a/test/dialog-layout.test.js b/test/dialog-layout.test.js
index 1f1f5e6..978a653 100644
--- a/test/dialog-layout.test.js
+++ b/test/dialog-layout.test.js
@@ -3,7 +3,7 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
test("fieldless confirmations do not render an empty body or permanent status band", async () => {
- const source = await readFile(new URL("../ui-dialogs.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/ui-dialogs.js", import.meta.url), "utf8");
assert.match(source, /if \(controls\.size \|\| body\.childElementCount\) form\.append\(body\)/);
assert.match(source, /typeof options\.renderBody === "function"/);
assert.match(source, /const ensureStatus = \(\) =>/);
@@ -12,8 +12,8 @@ test("fieldless confirmations do not render an empty body or permanent status ba
test("AI settings use full-width task and service views instead of a cramped split pane", async () => {
const [html, css] = await Promise.all([
- readFile(new URL("../library.html", import.meta.url), "utf8"),
- readFile(new URL("../library.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.css", import.meta.url), "utf8")
]);
assert.match(html, /data-ai-routing-tab="tasks"[^>]*aria-selected="true"/);
@@ -26,7 +26,7 @@ test("AI settings use full-width task and service views instead of a cramped spl
});
test("AI configuration dialogs keep dirty credentials open until the user explicitly confirms discard", async () => {
- const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const providerDialog = source.slice(
source.indexOf("async function openAiProviderDialog"),
source.indexOf("function providerCategoryLabel")
@@ -42,7 +42,7 @@ test("AI configuration dialogs keep dirty credentials open until the user explic
});
test("connected service summaries omit internal verification chatter", async () => {
- const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const summary = source.slice(
source.indexOf("function providerCatalogLabel"),
source.indexOf("async function openAiTaskAssignmentDialog")
@@ -52,7 +52,7 @@ test("connected service summaries omit internal verification chatter", async ()
});
test("every model catalog refresh applies the complete AI configuration response", async () => {
- const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const refreshOne = source.slice(
source.indexOf("async function refreshAiProviderModels"),
source.indexOf("async function refreshAiModelCatalogsForSession")
@@ -69,8 +69,8 @@ test("every model catalog refresh applies the complete AI configuration response
test("video detail sizes from media dimensions and separates native controls from app actions", async () => {
const [source, css] = await Promise.all([
- readFile(new URL("../library.js", import.meta.url), "utf8"),
- readFile(new URL("../library.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.css", import.meta.url), "utf8")
]);
assert.match(source, /localVideo\.videoWidth/);
assert.match(css, /is-video-detail\.is-immersive \{ height: auto/);
diff --git a/test/document-ingestion.test.js b/test/document-ingestion.test.js
index 3078617..7d9877f 100644
--- a/test/document-ingestion.test.js
+++ b/test/document-ingestion.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { ingestLocalDocument } from "../document-ingestion.js";
-import { detectLocalMediaFile, prepareLocalMedia } from "../local-media.js";
+import { ingestLocalDocument } from "../extension/document-ingestion.js";
+import { detectLocalMediaFile, prepareLocalMedia } from "../extension/local-media.js";
const parseHtml = (source) => ({ body: source, querySelectorAll: () => [] });
const toMarkdown = (source) => String(source)
diff --git a/test/e2e_support.py b/test/e2e_support.py
index f3c176e..149d76c 100644
--- a/test/e2e_support.py
+++ b/test/e2e_support.py
@@ -11,7 +11,7 @@ from typing import Iterator
from playwright.sync_api import BrowserContext, Page, Playwright, sync_playwright
-SOURCE_EXTENSION_DIR = Path(__file__).resolve().parents[1]
+SOURCE_EXTENSION_DIR = Path(__file__).resolve().parents[1] / "extension"
EXTENSION_DIR = Path(
os.environ.get("PROMPTDIRECTOR_E2E_EXTENSION_DIR", str(SOURCE_EXTENSION_DIR))
).resolve()
diff --git a/test/entry-time.test.js b/test/entry-time.test.js
index 29b76a7..32ff872 100644
--- a/test/entry-time.test.js
+++ b/test/entry-time.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { buildEntry } from "../lib.js";
+import { buildEntry } from "../extension/lib.js";
test("a new case keeps source save time separate from when it joined this library", () => {
const entry = buildEntry({
diff --git a/test/extension-package-variants.test.js b/test/extension-package-variants.test.js
index 8e93c5e..0dbbe86 100644
--- a/test/extension-package-variants.test.js
+++ b/test/extension-package-variants.test.js
@@ -30,9 +30,9 @@ test("hash runtime packages remain acceptable to installed updaters and hash str
const { join } = await import("node:path");
const { pathToFileURL } = await import("node:url");
const { createHash } = await import("node:crypto");
- const { isExtensionProgramPath } = await import("../local-extension-upgrade.js");
- const names = ["blob-digest.js", "THIRD_PARTY_NOTICES.md", ...(await readdir(new URL("../vendor/noble-hashes/", import.meta.url))).map(name => `vendor/noble-hashes/${name}`)];
- const input = await Promise.all(names.map(async name => ({ name, data: await readFile(new URL(`../${name}`, import.meta.url)) })));
+ const { isExtensionProgramPath } = await import("../extension/local-extension-upgrade.js");
+ const names = ["blob-digest.js", "THIRD_PARTY_NOTICES.md", ...(await readdir(new URL("../extension/vendor/noble-hashes/", import.meta.url))).map(name => `vendor/noble-hashes/${name}`)];
+ const input = await Promise.all(names.map(async name => ({ name, data: await readFile(new URL(name === "THIRD_PARTY_NOTICES.md" ? `../${name}` : `../extension/${name}`, import.meta.url)) })));
for (const release of [false, true]) {
const packaged = packageRuntimeFiles(input, { release });
for (const file of packaged) assert.ok(isExtensionProgramPath(file.name), `Old updater rejects ${file.name}`);
diff --git a/test/extension-update-ui.test.js b/test/extension-update-ui.test.js
index c425248..49909ec 100644
--- a/test/extension-update-ui.test.js
+++ b/test/extension-update-ui.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import { load } from "cheerio";
-const root = new URL("../", import.meta.url);
+const root = new URL("../extension/", import.meta.url);
const [html, source, local] = await Promise.all(["library.html", "library.js", "local-extension-upgrade-ui.js"].map(path => readFile(new URL(path, root), "utf8")));
const $ = load(html);
diff --git a/test/extension-update.test.js b/test/extension-update.test.js
index 65718c9..64d816f 100644
--- a/test/extension-update.test.js
+++ b/test/extension-update.test.js
@@ -11,7 +11,7 @@ import {
githubLatestReleaseUrl,
parseExtensionVersion,
releaseVersionFromUrl
-} from "../extension-update.js";
+} from "../extension/extension-update.js";
// Installation metadata is explicit in the test adapter; production uses getSelf().
function createExtensionUpdateLifecycle(options) {
@@ -249,7 +249,7 @@ test("successful store installation clears the applied reminder and records the
});
test("background wires update events and the public message protocol", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
assert.match(source, /chrome\.runtime\.onUpdateAvailable\.addListener/u);
assert.match(source, /chrome\.runtime\.onStartup\.addListener/u);
for (const type of [
diff --git a/test/facet-history.test.js b/test/facet-history.test.js
index 5ca7ae0..35acb25 100644
--- a/test/facet-history.test.js
+++ b/test/facet-history.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { FACET_UNDO_LIMIT, appendFacetUndo, facetUndoCount, normalizeFacetUndoHistory, undoFacetHistory } from "../facet-history.js";
-import { applyFacetChange, createDefaultFacetCatalog, createEmptyFacetCatalog, createFacet, previewFacetChange } from "../facets.js";
+import { FACET_UNDO_LIMIT, appendFacetUndo, facetUndoCount, normalizeFacetUndoHistory, undoFacetHistory } from "../extension/facet-history.js";
+import { applyFacetChange, createDefaultFacetCatalog, createEmptyFacetCatalog, createFacet, previewFacetChange } from "../extension/facets.js";
test("consecutive dimension archives can be undone one step at a time", () => {
let catalog = createFacet(createEmptyFacetCatalog(), { id: "facet:mood", name: "情绪" });
diff --git a/test/facets.test.js b/test/facets.test.js
index ea8c07e..0182a48 100644
--- a/test/facets.test.js
+++ b/test/facets.test.js
@@ -12,7 +12,7 @@ import {
recoverFullyArchivedFacets,
restoreArchivedFacets,
restoreArchivedNodes
-} from "../facets.js";
+} from "../extension/facets.js";
test("generic facet operations remain testable without changing the fixed product default", () => {
let catalog = createEmptyFacetCatalog();
diff --git a/test/higgsfield-capture.test.js b/test/higgsfield-capture.test.js
index 65795b4..544d9db 100644
--- a/test/higgsfield-capture.test.js
+++ b/test/higgsfield-capture.test.js
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { collectPageCaptureSitePayload, normalizePageCaptureSitePayload } from "../page-capture-site-adapters.js";
+import { collectPageCaptureSitePayload, normalizePageCaptureSitePayload } from "../extension/page-capture-site-adapters.js";
// Reduced regression fixtures mirror the public page schemas observed on 2026-09-05.
// Text/IDs are test data, not snapshots or live-site acceptance evidence.
@@ -63,7 +63,7 @@ test("detail pages never substitute a recommended project's structured data", ()
});
test("recognized articles preserve every chapter and short conclusion through repeated normalization", async () => {
- const { normalizePageCaptureCandidate } = await import('../page-capture.js');
+ const { normalizePageCaptureCandidate } = await import('../extension/page-capture.js');
const chapters = Array.from({length: 12}, (_, index) => [
{kind: 'heading', text: `Chapter ${index + 1}`, sourceOrder: index * 2},
{kind: 'paragraph', text: `Short observation ${index + 1}.`, sourceOrder: index * 2 + 1}
@@ -74,7 +74,7 @@ test("recognized articles preserve every chapter and short conclusion through re
});
test("pending embedded media remains visible to the save path after batch normalization", async () => {
- const { normalizePageCaptureBatch, applyPageCaptureSelections } = await import('../page-capture.js');
+ const { normalizePageCaptureBatch, applyPageCaptureSelections } = await import('../extension/page-capture.js');
const candidate = {id:'pending-test', canonicalUrl:projectUrl,title:'Test article',contentText:'Test text',pageType:'article',media:[{id:'image',kind:'image',url:imageUrls[0],placement:'inline'}],extraction:{pendingMediaCount:1},completeness:'partial'};
const batch = normalizePageCaptureBatch({candidates:[candidate],selections:[{candidateId:candidate.id,includeText:true,selectedMediaIds:['image'],mediaDecision:'confirmed'}]});
assert.equal(applyPageCaptureSelections(batch)[0].extraction.pendingMediaCount,1);
diff --git a/test/i18n.test.js b/test/i18n.test.js
index 456b568..23e71a6 100644
--- a/test/i18n.test.js
+++ b/test/i18n.test.js
@@ -2,18 +2,18 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-import { hasEnglishTranslation, translateForLocale } from "../i18n.js";
+import { hasEnglishTranslation, translateForLocale } from "../extension/i18n.js";
test("manifest locale catalogs expose the same message keys", async () => {
const [zh, en] = await Promise.all([
- readJson("../_locales/zh_CN/messages.json"),
- readJson("../_locales/en/messages.json")
+ readJson("../extension/_locales/zh_CN/messages.json"),
+ readJson("../extension/_locales/en/messages.json")
]);
assert.deepEqual(Object.keys(en).sort(), Object.keys(zh).sort());
});
test("every static HTML i18n marker has an English translation", async () => {
- for (const path of ["../collector.html", "../library.html", "../composer.html", "../skills.html", "../curated.html", "../curated-skills.html"]) {
+ for (const path of ["../extension/collector.html", "../extension/library.html", "../extension/composer.html", "../extension/skills.html", "../extension/curated.html", "../extension/curated-skills.html"]) {
const html = await readFile(new URL(path, import.meta.url), "utf8");
const keys = [...html.matchAll(/data-i18n(?:-placeholder|-aria-label|-title)?="([^"]+)"/g)].map((match) => match[1]);
const missing = [...new Set(keys.filter((key) => !hasEnglishTranslation(key)))];
@@ -22,7 +22,7 @@ test("every static HTML i18n marker has an English translation", async () => {
});
test("product pages do not leave Chinese interface text outside the translation system", async () => {
- for (const path of ["../collector.html", "../library.html", "../composer.html", "../skills.html", "../curated.html", "../curated-skills.html"]) {
+ for (const path of ["../extension/collector.html", "../extension/library.html", "../extension/composer.html", "../extension/skills.html", "../extension/curated.html", "../extension/curated-skills.html"]) {
const html = await readFile(new URL(path, import.meta.url), "utf8");
const unmarkedText = [];
for (const match of html.matchAll(/>([^<>]*[\p{Script=Han}][^<>]*)</gu)) {
@@ -43,7 +43,7 @@ test("product pages do not leave Chinese interface text outside the translation
});
test("dynamic interface helpers only receive Chinese copy with an English translation", async () => {
- const paths = ["../library.js", "../composer-page.js", "../skills-page.js", "../collector.js", "../collector-page-capture-view.js", "../curated-page.js", "../ui-dialogs.js", "../tag-editor.js", "../local-extension-upgrade-ui.js"];
+ const paths = ["../extension/library.js", "../extension/composer-page.js", "../extension/skills-page.js", "../extension/collector.js", "../extension/collector-page-capture-view.js", "../extension/curated-page.js", "../extension/ui-dialogs.js", "../extension/tag-editor.js", "../extension/local-extension-upgrade-ui.js"];
const missing = [];
for (const path of paths) {
const source = await readFile(new URL(path, import.meta.url), "utf8");
@@ -51,7 +51,7 @@ test("dynamic interface helpers only receive Chinese copy with an English transl
const key = JSON.parse(`"${match[1]}"`);
if (/\p{Script=Han}/u.test(key) && !hasEnglishTranslation(key)) missing.push(`${path}: ${key}`);
}
- if (!["../library.js", "../composer-page.js"].includes(path)) continue;
+ if (!["../extension/library.js", "../extension/composer-page.js"].includes(path)) continue;
for (const line of source.split("\n").filter((value) => value.includes("textEl("))) {
for (const match of line.matchAll(/"((?:[^"\\]|\\.)*)"/gu)) {
const key = JSON.parse(`"${match[1]}"`);
@@ -96,9 +96,9 @@ test("collector runtime states and destructive draft actions have English copy",
test("collector routes dynamic system text through the shared translation boundary", async () => {
const [collector, background, library] = await Promise.all([
- readFile(new URL("../collector.js", import.meta.url), "utf8"),
- readFile(new URL("../background.js", import.meta.url), "utf8"),
- readFile(new URL("../library.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/collector.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8")
]);
assert.match(collector, /const value = translateUiMessage\(message \|\| ""\)/);
assert.match(collector, /item\.customized \? item\.name : t\(item\.name\)/);
diff --git a/test/image-metadata.test.js b/test/image-metadata.test.js
index 9cd1816..3653b49 100644
--- a/test/image-metadata.test.js
+++ b/test/image-metadata.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { readImageDimensions } from "../image-metadata.js";
+import { readImageDimensions } from "../extension/image-metadata.js";
test("image dimensions are read from headers before browser decoding", async () => {
const png = new Uint8Array(24);
diff --git a/test/image-prompt.test.js b/test/image-prompt.test.js
index 7162cf9..eb94cf7 100644
--- a/test/image-prompt.test.js
+++ b/test/image-prompt.test.js
@@ -5,7 +5,7 @@ import {
promptForEntryImage,
validReconstructionPrompt,
visualAnalysisPromptReplacement
-} from "../image-prompt.js";
+} from "../extension/image-prompt.js";
const fingerprint = "a".repeat(64);
diff --git a/test/image-transaction.test.js b/test/image-transaction.test.js
index 75cbb31..a55008c 100644
--- a/test/image-transaction.test.js
+++ b/test/image-transaction.test.js
@@ -5,7 +5,7 @@ import { readFile } from "node:fs/promises";
import {
commitMetadataThenDeleteImages,
replaceImagesWithRollback
-} from "../image-transaction.js";
+} from "../extension/image-transaction.js";
test("metadata failure never deletes referenced images", async () => {
const deleted = [];
@@ -100,7 +100,7 @@ async function* replacements(values) {
}
test("case deletion retains blobs in trash while creative-output deletion still uses metadata-first cleanup", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const caseStart = source.indexOf("async function deleteEntry(entryId)");
const caseBlock = source.slice(caseStart, source.indexOf("async function deleteCollectionWithEntries", caseStart));
assert.match(caseBlock, /moveEntryBatchToTrash/);
@@ -113,7 +113,7 @@ test("case deletion retains blobs in trash while creative-output deletion still
});
test("external Skill deletion commits metadata before cleaning package files", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const start = source.indexOf("async function deleteCreativeSkillAction(skillId)");
const block = source.slice(start, source.indexOf("async function getComposerSession", start));
assert.ok(block.indexOf("await commitLocalChanges") < block.indexOf("await deleteMediaBlobs"));
@@ -121,7 +121,7 @@ test("external Skill deletion commits metadata before cleaning package files", a
});
test("page capture never deletes committed media when a post-commit action fails", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const start = source.indexOf("async function commitPageCapture(");
const block = source.slice(start, source.indexOf("async function startCaptureForCase", start));
assert.match(block, /metadataCommitted = true/);
@@ -130,14 +130,14 @@ test("page capture never deletes committed media when a post-commit action fails
});
test("temporary composer assets are tracked before derived data can fail", async () => {
- const source = await readFile(new URL("../composer-page.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8");
const start = source.indexOf("async function addTempReferences");
const block = source.slice(start, source.indexOf("async function removeTempReference", start));
assert.ok(block.indexOf("savedAssetIds.push(assetId)") < block.indexOf("await saveDerivedMedia"));
});
test("creative video posters roll back only before their metadata commit", async () => {
- const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
const start = source.indexOf("async function saveCreativeOutputToLibrary");
const block = source.slice(start, source.indexOf("async function updateCreativeSignal", start));
assert.match(block, /posterAssetId = posterId/);
diff --git a/test/import-jobs.test.js b/test/import-jobs.test.js
index 1b5584e..b045208 100644
--- a/test/import-jobs.test.js
+++ b/test/import-jobs.test.js
@@ -8,7 +8,7 @@ import {
retryImportJob,
normalizeImportJobsState,
undoImportJob
-} from "../import-jobs.js";
+} from "../extension/import-jobs.js";
test("browser restart requeues only unfinished local import items", () => {
const state = normalizeImportJobsState({
diff --git a/test/import-staging.test.js b/test/import-staging.test.js
index 7019ec5..258adf4 100644
--- a/test/import-staging.test.js
+++ b/test/import-staging.test.js
@@ -8,8 +8,8 @@ import {
normalizeImportStagingState,
removeStagedAsset,
stagedAssetMediaRecord
-} from "../import-staging.js";
-import { normalizeMediaAsset } from "../media.js";
+} from "../extension/import-staging.js";
+import { normalizeMediaAsset } from "../extension/media.js";
test("import staging persists only resumable metadata and safe relative paths", () => {
const result = addStagedAsset({}, {
diff --git a/test/import-ui.test.js b/test/import-ui.test.js
index 8ac0109..5960a52 100644
--- a/test/import-ui.test.js
+++ b/test/import-ui.test.js
@@ -2,10 +2,10 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
-const css = await readFile(new URL("../library.css", import.meta.url), "utf8");
-const js = await readFile(new URL("../library.js", import.meta.url), "utf8");
-const tagEditor = await readFile(new URL("../tag-editor.js", import.meta.url), "utf8");
+const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
+const css = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
+const js = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+const tagEditor = await readFile(new URL("../extension/tag-editor.js", import.meta.url), "utf8");
function rule(source, selector) {
const escaped = selector.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
diff --git a/test/large_library_e2e.py b/test/large_library_e2e.py
index 7efa64d..33cc93d 100644
--- a/test/large_library_e2e.py
+++ b/test/large_library_e2e.py
@@ -10,7 +10,7 @@ from playwright.sync_api import TimeoutError as PlaywrightTimeoutError, sync_pla
from e2e_support import launch_context
-EXTENSION_DIR = Path(__file__).resolve().parents[1]
+EXTENSION_DIR = Path(__file__).resolve().parents[1] / "extension"
def main() -> None:
diff --git a/test/lib.test.js b/test/lib.test.js
index 30ab73c..3517a1f 100644
--- a/test/lib.test.js
+++ b/test/lib.test.js
@@ -14,9 +14,9 @@ import {
normalizeSelection,
renderLibraryJson,
renderMarkdown
-} from "../lib.js";
-import { CONTENT_IDS, SCHEMA_VERSION, createDefaultTaxonomy } from "../taxonomy.js";
-import { createDefaultFacetCatalog, createEmptyFacetCatalog, createFacet, createFacetNode } from "../facets.js";
+} from "../extension/lib.js";
+import { CONTENT_IDS, SCHEMA_VERSION, createDefaultTaxonomy } from "../extension/taxonomy.js";
+import { createDefaultFacetCatalog, createEmptyFacetCatalog, createFacet, createFacetNode } from "../extension/facets.js";
test("normalizeSelection preserves paragraphs while removing copied line noise", () => {
assert.equal(
diff --git a/test/library-asset-inventory.test.js b/test/library-asset-inventory.test.js
index 24cf355..7dc0fb7 100644
--- a/test/library-asset-inventory.test.js
+++ b/test/library-asset-inventory.test.js
@@ -4,7 +4,7 @@ import assert from "node:assert/strict";
import {
libraryStoredAssetIds,
libraryStoredAssets
-} from "../library-asset-inventory.js";
+} from "../extension/library-asset-inventory.js";
test("one library asset inventory covers every durable synced resource without duplicating shared ids", () => {
const shared = { id: "asset:shared", storageMode: "managed" };
diff --git a/test/library-asset-salvage.test.js b/test/library-asset-salvage.test.js
index 00d3bf0..0d2263c 100644
--- a/test/library-asset-salvage.test.js
+++ b/test/library-asset-salvage.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { salvageMissingLibraryAssets } from "../library-asset-salvage.js";
+import { salvageMissingLibraryAssets } from "../extension/library-asset-salvage.js";
test("missing media is isolated across durable library owners while healthy content stays recoverable", () => {
const state = {
diff --git a/test/library-detail-layout.test.js b/test/library-detail-layout.test.js
index a1c3ac7..63748ef 100644
--- a/test/library-detail-layout.test.js
+++ b/test/library-detail-layout.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const cssUrl = new URL("../library.css", import.meta.url);
+const cssUrl = new URL("../extension/library.css", import.meta.url);
function rule(source, selector) {
const escaped = selector.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -70,7 +70,7 @@ test("vision batch choices and compatible capability groups stay compact", async
test("single case details use one scroll surface with a full-width discovery wall", async () => {
const source = await readFile(cssUrl, "utf8");
- const script = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const script = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const drawer = rule(source, ".detail-drawer");
const content = rule(source, ".detail-content");
const primary = rule(source, ".detail-primary");
@@ -100,8 +100,8 @@ test("single case details use one scroll surface with a full-width discovery wal
test("single case navigation is positioned inside the primary case area", async () => {
const source = await readFile(cssUrl, "utf8");
- const script = await readFile(new URL("../library.js", import.meta.url), "utf8");
- const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
+ const script = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+ const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
const stage = rule(source, ".detail-visual-stage");
const navigation = rule(source, ".detail-navigation");
@@ -117,7 +117,7 @@ test("single case navigation is positioned inside the primary case area", async
test("document navigation moves into the top toolbar and long documents use a real scroll surface", async () => {
const source = await readFile(cssUrl, "utf8");
- const script = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const script = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const toolbarNavigation = rule(source, ".drawer-toolbar.has-document-navigation .detail-navigation");
const documentStage = rule(source, ".detail-visual-gallery.is-document-detail .detail-visual-stage");
const documentItem = rule(source, ".detail-visual-gallery.is-document-detail .detail-visual-item");
@@ -136,7 +136,7 @@ test("document navigation moves into the top toolbar and long documents use a re
});
test("text-only posts retain their reader while structured articles show only genuinely unplaced media separately", async () => {
- const script = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const script = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const styles = await readFile(cssUrl, "utf8");
const detail = script.slice(script.indexOf("async function renderDetail"), script.indexOf("function createLocalDiscovery"));
assert.match(detail, /const capturedPost = usesPostReader\(entry\)/);
@@ -152,7 +152,7 @@ test("text-only posts retain their reader while structured articles show only ge
});
test("media switching preserves the detail scroll anchor and locks image stage height", async () => {
- const script = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const script = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const gallery = script.slice(script.indexOf("async function createDetailMediaGallery"), script.indexOf("function refreshActiveDetailAssetSections"));
assert.match(gallery, /lockedImageStageHeight/);
assert.match(gallery, /captureDetailScrollAnchor/);
@@ -170,8 +170,8 @@ test("compound details retain their existing split layout", async () => {
test("case detail shell and transparent media stage follow the active UI theme", async () => {
const source = await readFile(cssUrl, "utf8");
- const foundation = await readFile(new URL("../ui-foundation.css", import.meta.url), "utf8");
- const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
+ const foundation = await readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8");
+ const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
const drawer = rule(source, ".detail-drawer");
const body = rule(source, ".detail-body");
assert.match(foundation, /--viewer-bg:\s*var\(--ui-browser\)/);
@@ -191,8 +191,8 @@ test("case detail shell and transparent media stage follow the active UI theme",
test("case detail supports one remembered right sidebar and forces narrow screens back to fullscreen", async () => {
const source = await readFile(cssUrl, "utf8");
- const script = await readFile(new URL("../library.js", import.meta.url), "utf8");
- const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
+ const script = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+ const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
const sidebar = rule(source, ".detail-drawer.detail-sidebar-mode");
const resizer = rule(source, ".detail-sidebar-mode > .detail-resizer");
const narrow = source.slice(source.indexOf("@media (max-width: 640px)"));
@@ -211,7 +211,7 @@ test("case detail supports one remembered right sidebar and forces narrow screen
});
test("case and media switches invalidate old detail DOM before asynchronous rendering", async () => {
- const script = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const script = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const openDetail = script.slice(script.indexOf("async function openDetail"), script.indexOf("async function closeDetail"));
const closeDetail = script.slice(script.indexOf("async function closeDetail"), script.indexOf("function moveDetail"));
const invalidation = script.slice(script.indexOf("function invalidateDetailContent"), script.indexOf("function createLocalDiscovery"));
@@ -229,7 +229,7 @@ test("case and media switches invalidate old detail DOM before asynchronous rend
});
test("case details open the source beside metadata without starting a capture workflow", async () => {
- const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const metadata = source.slice(source.indexOf("function createDetailMetadata"), source.indexOf("function createFullAnalysis"));
const detail = source.slice(source.indexOf("async function renderDetail"), source.indexOf("function createLocalDiscovery"));
assert.doesNotMatch(source, /PREPARE_SCREENSHOT_RECAPTURE|重新框选截图|继续跨页采集|START_CAPTURE_FOR_CASE|回来源继续采集/);
@@ -241,7 +241,7 @@ test("case details open the source beside metadata without starting a capture wo
});
test("detail editing and core prompt actions stay beside the content they change", async () => {
- const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const styles = await readFile(cssUrl, "utf8");
const header = source.slice(source.indexOf("function createDetailHeader"), source.indexOf("function createComposerAction"));
const prompt = source.slice(source.indexOf("function createPromptSection"), source.indexOf("function createEntryEditor"));
@@ -260,7 +260,7 @@ test("detail editing and core prompt actions stay beside the content they change
});
test("video detail exposes one reverse-prompt action and no history or per-run prompt controls", async () => {
- const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const workspace = source.slice(
source.indexOf("function createVideoAnalysisWorkspace"),
source.indexOf("function createVideoAnalysisTaskStatus")
diff --git a/test/library-export-plan.test.js b/test/library-export-plan.test.js
index 9232490..eb854d7 100644
--- a/test/library-export-plan.test.js
+++ b/test/library-export-plan.test.js
@@ -8,7 +8,7 @@ import {
inspectFolderBackupEnvelope,
verifyFolderBackupCompletion,
verifyFolderRescueCompletion
-} from "../library-export-plan.js";
+} from "../extension/library-export-plan.js";
test("folder completion is written from actual files and rejects later byte changes", async () => {
const files = new Map([
diff --git a/test/library-export-zip.test.js b/test/library-export-zip.test.js
index e105f7b..6bab556 100644
--- a/test/library-export-zip.test.js
+++ b/test/library-export-zip.test.js
@@ -1,12 +1,12 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createVerifiedLibraryZip } from "../library-export-zip.js";
-import { renderLibraryJson } from "../lib.js";
-import { parseLibraryPackage } from "../library-package.js";
-import { createArchiveUrl } from "../offscreen.js";
-import { readZipBlob, createZipBlob } from "../zip.js";
-import { PORTABLE_LIBRARY_LIMITS } from "../resource-limits.js";
+import { createVerifiedLibraryZip } from "../extension/library-export-zip.js";
+import { renderLibraryJson } from "../extension/lib.js";
+import { parseLibraryPackage } from "../extension/library-package.js";
+import { createArchiveUrl } from "../extension/offscreen.js";
+import { readZipBlob, createZipBlob } from "../extension/zip.js";
+import { PORTABLE_LIBRARY_LIMITS } from "../extension/resource-limits.js";
test("downloaded Skill archives survive case export and import unchanged as inert attachments", async () => {
const skill = await createZipBlob([{ name: "fixture/SKILL.md", data: "# Fixture\nOriginal skill bytes." }]);
diff --git a/test/library-first-paint.test.js b/test/library-first-paint.test.js
index 61c1d93..c9b5f72 100644
--- a/test/library-first-paint.test.js
+++ b/test/library-first-paint.test.js
@@ -3,9 +3,9 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
const [html, source, styles] = await Promise.all([
- readFile(new URL("../library.html", import.meta.url), "utf8"),
- readFile(new URL("../library.js", import.meta.url), "utf8"),
- readFile(new URL("../library.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.css", import.meta.url), "utf8")
]);
test("first paint shows one stable loading shell without fake library counts", () => {
diff --git a/test/library-import-background.test.js b/test/library-import-background.test.js
index 7b047da..500aa01 100644
--- a/test/library-import-background.test.js
+++ b/test/library-import-background.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
+const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
test("library import commits business data and its completed receipt atomically", () => {
const apply = background.slice(
diff --git a/test/library-import-client.test.js b/test/library-import-client.test.js
index 1af07c6..4532634 100644
--- a/test/library-import-client.test.js
+++ b/test/library-import-client.test.js
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { applyLibraryImportWithReceipt } from "../library-import-client.js";
+import { applyLibraryImportWithReceipt } from "../extension/library-import-client.js";
const message = { operationId: "fixture-operation", planToken: "fixture-plan" };
const result = { ok: true, recoveryPointCreatedAt: "fixture-date" };
const receipt = { ...message, status: "completed", result };
diff --git a/test/library-import-dedup.test.js b/test/library-import-dedup.test.js
index 9a93722..0f6e863 100644
--- a/test/library-import-dedup.test.js
+++ b/test/library-import-dedup.test.js
@@ -1,9 +1,9 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { mergeLibraryPackage } from "../library-package.js";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { CONTENT_IDS, createDefaultTaxonomy } from "../taxonomy.js";
+import { mergeLibraryPackage } from "../extension/library-package.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { CONTENT_IDS, createDefaultTaxonomy } from "../extension/taxonomy.js";
function portablePackage(entries) {
return {
diff --git a/test/library-import-dialog.test.js b/test/library-import-dialog.test.js
index 8cf9892..68abfea 100644
--- a/test/library-import-dialog.test.js
+++ b/test/library-import-dialog.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { buildLibraryImportReport } from "../library-import-dialog.js";
+import { buildLibraryImportReport } from "../extension/library-import-dialog.js";
test("import report separates created, identical, repaired, and skipped results", () => {
const report = buildLibraryImportReport({
diff --git a/test/library-import-media.test.js b/test/library-import-media.test.js
index 725b081..c65b6e1 100644
--- a/test/library-import-media.test.js
+++ b/test/library-import-media.test.js
@@ -4,7 +4,7 @@ import assert from "node:assert/strict";
import {
filesWithoutInvalidLibraryImages,
findInvalidImportedImageIds
-} from "../library-import-media.js";
+} from "../extension/library-import-media.js";
test("shared ZIP validation reports every undecodable image instead of stopping at the first one", async () => {
const good = new Blob(["good"], { type: "image/webp" });
diff --git a/test/library-import-transaction.test.js b/test/library-import-transaction.test.js
index db2c1b0..37c5f8b 100644
--- a/test/library-import-transaction.test.js
+++ b/test/library-import-transaction.test.js
@@ -8,7 +8,7 @@ import {
failLibraryImportTransaction,
normalizeLibraryImportTransactionsState,
succeedLibraryImportTransaction
-} from "../library-import-transaction.js";
+} from "../extension/library-import-transaction.js";
test("plan tokens ignore sync status, undo, and job noise but still react to live library changes", () => {
const source = makeImportSource();
diff --git a/test/library-interaction-regressions.test.js b/test/library-interaction-regressions.test.js
index 0b8413e..782cd02 100644
--- a/test/library-interaction-regressions.test.js
+++ b/test/library-interaction-regressions.test.js
@@ -3,13 +3,13 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
const [library, html, css, background, composerHtml, composerCss, i18n] = await Promise.all([
- readFile(new URL("../library.js", import.meta.url), "utf8"),
- readFile(new URL("../library.html", import.meta.url), "utf8"),
- readFile(new URL("../library.css", import.meta.url), "utf8"),
- readFile(new URL("../background.js", import.meta.url), "utf8"),
- readFile(new URL("../composer.html", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.css", import.meta.url), "utf8"),
- readFile(new URL("../i18n.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/i18n.js", import.meta.url), "utf8")
]);
test("project visibility uses the clicked control and updates the wall without a redundant reload", () => {
diff --git a/test/library-large-e2e.py b/test/library-large-e2e.py
index 312c7b9..ca34c81 100644
--- a/test/library-large-e2e.py
+++ b/test/library-large-e2e.py
@@ -7,7 +7,7 @@ from pathlib import Path
from playwright.sync_api import expect, sync_playwright
-EXTENSION_DIR = Path(__file__).resolve().parents[1]
+EXTENSION_DIR = Path(__file__).resolve().parents[1] / "extension"
ENTRY_COUNT = 6_000
diff --git a/test/library-large-safety.test.js b/test/library-large-safety.test.js
index 05ed6db..30af31e 100644
--- a/test/library-large-safety.test.js
+++ b/test/library-large-safety.test.js
@@ -2,9 +2,9 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
-const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
-const styles = await readFile(new URL("../library.css", import.meta.url), "utf8");
+const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
+const styles = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
test("current libraries bypass whole-library migration and normalization on every read", () => {
const readState = background.slice(background.indexOf("async function readState()"), background.indexOf("async function readComposerSessions"));
diff --git a/test/library-maintenance.test.js b/test/library-maintenance.test.js
index 4c3dafc..81f233f 100644
--- a/test/library-maintenance.test.js
+++ b/test/library-maintenance.test.js
@@ -12,7 +12,7 @@ import {
pauseLibraryMaintenance,
resumeLibraryMaintenance,
retryLibraryMaintenanceFailures
-} from "../library-maintenance.js";
+} from "../extension/library-maintenance.js";
test("full-library maintenance stores compact cursors and reports monotonic progress", () => {
let job = createLibraryMaintenanceJob({
diff --git a/test/library-model.test.js b/test/library-model.test.js
index 94ce72e..8413656 100644
--- a/test/library-model.test.js
+++ b/test/library-model.test.js
@@ -2,9 +2,9 @@ import test from "node:test";
import assert from "node:assert/strict";
import { performance } from "node:perf_hooks";
-import { createDefaultFacetCatalog, createEmptyFacetCatalog, createFacet, createFacetNode } from "../facets.js";
-import { entryAttributeSummary, entrySourceMetadataRows, filterEntries } from "../library-model.js";
-import { CONTENT_IDS } from "../taxonomy.js";
+import { createDefaultFacetCatalog, createEmptyFacetCatalog, createFacet, createFacetNode } from "../extension/facets.js";
+import { entryAttributeSummary, entrySourceMetadataRows, filterEntries } from "../extension/library-model.js";
+import { CONTENT_IDS } from "../extension/taxonomy.js";
test("library filters use OR inside a facet, AND across facets, and include child tags through parents", () => {
let catalog = createFacet(createEmptyFacetCatalog(), { id: "facet:mood", name: "画面情绪" });
diff --git a/test/library-navigation.test.js b/test/library-navigation.test.js
index c009e35..245626e 100644
--- a/test/library-navigation.test.js
+++ b/test/library-navigation.test.js
@@ -2,8 +2,8 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
-const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
+const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
test("top navigation keeps search-adjacent actions focused on adding, creating, and settings", () => {
const actions = html.slice(html.indexOf('<div class="top-actions">'), html.indexOf('<input id="media-file"'));
@@ -27,7 +27,7 @@ test("top navigation keeps search-adjacent actions focused on adding, creating,
test("about details are on demand while version stays at the bottom of general settings", async () => {
const about = html.slice(html.indexOf('<footer class="settings-about"'), html.indexOf("</footer>", html.indexOf('<footer class="settings-about"')));
- const script = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const script = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
assert.match(about, /id="about-version">PromptDirector</);
assert.match(about, /id="open-about"/);
assert.doesNotMatch(about, /Apache-2\.0|github\.com/);
@@ -37,7 +37,7 @@ test("about details are on demand while version stays at the bottom of general s
});
test("closed dialogs cannot enter the page layout", async () => {
- const css = await readFile(new URL("../ui-foundation.css", import.meta.url), "utf8");
+ const css = await readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8");
assert.match(css, /dialog:not\(\[open\]\)\s*\{\s*display:\s*none\s*!important/);
});
@@ -53,7 +53,7 @@ test("sidebar separates projects, content types, and on-demand attribute filters
});
test("desktop sidebar width is adjustable and persists as a bounded UI preference", async () => {
- const css = await readFile(new URL("../library.css", import.meta.url), "utf8");
+ const css = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
assert.match(html, /id="sidebar-resizer"[^>]*role="separator"[^>]*tabindex="0"/);
assert.match(css, /grid-template-columns: var\(--sidebar-width, 244px\) 6px minmax\(0, 1fr\)/);
assert.match(css, /@media \(max-width: 900px\)[\s\S]*?\.sidebar-resizer \{ display: none; \}/);
@@ -106,7 +106,7 @@ test("classification manager keeps taxonomy work while settings owns AI services
});
test("collector opens a new library tab and disables the side panel for that tab", async () => {
- const collector = await readFile(new URL("../collector.js", import.meta.url), "utf8");
+ const collector = await readFile(new URL("../extension/collector.js", import.meta.url), "utf8");
assert.match(collector, /chrome\.tabs\.create\(\{\s*url:\s*chrome\.runtime\.getURL\("library\.html"\),\s*active:\s*false\s*\}\)/);
assert.match(collector, /chrome\.sidePanel\?\.setOptions\?\.\(\{\s*tabId:\s*tab\.id,\s*enabled:\s*false\s*\}\)/);
assert.match(collector, /chrome\.tabs\.update\(tab\.id,\s*\{\s*active:\s*true\s*\}\)/);
@@ -115,8 +115,8 @@ test("collector opens a new library tab and disables the side panel for that tab
test("Skill details keep creation primary and place refine and export in one More menu", async () => {
const [skillsHtml, skillsSource] = await Promise.all([
- readFile(new URL("../skills.html", import.meta.url), "utf8"),
- readFile(new URL("../skills-page.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/skills.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/skills-page.js", import.meta.url), "utf8")
]);
assert.match(skillsHtml, /id="skill-detail-more"/);
assert.match(skillsHtml, /id="skill-export"/);
diff --git a/test/library-package-compatibility.test.js b/test/library-package-compatibility.test.js
index a16cb7f..77c89fc 100644
--- a/test/library-package-compatibility.test.js
+++ b/test/library-package-compatibility.test.js
@@ -2,10 +2,10 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-import { CURRENT_LIBRARY_PACKAGE_VERSION } from "../library-package-format.js";
-import { prepareLibraryPackageDraft } from "../library-package-migrations.js";
-import { mergeLibraryPackage, parseLibraryPackage } from "../library-package.js";
-import { SCHEMA_VERSION } from "../taxonomy.js";
+import { CURRENT_LIBRARY_PACKAGE_VERSION } from "../extension/library-package-format.js";
+import { prepareLibraryPackageDraft } from "../extension/library-package-migrations.js";
+import { mergeLibraryPackage, parseLibraryPackage } from "../extension/library-package.js";
+import { SCHEMA_VERSION } from "../extension/taxonomy.js";
const fixtureRoot = new URL("./fixtures/compat/", import.meta.url);
diff --git a/test/library-package-contract.test.js b/test/library-package-contract.test.js
index 7b3fe9e..b90722b 100644
--- a/test/library-package-contract.test.js
+++ b/test/library-package-contract.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { normalizePortableMediaDescriptor } from "../library-package-contract.js";
+import { normalizePortableMediaDescriptor } from "../extension/library-package-contract.js";
test("jpeg and jpg aliases normalize to the actual portable path without changing the image format", () => {
const normalized = normalizePortableMediaDescriptor({
diff --git a/test/library-package-migrations.test.js b/test/library-package-migrations.test.js
index 86115e0..556958d 100644
--- a/test/library-package-migrations.test.js
+++ b/test/library-package-migrations.test.js
@@ -1,9 +1,9 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { prepareLibraryPackageDraft } from "../library-package-migrations.js";
-import { SCHEMA_VERSION, createDefaultTaxonomy } from "../taxonomy.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { prepareLibraryPackageDraft } from "../extension/library-package-migrations.js";
+import { SCHEMA_VERSION, createDefaultTaxonomy } from "../extension/taxonomy.js";
test("dangling AI assignments are discarded while the case and durable visual analysis survive", () => {
const result = prepareLibraryPackageDraft(packageValue(5, [entry("case:analysis", {
diff --git a/test/library-package-salvage.test.js b/test/library-package-salvage.test.js
index aff7034..1e92488 100644
--- a/test/library-package-salvage.test.js
+++ b/test/library-package-salvage.test.js
@@ -1,11 +1,11 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { mergeLibraryPackage, parseCompleteFolderBackup, parseLibraryPackage } from "../library-package.js";
-import { SCHEMA_VERSION, createDefaultTaxonomy } from "../taxonomy.js";
-import { restoreTrashItems } from "../trash.js";
-import { createComposerSession } from "../composer.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { mergeLibraryPackage, parseCompleteFolderBackup, parseLibraryPackage } from "../extension/library-package.js";
+import { SCHEMA_VERSION, createDefaultTaxonomy } from "../extension/taxonomy.js";
+import { restoreTrashItems } from "../extension/trash.js";
+import { createComposerSession } from "../extension/composer.js";
test("salvage mode drops one missing media file without blocking recoverable cases", () => {
const source = packageValue([
diff --git a/test/library-package.test.js b/test/library-package.test.js
index 86154a7..9edbc91 100644
--- a/test/library-package.test.js
+++ b/test/library-package.test.js
@@ -8,11 +8,11 @@ import {
projectPackageEntryIds,
selectLibraryPackage,
selectProjectPackage
-} from "../library-package.js";
-import { createDefaultFacetCatalog, createFacet, createFacetNode } from "../facets.js";
-import { CONTENT_IDS, CONTENT_ROLES, SCHEMA_VERSION, createContentType, createDefaultTaxonomy } from "../taxonomy.js";
-import { COMPOSER_METHOD_VERSION, createComposerSession, normalizeComposerSettings } from "../composer.js";
-import { createZipBlob, readZipBlob } from "../zip.js";
+} from "../extension/library-package.js";
+import { createDefaultFacetCatalog, createFacet, createFacetNode } from "../extension/facets.js";
+import { CONTENT_IDS, CONTENT_ROLES, SCHEMA_VERSION, createContentType, createDefaultTaxonomy } from "../extension/taxonomy.js";
+import { COMPOSER_METHOD_VERSION, createComposerSession, normalizeComposerSettings } from "../extension/composer.js";
+import { createZipBlob, readZipBlob } from "../extension/zip.js";
function packageData(entries, facetCatalog) {
return {
diff --git a/test/library-permission-settings.test.js b/test/library-permission-settings.test.js
index 342459e..4346064 100644
--- a/test/library-permission-settings.test.js
+++ b/test/library-permission-settings.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const root = new URL("../", import.meta.url);
+const root = new URL("../extension/", import.meta.url);
const [html, css, js] = await Promise.all([
readFile(new URL("library.html", root), "utf8"),
readFile(new URL("library.css", root), "utf8"),
diff --git a/test/library-recovery-point.test.js b/test/library-recovery-point.test.js
index 96b69ef..e2081cb 100644
--- a/test/library-recovery-point.test.js
+++ b/test/library-recovery-point.test.js
@@ -6,7 +6,7 @@ import {
normalizeLibraryReplacementRecoveryPoint,
obsoleteRecoveryAssetIds,
swapLibraryReplacementRecoveryPoint
-} from "../library-recovery-point.js";
+} from "../extension/library-recovery-point.js";
test("a replacement recovery point snapshots managed state and retained media without sharing references", () => {
const current = managedState("local");
diff --git a/test/library-search-surface.test.js b/test/library-search-surface.test.js
index e02e830..84500af 100644
--- a/test/library-search-surface.test.js
+++ b/test/library-search-surface.test.js
@@ -4,9 +4,9 @@ import { readFile } from "node:fs/promises";
test("the library exposes one search surface instead of a second sidebar tag search", async () => {
const [html, script, styles] = await Promise.all([
- readFile(new URL("../library.html", import.meta.url), "utf8"),
- readFile(new URL("../library.js", import.meta.url), "utf8"),
- readFile(new URL("../library.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.css", import.meta.url), "utf8")
]);
assert.equal((html.match(/id="search-input"/g) ?? []).length, 1);
diff --git a/test/library-selection.test.js b/test/library-selection.test.js
index 738b147..98f1cf1 100644
--- a/test/library-selection.test.js
+++ b/test/library-selection.test.js
@@ -10,7 +10,7 @@ import {
selectAllFilteredLogicalCases,
setLibraryCaseSelection,
toggleLibraryCaseSelection
-} from "../library-selection.js";
+} from "../extension/library-selection.js";
test("select all uses every filtered logical result rather than the rendered page", () => {
const filteredLogicalCaseIds = Array.from({ length: 73 }, (_, index) => `case:${index + 1}`);
diff --git a/test/library-semantic-identity.test.js b/test/library-semantic-identity.test.js
index 05b3c9a..c22d253 100644
--- a/test/library-semantic-identity.test.js
+++ b/test/library-semantic-identity.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { reconcileLibrarySemanticIdentity } from "../library-semantic-identity.js";
+import { reconcileLibrarySemanticIdentity } from "../extension/library-semantic-identity.js";
test("complete semantic duplicates converge to one stable case and keep every project relationship", () => {
const first = semanticEntry("case:a", "asset:a", "a".repeat(64));
diff --git a/test/library-sorting-ui.test.js b/test/library-sorting-ui.test.js
index 2508d9b..b0799bc 100644
--- a/test/library-sorting-ui.test.js
+++ b/test/library-sorting-ui.test.js
@@ -3,9 +3,9 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
const [html, source, css] = await Promise.all([
- readFile(new URL("../library.html", import.meta.url), "utf8"),
- readFile(new URL("../library.js", import.meta.url), "utf8"),
- readFile(new URL("../library.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.css", import.meta.url), "utf8")
]);
test("library exposes four case sorts and allows project management without a mode switch", () => {
diff --git a/test/library-transfer.test.js b/test/library-transfer.test.js
index d7460c6..2ff73cc 100644
--- a/test/library-transfer.test.js
+++ b/test/library-transfer.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { createDefaultTaxonomy, SCHEMA_VERSION } from "../taxonomy.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { createDefaultTaxonomy, SCHEMA_VERSION } from "../extension/taxonomy.js";
import {
LIBRARY_TRANSFER_MODES,
LIBRARY_TRANSFER_SOURCES,
@@ -10,7 +10,7 @@ import {
libraryTransferWriteBytes,
planLibraryTransfer,
planLibraryTransferBatch
-} from "../library-transfer.js";
+} from "../extension/library-transfer.js";
test("ZIP and complete-folder adapters produce one canonical inspected transfer", async () => {
const source = portablePackage([portableEntry("case:one", "image:one")]);
diff --git a/test/library-view.test.js b/test/library-view.test.js
index 95e4665..c611fbc 100644
--- a/test/library-view.test.js
+++ b/test/library-view.test.js
@@ -8,7 +8,7 @@ import {
moveProjectLogicalCase,
sortLibraryCases,
sortProjects
-} from "../library-view.js";
+} from "../extension/library-view.js";
test("recently added sorting uses the local join time and only views old savedAt as a fallback", () => {
const cases = [
diff --git a/test/library_132_e2e.py b/test/library_132_e2e.py
index 7bf34f0..84e0cae 100644
--- a/test/library_132_e2e.py
+++ b/test/library_132_e2e.py
@@ -8,7 +8,7 @@ from playwright.sync_api import TimeoutError as PlaywrightTimeoutError, expect,
from e2e_support import launch_context, seed_extension_storage
-EXTENSION_DIR = Path(__file__).resolve().parents[1]
+EXTENSION_DIR = Path(__file__).resolve().parents[1] / "extension"
INITIAL_BATCH_SIZE = 24
diff --git a/test/libtv-capture.test.js b/test/libtv-capture.test.js
index bf5a54c..11d23c6 100644
--- a/test/libtv-capture.test.js
+++ b/test/libtv-capture.test.js
@@ -1,7 +1,7 @@
import test from 'node:test';
import assert from 'node:assert/strict';
-import { collectLibTvPublicPayload, normalizeLibTvPublicPayload } from '../libtv-capture.js';
-import { normalizePageCaptureBatch } from '../page-capture.js';
+import { collectLibTvPublicPayload, normalizeLibTvPublicPayload } from '../extension/libtv-capture.js';
+import { normalizePageCaptureBatch } from '../extension/page-capture.js';
test('LibTV public video is a video case, never a description disguised as its prompt', () => {
const payload = normalizeLibTvPublicPayload({ canonicalUrl: 'https://www.liblib.tv/', items: [
diff --git a/test/local-asset-reference-background.test.js b/test/local-asset-reference-background.test.js
index 8a4f77a..cb9604b 100644
--- a/test/local-asset-reference-background.test.js
+++ b/test/local-asset-reference-background.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const source = await readFile(new URL("../background.js", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
test("background imports inert local references without reading a managed media blob", () => {
const start = source.indexOf("async function startImportJobAction");
diff --git a/test/local-asset-store.test.js b/test/local-asset-store.test.js
index 2cf9a94..6a0ab1b 100644
--- a/test/local-asset-store.test.js
+++ b/test/local-asset-store.test.js
@@ -11,9 +11,9 @@ import {
queryLocalAssetHandlePermission,
readLocalAssetFile,
saveLocalAssetHandle
-} from "../local-asset-store.js";
+} from "../extension/local-asset-store.js";
-const source = await readFile(new URL("../local-asset-store.js", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/local-asset-store.js", import.meta.url), "utf8");
function fileMetadata(overrides = {}) {
return { name: "scene.psd", size: 128, lastModified: 42, ...overrides };
diff --git a/test/local-extension-upgrade.test.js b/test/local-extension-upgrade.test.js
index 48ba6e3..51662d8 100644
--- a/test/local-extension-upgrade.test.js
+++ b/test/local-extension-upgrade.test.js
@@ -3,9 +3,9 @@ import assert from "node:assert/strict";
import { mkdtemp, mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
-import { createZipBlob } from "../zip.js";
-import { extensionIdForKey, cleanupLocalUpgrade, installLocalUpgrade, isExtensionProgramPath, localReleasePackageUrl, prepareLocalUpgrade, RECOVERY_DIRECTORY, verifyInstallationDirectory, verifyRecoveredUpgrade, verifyRunningUpgrade } from "../local-extension-upgrade.js";
-const manifest = JSON.parse(await readFile(new URL("../manifest.json", import.meta.url)));
+import { createZipBlob } from "../extension/zip.js";
+import { extensionIdForKey, cleanupLocalUpgrade, installLocalUpgrade, isExtensionProgramPath, localReleasePackageUrl, prepareLocalUpgrade, RECOVERY_DIRECTORY, verifyInstallationDirectory, verifyRecoveredUpgrade, verifyRunningUpgrade } from "../extension/local-extension-upgrade.js";
+const manifest = JSON.parse(await readFile(new URL("../extension/manifest.json", import.meta.url)));
const id = await extensionIdForKey(manifest.key);
const nextVersion = [...manifest.version.split(".").slice(0, -1), Number(manifest.version.split(".").at(-1)) + 1].join(".");
const runtime = { id, getManifest: () => manifest, getURL: path => `chrome-extension://${id}/${path}` };
@@ -38,7 +38,7 @@ test("local package identity and version are validated before directory writes",
await assert.rejects(prepareLocalUpgrade(await createZipBlob([...files].map(([name, data]) => ({ name, data }))), runtime), /缺少运行文件/);
});
test("program paths exclude user data and dangerous archive paths", () => {
- for (const path of ["cases.json", "media/user.mp4", "../background.js", "assets/../../x.js", "C:/x.js", "a\\b.js", ".git/config"]) assert.equal(isExtensionProgramPath(path), false, path);
+ for (const path of ["cases.json", "media/user.mp4", "../extension/background.js", "assets/../../x.js", "C:/x.js", "a\\b.js", ".git/config"]) assert.equal(isExtensionProgramPath(path), false, path);
assert.equal(isExtensionProgramPath("vendor/pdfjs/build/pdf.mjs"), true);
assert.equal(localReleasePackageUrl(manifest, `${manifest.homepage_url}/releases/tag/v${nextVersion}`, nextVersion), `${manifest.homepage_url}/releases/download/v${nextVersion}/PromptDirector-${nextVersion}-FIXED-ID-DEV.zip`);
assert.throws(() => localReleasePackageUrl(manifest, `https://evil.example/releases/tag/v${nextVersion}`, nextVersion), /不一致/);
diff --git a/test/local-index-maintenance-ui.test.js b/test/local-index-maintenance-ui.test.js
index ca07400..5e7e35f 100644
--- a/test/local-index-maintenance-ui.test.js
+++ b/test/local-index-maintenance-ui.test.js
@@ -3,9 +3,9 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
const [html, source, background] = await Promise.all([
- readFile(new URL("../library.html", import.meta.url), "utf8"),
- readFile(new URL("../library.js", import.meta.url), "utf8"),
- readFile(new URL("../background.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.js", import.meta.url), "utf8"),
+ readFile(new URL("../extension/background.js", import.meta.url), "utf8")
]);
test("local index maintenance groups its original controls with the title and has no decorative progress bar", () => {
diff --git a/test/local-installation-directory.test.js b/test/local-installation-directory.test.js
index e851e62..f0bfe58 100644
--- a/test/local-installation-directory.test.js
+++ b/test/local-installation-directory.test.js
@@ -4,9 +4,9 @@ import { mkdtemp, writeFile, rm, readFile } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { directory, served } from './helpers/local-upgrade-directory.mjs';
-import { extensionIdForKey } from '../local-extension-upgrade.js';
-import { resolveLocalInstallationDirectory } from '../local-installation-directory.js';
-const manifest = JSON.parse(await readFile(new URL('../manifest.json', import.meta.url)));
+import { extensionIdForKey } from '../extension/local-extension-upgrade.js';
+import { resolveLocalInstallationDirectory } from '../extension/local-installation-directory.js';
+const manifest = JSON.parse(await readFile(new URL('../extension/manifest.json', import.meta.url)));
const id = await extensionIdForKey(manifest.key);
const runtime = { id, getManifest:()=>manifest, getURL:path=>`chrome-extension://${id}/${path}` };
async function fixture(t) {
diff --git a/test/local-media.test.js b/test/local-media.test.js
index c3610cb..08a53a3 100644
--- a/test/local-media.test.js
+++ b/test/local-media.test.js
@@ -8,8 +8,8 @@ import {
findExactMediaDuplicate,
normalizeLocalRelativePath,
prepareLocalMedia
-} from "../local-media.js";
-import { PORTABLE_LIBRARY_LIMITS, formatBytes } from "../resource-limits.js";
+} from "../extension/local-media.js";
+import { PORTABLE_LIBRARY_LIMITS, formatBytes } from "../extension/resource-limits.js";
test("local media detection keeps only supported formats and safe relative paths", () => {
assert.deepEqual(detectLocalMediaFile(new File(["image"], "frame.gif", { type: "image/gif" })), {
diff --git a/test/local-similarity.test.js b/test/local-similarity.test.js
index e5481c5..e7b6f42 100644
--- a/test/local-similarity.test.js
+++ b/test/local-similarity.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createSimilarityIndex, rankSimilarEntries } from "../local-similarity.js";
-import { createEmptyFacetCatalog, createFacet, createFacetNode } from "../facets.js";
+import { createSimilarityIndex, rankSimilarEntries } from "../extension/local-similarity.js";
+import { createEmptyFacetCatalog, createFacet, createFacetNode } from "../extension/facets.js";
function catalog() {
let value = createFacet(createEmptyFacetCatalog(), { id: "facet:style", name: "视觉风格" });
diff --git a/test/manager_regression_e2e.py b/test/manager_regression_e2e.py
index 36ee98e..6eb6dd3 100644
--- a/test/manager_regression_e2e.py
+++ b/test/manager_regression_e2e.py
@@ -9,7 +9,7 @@ from playwright.sync_api import expect, sync_playwright
from e2e_support import launch_context
-EXTENSION_DIR = Path(__file__).resolve().parents[1]
+EXTENSION_DIR = Path(__file__).resolve().parents[1] / "extension"
NODE_COUNT = int(os.environ.get("MANAGER_NODE_COUNT", "275"))
diff --git a/test/manual-sync.test.js b/test/manual-sync.test.js
index c63e800..b78b713 100644
--- a/test/manual-sync.test.js
+++ b/test/manual-sync.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createManualSyncController } from "../manual-sync.js";
-import { createRevisionSnapshot } from "../sync-model.js";
+import { createManualSyncController } from "../extension/manual-sync.js";
+import { createRevisionSnapshot } from "../extension/sync-model.js";
test("a second unchanged manual sync performs zero media snapshot and metadata writes", async () => {
const fixture = await createFixture();
diff --git a/test/media-archive-ui.test.js b/test/media-archive-ui.test.js
index 8134587..e79241a 100644
--- a/test/media-archive-ui.test.js
+++ b/test/media-archive-ui.test.js
@@ -2,9 +2,9 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const js = await readFile(new URL("../library.js", import.meta.url), "utf8");
-const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
-const css = await readFile(new URL("../library.css", import.meta.url), "utf8");
+const js = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
+const css = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
test("modern file and folder pickers preserve handles and relative paths before falling back", () => {
assert.match(js, /showOpenFilePicker\(\{ multiple: true \}\)/);
diff --git a/test/media-playback.test.js b/test/media-playback.test.js
index b70d544..fb6a761 100644
--- a/test/media-playback.test.js
+++ b/test/media-playback.test.js
@@ -1,5 +1,5 @@
import test from "node:test";
-import { tiktokMediaController } from "../media-playback.js";
+import { tiktokMediaController } from "../extension/media-playback.js";
import assert from "node:assert/strict";
import {
@@ -7,7 +7,7 @@ import {
buildYouTubePlaybackRule,
ensureYouTubePlaybackPermission,
youtubePlaybackError
-} from "../media-playback.js";
+} from "../extension/media-playback.js";
test("YouTube playback permission is requested only on demand and installs a scoped session rule", async () => {
const calls = [];
diff --git a/test/media-prompts.test.js b/test/media-prompts.test.js
index 90ed674..79d0116 100644
--- a/test/media-prompts.test.js
+++ b/test/media-prompts.test.js
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { normalizeEntryMedia, removeEntryMedia, setEntryMediaPrompt } from "../media.js";
+import { normalizeEntryMedia, removeEntryMedia, setEntryMediaPrompt } from "../extension/media.js";
const entry = {
id: "case-1",
diff --git a/test/media-reference-resolver.test.js b/test/media-reference-resolver.test.js
index d50c9cc..cbeebd2 100644
--- a/test/media-reference-resolver.test.js
+++ b/test/media-reference-resolver.test.js
@@ -7,7 +7,7 @@ import {
officialMediaEmbedUrl,
parseOpenGraphMetadata,
resolveMediaReference
-} from "../media-reference-resolver.js";
+} from "../extension/media-reference-resolver.js";
test("common social video URLs are recognized and tracking parameters are removed", () => {
const fixtures = [
diff --git a/test/media-store.test.js b/test/media-store.test.js
index c99bed9..010b43e 100644
--- a/test/media-store.test.js
+++ b/test/media-store.test.js
@@ -9,9 +9,9 @@ import {
normalizeDerivedMetadata,
validatePortableAssetBlob,
validateMediaBlob
-} from "../media-store.js";
+} from "../extension/media-store.js";
-const source = await readFile(new URL("../media-store.js", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/media-store.js", import.meta.url), "utf8");
test("media storage accepts images videos audio documents and inert creator sources", () => {
assert.doesNotThrow(() => validateMediaBlob(new Blob(["frame"], { type: "image/webp" })));
diff --git a/test/media-ui.test.js b/test/media-ui.test.js
index ff024b2..ea35438 100644
--- a/test/media-ui.test.js
+++ b/test/media-ui.test.js
@@ -2,9 +2,9 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const source = await readFile(new URL("../library.js", import.meta.url), "utf8");
-const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
-const css = await readFile(new URL("../library.css", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
+const css = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
test("gallery cards keep static covers and opt into bounded local hover playback", () => {
const card = source.slice(source.indexOf("function createCaseCard"), source.indexOf("function renderProjectFilters"));
@@ -66,7 +66,7 @@ test("PDF uses the local document viewer rather than a blob iframe", () => {
});
test("the PDF display layer disables dynamic expression evaluation", async () => {
- const documentViewer = await readFile(new URL("../document-viewer.js", import.meta.url), "utf8");
+ const documentViewer = await readFile(new URL("../extension/document-viewer.js", import.meta.url), "utf8");
assert.match(documentViewer, /isEvalSupported:\s*false/);
});
@@ -77,7 +77,7 @@ test("notes and text documents render readable card excerpts instead of no-media
});
test("Markdown uses a safe local reading renderer instead of a preformatted text dump", async () => {
- const renderer = await readFile(new URL("../markdown-renderer.js", import.meta.url), "utf8");
+ const renderer = await readFile(new URL("../extension/markdown-renderer.js", import.meta.url), "utf8");
const viewer = source.slice(source.indexOf("async function createMediaViewer"), source.indexOf("async function loadRemoteMarkdownImage"));
const markdownBranch = viewer.slice(viewer.indexOf('asset.mimeType === "text/markdown"'), viewer.indexOf(" } else {", viewer.indexOf('asset.mimeType === "text/markdown"')));
assert.match(viewer, /renderMarkdownDocument/);
diff --git a/test/media.test.js b/test/media.test.js
index 4e5a00e..1237e3e 100644
--- a/test/media.test.js
+++ b/test/media.test.js
@@ -15,8 +15,8 @@ import {
removeEntryMedia,
setPrimaryMedia,
updateLocalAssetReferenceMetadata
-} from "../media.js";
-import { normalizeEntryVisuals, reorderEntryVisuals } from "../visuals.js";
+} from "../extension/media.js";
+import { normalizeEntryVisuals, reorderEntryVisuals } from "../extension/visuals.js";
test("new visual analysis remains readable through reconstruction prompts without a legacy description", () => {
const entry = normalizeEntryMedia({
diff --git a/test/migration.test.js b/test/migration.test.js
index ddfe97f..19b7021 100644
--- a/test/migration.test.js
+++ b/test/migration.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { migrateLibraryState, needsMigration } from "../migration.js";
-import { CONTENT_IDS, SCHEMA_VERSION, createDefaultTaxonomy } from "../taxonomy.js";
+import { migrateLibraryState, needsMigration } from "../extension/migration.js";
+import { CONTENT_IDS, SCHEMA_VERSION, createDefaultTaxonomy } from "../extension/taxonomy.js";
test("saving and reloading a source selection retains its stated rights without inventing permission", () => {
const origin = {
diff --git a/test/navigation-state.test.js b/test/navigation-state.test.js
index 839cb33..5e60da5 100644
--- a/test/navigation-state.test.js
+++ b/test/navigation-state.test.js
@@ -9,7 +9,7 @@ import {
createLibraryReturnRestore,
parseLibraryReturnSnapshot,
serializeLibraryReturnSnapshot
-} from "../navigation-state.js";
+} from "../extension/navigation-state.js";
function normalizeRoute(route) {
const view = ["list", "detail", "editor", "refine", "create"].includes(route?.view) ? route.view : "list";
diff --git a/test/offscreen-share-package.test.js b/test/offscreen-share-package.test.js
index bd890b1..0da1152 100644
--- a/test/offscreen-share-package.test.js
+++ b/test/offscreen-share-package.test.js
@@ -4,8 +4,8 @@ import assert from "node:assert/strict";
import {
portableManagedAsset,
readLinkedAssetForShare
-} from "../offscreen.js";
-import { resolvePortableAssetFormat } from "../asset-formats.js";
+} from "../extension/offscreen.js";
+import { resolvePortableAssetFormat } from "../extension/asset-formats.js";
const linkedAsset = Object.freeze({
id: "source:psd",
diff --git a/test/organizer-background.test.js b/test/organizer-background.test.js
index 5a0a7ff..aadfb3a 100644
--- a/test/organizer-background.test.js
+++ b/test/organizer-background.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
+const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
function functionBlock(name, nextName) {
const start = background.indexOf(`async function ${name}(`);
diff --git a/test/organizer.test.js b/test/organizer.test.js
index f23aa36..222b9fb 100644
--- a/test/organizer.test.js
+++ b/test/organizer.test.js
@@ -23,7 +23,7 @@ import {
moveEntriesBetweenCollections,
setCollectionVisibility,
setEntriesCollection
-} from "../organizer.js";
+} from "../extension/organizer.js";
test("organizer normalizes duplicate and missing entry references", () => {
const value = normalizeOrganizerState({
diff --git a/test/page-capture-adapter-registry.test.js b/test/page-capture-adapter-registry.test.js
index cd39d20..0548bbf 100644
--- a/test/page-capture-adapter-registry.test.js
+++ b/test/page-capture-adapter-registry.test.js
@@ -5,7 +5,7 @@ import {
PAGE_CAPTURE_ADAPTERS,
pageCaptureSupportMatrix,
resolvePageCaptureAdapter
-} from "../page-capture-adapter-registry.js";
+} from "../extension/page-capture-adapter-registry.js";
test("the capture registry covers the requested public-site families without duplicate adapters", () => {
const fixtures = new Map([
diff --git a/test/page-capture-frames.test.js b/test/page-capture-frames.test.js
index 69e4200..8ebb9b9 100644
--- a/test/page-capture-frames.test.js
+++ b/test/page-capture-frames.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { readPageCaptureVideoFrame, resolvePageCaptureVideoFrames } from "../page-capture-frames.js";
-import { normalizePageCaptureCandidate } from "../page-capture.js";
+import { readPageCaptureVideoFrame, resolvePageCaptureVideoFrames } from "../extension/page-capture-frames.js";
+import { normalizePageCaptureCandidate } from "../extension/page-capture.js";
const frameUrl = "https://www.artstation.com/api/v2/animation/video_clips/fixture/embed.html?s=fixture";
const videoUrl = "https://cdn.artstation.com/p/video_sources/fixture.mp4";
diff --git a/test/page-capture-repair.test.js b/test/page-capture-repair.test.js
index 4695fd7..98940bf 100644
--- a/test/page-capture-repair.test.js
+++ b/test/page-capture-repair.test.js
@@ -1,6 +1,6 @@
import test from 'node:test';
import assert from 'node:assert/strict';
-import { planPageCaptureRepair, mergePageCaptureRepair } from '../page-capture-repair.js';
+import { planPageCaptureRepair, mergePageCaptureRepair } from '../extension/page-capture-repair.js';
const candidate = { pageType:'video', canonicalUrl:'https://example.com/publication/one', sourceFacts:{pageType:'video',extractionMethod:'structured'},media:[{id:'captured-video',kind:'video',url:'https://cdn.example.com/one.mp4'}] };
const reference = {id:'old',kind:'video',storageMode:'reference',sourceUrl:candidate.canonicalUrl,reference:{url:candidate.canonicalUrl}};
diff --git a/test/page-capture-site-adapters.test.js b/test/page-capture-site-adapters.test.js
index d2e799a..e67fdc3 100644
--- a/test/page-capture-site-adapters.test.js
+++ b/test/page-capture-site-adapters.test.js
@@ -6,7 +6,7 @@ import {
installPageCaptureSiteObserver,
isTrustedPageCaptureMediaUrl,
normalizePageCaptureSitePayload
-} from "../page-capture-site-adapters.js";
+} from "../extension/page-capture-site-adapters.js";
test("Jimeng structured payload restores author, prompt, model, time, metrics and original media", () => {
const normalized = normalizePageCaptureSitePayload({
diff --git a/test/page-capture-video.test.js b/test/page-capture-video.test.js
index 655f3ba..770ef3d 100644
--- a/test/page-capture-video.test.js
+++ b/test/page-capture-video.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-import { downloadPageCaptureVideo, isPageCaptureVideoFileUrl } from "../page-capture-video.js";
+import { downloadPageCaptureVideo, isPageCaptureVideoFileUrl } from "../extension/page-capture-video.js";
const video = await readFile(new URL('./fixtures/zhipu-local-video-smoke.mp4', import.meta.url));
test('a source declared by the page video element is verified by bytes even without a filename extension', async () => {
diff --git a/test/page-capture.test.js b/test/page-capture.test.js
index 93edf45..ae1a5b2 100644
--- a/test/page-capture.test.js
+++ b/test/page-capture.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { hasEnglishTranslation } from "../i18n.js";
-import { normalizeMediaAsset } from "../media.js";
+import { hasEnglishTranslation } from "../extension/i18n.js";
+import { normalizeMediaAsset } from "../extension/media.js";
import {
PAGE_CAPTURE_ADAPTERS,
applyPageCaptureSelections,
@@ -21,7 +21,7 @@ import {
pageCapturePermissionOrigins,
pageCaptureStructureMatches,
resolvePageCaptureImage
-} from "../page-capture.js";
+} from "../extension/page-capture.js";
test("only media proven inside the article is proposed by default", () => {
const candidate = normalizePageCaptureCandidate({
diff --git a/test/page-session-media.test.js b/test/page-session-media.test.js
index 2e36b01..19d6148 100644
--- a/test/page-session-media.test.js
+++ b/test/page-session-media.test.js
@@ -5,7 +5,7 @@ import {
discardPageSessionMedia,
preparePageSessionMedia,
readPageSessionMediaChunk
-} from "../page-session-media.js";
+} from "../extension/page-session-media.js";
test("page-session media reads only the exact selected HTTPS URL with browser credentials", async () => {
const injected = (0, eval)(`(${preparePageSessionMedia.toString()})`);
diff --git a/test/page-shell-layout.test.js b/test/page-shell-layout.test.js
index 6d611c9..e5cf7c3 100644
--- a/test/page-shell-layout.test.js
+++ b/test/page-shell-layout.test.js
@@ -2,8 +2,8 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const libraryCss = await readFile(new URL("../library.css", import.meta.url), "utf8");
-const skillsCss = await readFile(new URL("../skills-page.css", import.meta.url), "utf8");
+const libraryCss = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
+const skillsCss = await readFile(new URL("../extension/skills-page.css", import.meta.url), "utf8");
function rule(source, selector) {
const escaped = selector.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
diff --git a/test/palette.test.js b/test/palette.test.js
index 99e0f68..8d1272b 100644
--- a/test/palette.test.js
+++ b/test/palette.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { extractPalette, PALETTE_VERSION } from "../palette.js";
+import { extractPalette, PALETTE_VERSION } from "../extension/palette.js";
test("screenshot pixels produce compact HEX swatches without inventing semantic tags", () => {
const colors = [
diff --git a/test/pdfjs-runtime.test.js b/test/pdfjs-runtime.test.js
index 4e6bc7c..b7745f6 100644
--- a/test/pdfjs-runtime.test.js
+++ b/test/pdfjs-runtime.test.js
@@ -12,6 +12,6 @@ test("PDF.js packaging uses one exact dependency version and a byte-identical ve
});
test("the PDF viewer keeps dynamic expression evaluation disabled", async () => {
- const source = await readFile(new URL("../document-viewer.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/document-viewer.js", import.meta.url), "utf8");
assert.match(source, /isEvalSupported:\s*false/);
});
diff --git a/test/preferences.test.js b/test/preferences.test.js
index 28044ec..8bbc903 100644
--- a/test/preferences.test.js
+++ b/test/preferences.test.js
@@ -6,7 +6,7 @@ import {
normalizeSidebarWidth,
normalizeUiPreferences,
resolveLocale
-} from "../preferences.js";
+} from "../extension/preferences.js";
test("UI preferences accept only supported locale theme and motion values", () => {
assert.deepEqual(normalizeUiPreferences({ locale: "fr", theme: "neon", motion: "spin" }), {
diff --git a/test/privacy-policy.test.js b/test/privacy-policy.test.js
index d2974ac..2af7318 100644
--- a/test/privacy-policy.test.js
+++ b/test/privacy-policy.test.js
@@ -37,7 +37,7 @@ test("privacy policy discloses that composer text-only mode reads and sends zero
test("privacy policy accurately declares local-first handling and manifest permissions", async () => {
const [policy, manifestSource] = await Promise.all([
privacyPolicy(),
- readFile(new URL("manifest.json", root), "utf8")
+ readFile(new URL("extension/manifest.json", root), "utf8")
]);
const manifest = JSON.parse(manifestSource);
assert.match(policy, /本地优先/);
diff --git a/test/project-combobox.test.js b/test/project-combobox.test.js
index a86405c..326785f 100644
--- a/test/project-combobox.test.js
+++ b/test/project-combobox.test.js
@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { projectComboboxOptions, projectComboboxPlacement } from "../project-combobox.js";
+import { projectComboboxOptions, projectComboboxPlacement } from "../extension/project-combobox.js";
test("project combobox exposes existing projects while preserving their real names", () => {
assert.deepEqual(projectComboboxOptions([
diff --git a/test/project-deletion-ui.test.js b/test/project-deletion-ui.test.js
index 7f76bef..d0df6e9 100644
--- a/test/project-deletion-ui.test.js
+++ b/test/project-deletion-ui.test.js
@@ -3,7 +3,7 @@ import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
test("project menu separates archiving only the project from archiving it with its cases", async () => {
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
assert.match(library, /"仅删除项目"/);
assert.match(library, /"删除项目及案例"/);
const handlerStart = library.indexOf("async function deleteProjectCollectionWithEntries");
@@ -17,7 +17,7 @@ test("project menu separates archiving only the project from archiving it with i
});
test("project and case deletion is serialized and archives all selected content without deleting blobs", async () => {
- const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
+ const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
assert.match(background, /case "DELETE_COLLECTION_WITH_ENTRIES":\s*return enqueue\(async \(\) => deleteCollectionWithEntries\(message\)\)/);
const handlerStart = background.indexOf("async function deleteCollectionWithEntries");
const handlerEnd = background.indexOf("async function moveEntryBatchToTrash", handlerStart);
diff --git a/test/project-tree.test.js b/test/project-tree.test.js
index 7045f8e..6d079ec 100644
--- a/test/project-tree.test.js
+++ b/test/project-tree.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { projectMovePlan, projectTreeRows, readProjectExpansion, saveProjectExpansion } from "../project-tree.js";
-import { collectionPathLabelsById, moveCollection, normalizeOrganizerState } from "../organizer.js";
+import { projectMovePlan, projectTreeRows, readProjectExpansion, saveProjectExpansion } from "../extension/project-tree.js";
+import { collectionPathLabelsById, moveCollection, normalizeOrganizerState } from "../extension/organizer.js";
function fixture() {
return normalizeOrganizerState({ collections: [
diff --git a/test/prompt-sources.test.js b/test/prompt-sources.test.js
index 14150ce..5b39f2c 100644
--- a/test/prompt-sources.test.js
+++ b/test/prompt-sources.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { detailPromptSources } from "../prompt-sources.js";
-import { setEntryMediaPrompt } from "../media.js";
+import { detailPromptSources } from "../extension/prompt-sources.js";
+import { setEntryMediaPrompt } from "../extension/media.js";
test("article body never becomes an image prompt; actual per-media prompts remain available", () => {
const asset = { id: "image", kind: "image" };
diff --git a/test/release-experience.test.js b/test/release-experience.test.js
index ddbb29d..301ab35 100644
--- a/test/release-experience.test.js
+++ b/test/release-experience.test.js
@@ -10,12 +10,12 @@ const pageScripts = ["library.js", "composer-page.js", "skills-page.js", "collec
test("ordinary product pages use the shared branded dialog instead of browser prompts", async () => {
for (const filename of pageScripts) {
- const source = await readFile(new URL(`../${filename}`, import.meta.url), "utf8");
+ const source = await readFile(new URL(`../extension/${filename}`, import.meta.url), "utf8");
assert.doesNotMatch(source, /\b(?:window\.)?(?:prompt|confirm|alert)\s*\(/, `${filename} 不能调用系统弹窗`);
}
- const dialogs = await readFile(new URL("../ui-dialogs.js", import.meta.url), "utf8");
- const foundation = await readFile(new URL("../ui-foundation.css", import.meta.url), "utf8");
+ const dialogs = await readFile(new URL("../extension/ui-dialogs.js", import.meta.url), "utf8");
+ const foundation = await readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8");
assert.match(dialogs, /export async function showAppDialog/);
assert.match(dialogs, /export async function confirmAppAction/);
assert.match(dialogs, /export async function promptAppText/);
@@ -24,7 +24,7 @@ test("ordinary product pages use the shared branded dialog instead of browser pr
});
test("video links and quick notes each use a purpose-built one-step form", async () => {
- const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
+ const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
const video = library.slice(library.indexOf("async function addVideoReference"), library.indexOf("async function saveVideoReference"));
const note = library.slice(library.indexOf("async function createQuickNote"), library.indexOf("async function prepareLocalMedia"));
@@ -38,7 +38,7 @@ test("video links and quick notes each use a purpose-built one-step form", async
});
test("general settings expose one change-aware save action without a save rollback", async () => {
- const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
+ const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
const panel = html.slice(html.indexOf('id="settings-general-panel"'), html.indexOf('id="settings-tasks-panel"'));
assert.equal((panel.match(/id="save-library-settings"/g) ?? []).length, 1);
@@ -47,8 +47,8 @@ test("general settings expose one change-aware save action without a save rollba
});
test("the selected toolbar mark has one lime SVG master and matching manifest PNG sizes", async () => {
- const svg = await readFile(new URL("../assets/icons/icon-source.svg", import.meta.url), "utf8");
- const manifest = JSON.parse(await readFile(new URL("../manifest.json", import.meta.url), "utf8"));
+ const svg = await readFile(new URL("../extension/assets/icons/icon-source.svg", import.meta.url), "utf8");
+ const manifest = JSON.parse(await readFile(new URL("../extension/manifest.json", import.meta.url), "utf8"));
assert.match(svg, /fill="#D1FE17"/);
assert.match(svg, /fill="#0F1113"/);
@@ -60,7 +60,7 @@ test("the selected toolbar mark has one lime SVG master and matching manifest PN
128: "assets/icons/icon-128.png"
});
const pages = await Promise.all(["library.html", "collector.html", "composer.html", "skills.html", "curated-skills.html"]
- .map((name) => readFile(new URL(`../${name}`, import.meta.url), "utf8")));
+ .map((name) => readFile(new URL(`../extension/${name}`, import.meta.url), "utf8")));
for (const page of pages) assert.match(page, /assets\/icons\/icon-source\.svg/);
const { stdout } = await execFileAsync(process.execPath, ["tools/build-brand-icons.mjs", "--check"], {
cwd: new URL("..", import.meta.url)
diff --git a/test/resource-limits.test.js b/test/resource-limits.test.js
index ac36d32..d0043ab 100644
--- a/test/resource-limits.test.js
+++ b/test/resource-limits.test.js
@@ -5,7 +5,7 @@ import {
ASSET_IMPORT_FAILURE_CODES,
assetImportError,
importFailureDetails
-} from "../resource-limits.js";
+} from "../extension/resource-limits.js";
test("asset import failures expose a serializable reason for the UI and background job", () => {
const error = assetImportError(
diff --git a/test/save-history.test.js b/test/save-history.test.js
index 6783411..f691ded 100644
--- a/test/save-history.test.js
+++ b/test/save-history.test.js
@@ -7,7 +7,7 @@ import {
createScreenshotSaveUndo,
normalizeLastSaveUndo,
restoreScreenshotSaveEntry
-} from "../save-history.js";
+} from "../extension/save-history.js";
test("entry save undo targets the exact created entry", () => {
assert.deepEqual(createEntrySaveUndo("entry:new"), {
diff --git a/test/search-index.test.js b/test/search-index.test.js
index 4437413..306a99e 100644
--- a/test/search-index.test.js
+++ b/test/search-index.test.js
@@ -2,8 +2,8 @@ import test from "node:test";
import assert from "node:assert/strict";
import { performance } from "node:perf_hooks";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { buildSearchIndex, searchIndexedEntries } from "../search-index.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { buildSearchIndex, searchIndexedEntries } from "../extension/search-index.js";
test("the reusable search index preserves free text and operator matching", () => {
const entries = [{
diff --git a/test/search-query.test.js b/test/search-query.test.js
index 6a9de2d..0f0e6c5 100644
--- a/test/search-query.test.js
+++ b/test/search-query.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { filterEntries } from "../library-model.js";
-import { parseSearchQuery } from "../search-query.js";
-import { buildSearchIndex, searchIndexedEntries } from "../search-index.js";
+import { filterEntries } from "../extension/library-model.js";
+import { parseSearchQuery } from "../extension/search-query.js";
+import { buildSearchIndex, searchIndexedEntries } from "../extension/search-index.js";
const catalog = {
facets: [{ id: "style", name: "风格", color: "#000", status: "active", order: 0 }],
diff --git a/test/share-preview.test.js b/test/share-preview.test.js
index 5dbad9e..0a38faf 100644
--- a/test/share-preview.test.js
+++ b/test/share-preview.test.js
@@ -10,11 +10,11 @@ import {
renderSharePreviewHtml,
renderSharePreviewMasonryJs,
renderSharePreviewRuntimeJs
-} from "../share-preview.js";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { CONTENT_IDS, createDefaultTaxonomy } from "../taxonomy.js";
+} from "../extension/share-preview.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { CONTENT_IDS, createDefaultTaxonomy } from "../extension/taxonomy.js";
-const iconSprite = readFileSync(new URL("../assets/ui-icons.svg", import.meta.url), "utf8");
+const iconSprite = readFileSync(new URL("../extension/assets/ui-icons.svg", import.meta.url), "utf8");
const previewOptions = Object.freeze({
iconSprite,
installUrl: "https://chromewebstore.google.com/detail/iahakaahijddcjjldidbclicedibgpjm",
@@ -173,7 +173,7 @@ test("share preview shows reconstruction prompts without a redundant visual-desc
});
test("share preview adapts the current stable masonry implementation for offline classic scripts", () => {
- const source = readFileSync(new URL("../stable-masonry.js", import.meta.url), "utf8");
+ const source = readFileSync(new URL("../extension/stable-masonry.js", import.meta.url), "utf8");
const runtime = renderSharePreviewMasonryJs(source);
assert.match(runtime, /globalThis\.createStableMasonry = function createStableMasonry/);
assert.match(runtime, /\.case-card:not\(\[hidden\]\)/);
diff --git a/test/skill-contact-sheet.test.js b/test/skill-contact-sheet.test.js
index 53c6226..1cb670e 100644
--- a/test/skill-contact-sheet.test.js
+++ b/test/skill-contact-sheet.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { contactSheetPlan, selectedSkillContentImages } from "../skill-contact-sheet.js";
-import { anonymousSkillSources, buildSkillExtractionRequest } from "../creative-skill-service.js";
+import { contactSheetPlan, selectedSkillContentImages } from "../extension/skill-contact-sheet.js";
+import { anonymousSkillSources, buildSkillExtractionRequest } from "../extension/creative-skill-service.js";
test("skill visual selection includes every content image and excludes posters", () => {
const images = selectedSkillContentImages([{ id: "a", mediaAssets: [
diff --git a/test/skill-project-tree-ui.test.js b/test/skill-project-tree-ui.test.js
index ad5caba..f40f4e2 100644
--- a/test/skill-project-tree-ui.test.js
+++ b/test/skill-project-tree-ui.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const source = await readFile(new URL("../skills-page.js", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/skills-page.js", import.meta.url), "utf8");
test("Skill source projects display full paths and include descendant cases", () => {
assert.match(source, /collectionSelectorLabelsById\(organizerState\)/);
diff --git a/test/skill-source-picker.test.js b/test/skill-source-picker.test.js
index f709c02..f6c2d7c 100644
--- a/test/skill-source-picker.test.js
+++ b/test/skill-source-picker.test.js
@@ -8,7 +8,7 @@ import {
filterSkillSourceEntries,
pageSkillSourceEntries,
skillSourceSelectionSummary
-} from "../skill-source-picker.js";
+} from "../extension/skill-source-picker.js";
function entry(id, kinds = ["image"], text = "") {
const mediaAssets = kinds.map((kind, index) => ({
diff --git a/test/smart-visual-selection.test.js b/test/smart-visual-selection.test.js
index 71532a1..fab8413 100644
--- a/test/smart-visual-selection.test.js
+++ b/test/smart-visual-selection.test.js
@@ -6,7 +6,7 @@ import {
createSmartVisualSelectionSession,
shouldClearSmartVisualSelection,
updateSmartVisualSelectionSession
-} from "../smart-visual-selection.js";
+} from "../extension/smart-visual-selection.js";
test("smart visual selection keeps cross-context identity geometry and selections explicit", () => {
const started = createSmartVisualSelectionSession({
diff --git a/test/stable-masonry.test.js b/test/stable-masonry.test.js
index ef0a81c..cb1c857 100644
--- a/test/stable-masonry.test.js
+++ b/test/stable-masonry.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { createStableMasonry } from "../stable-masonry.js";
+import { createStableMasonry } from "../extension/stable-masonry.js";
test("card resize defers ancestor height writes until after ResizeObserver delivery", () => {
const originals = {
diff --git a/test/structured-output.test.js b/test/structured-output.test.js
index e87defd..7446e51 100644
--- a/test/structured-output.test.js
+++ b/test/structured-output.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { parseStructuredObject } from "../structured-output.js";
+import { parseStructuredObject } from "../extension/structured-output.js";
test("structured output accepts fenced JSON, surrounding prose, a trailing comma, and double encoding", () => {
assert.deepEqual(parseStructuredObject("\uFEFF```json\n{\"tags\":[{\"g\":\"style.render\",}],}\n```"), {
diff --git a/test/sync-crypto.test.js b/test/sync-crypto.test.js
index cfc5dee..3b5306f 100644
--- a/test/sync-crypto.test.js
+++ b/test/sync-crypto.test.js
@@ -6,7 +6,7 @@ import {
decryptVaultValue,
encryptVaultValue,
unlockVaultHeader
-} from "../sync-crypto.js";
+} from "../extension/sync-crypto.js";
test("vault encryption round-trips structured data with a different IV for every file", async () => {
const { header, key } = await createVaultHeader("correct horse battery staple");
diff --git a/test/sync-model.test.js b/test/sync-model.test.js
index 0ada75e..744f269 100644
--- a/test/sync-model.test.js
+++ b/test/sync-model.test.js
@@ -12,7 +12,7 @@ import {
normalizeSyncSettings,
syncErrorDetails,
syncStateHasContent
-} from "../sync-model.js";
+} from "../extension/sync-model.js";
test("sync metadata keeps a durable local pending flag separate from changed media ids", () => {
const value = normalizeSyncMeta({
diff --git a/test/sync-pipeline.test.js b/test/sync-pipeline.test.js
index 2573eec..42b6e53 100644
--- a/test/sync-pipeline.test.js
+++ b/test/sync-pipeline.test.js
@@ -51,7 +51,7 @@ test("native missing-file and damaged-snapshot failures keep actionable status c
});
function source() {
- return readFile(new URL("../background.js", import.meta.url), "utf8");
+ return readFile(new URL("../extension/background.js", import.meta.url), "utf8");
}
function messageBranch(sourceValue, type, nextType) {
diff --git a/test/sync-vault.test.js b/test/sync-vault.test.js
index 6cec109..081e358 100644
--- a/test/sync-vault.test.js
+++ b/test/sync-vault.test.js
@@ -7,8 +7,8 @@ import {
readSyncObject,
writeSyncObject,
writeSyncSnapshot
-} from "../sync-vault.js";
-import { createRevisionSnapshot } from "../sync-model.js";
+} from "../extension/sync-vault.js";
+import { createRevisionSnapshot } from "../extension/sync-model.js";
test("vault stores immutable per-device states and encrypted deduplicated image objects", async () => {
const root = new MemoryDirectory("root");
diff --git a/test/tag-editor.test.js b/test/tag-editor.test.js
index f13fc83..da25113 100644
--- a/test/tag-editor.test.js
+++ b/test/tag-editor.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { addTagValues, normalizeTagValue, normalizeTagValues, splitTagInput } from "../tag-editor.js";
+import { addTagValues, normalizeTagValue, normalizeTagValues, splitTagInput } from "../extension/tag-editor.js";
test("tag values support multiple Chinese and English separators without duplicates", () => {
assert.deepEqual(splitTagInput("参考,构图,夜景\n客户喜欢"), ["参考", "构图", "夜景", "客户喜欢"]);
diff --git a/test/tag-taxonomy.test.js b/test/tag-taxonomy.test.js
index 2c3bc6a..8f67d11 100644
--- a/test/tag-taxonomy.test.js
+++ b/test/tag-taxonomy.test.js
@@ -1,8 +1,8 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { analysisTaxonomyPrompt } from "../deepseek.js";
-import { previewFacetChange } from "../facets.js";
+import { analysisTaxonomyPrompt } from "../extension/deepseek.js";
+import { previewFacetChange } from "../extension/facets.js";
import {
ANALYSIS_TAG_MAX,
FIXED_TAG_TREE,
@@ -12,7 +12,7 @@ import {
createFixedFacetCatalog,
detailNavigation,
validateAnalysisTagResponse
-} from "../tag-taxonomy.js";
+} from "../extension/tag-taxonomy.js";
test("fixed tag tree always contains ten facets and a protected other group in each facet", () => {
const catalog = createFixedFacetCatalog();
diff --git a/test/taxonomy.test.js b/test/taxonomy.test.js
index a0de424..65904f1 100644
--- a/test/taxonomy.test.js
+++ b/test/taxonomy.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { migrateLibraryState } from "../migration.js";
+import { migrateLibraryState } from "../extension/migration.js";
import {
CONTENT_IDS,
CONTENT_ROLES,
@@ -16,11 +16,11 @@ import {
removeContentTypeWithTransfer,
renameContentType,
updateContentType
-} from "../taxonomy.js";
+} from "../extension/taxonomy.js";
import {
applyFacetChange, createDefaultFacetCatalog, createEmptyFacetCatalog, createFacet, createFacetNode,
normalizeFacetCatalog, previewFacetChange, undoFacetChange
-} from "../facets.js";
+} from "../extension/facets.js";
test("new libraries include first-class image, video, and document material types", () => {
const taxonomy = createDefaultTaxonomy();
diff --git a/test/temp-references.test.js b/test/temp-references.test.js
index d7123a8..d6f76b4 100644
--- a/test/temp-references.test.js
+++ b/test/temp-references.test.js
@@ -10,8 +10,8 @@ import {
tempReferenceAssetIds,
unreadReferenceImageAssets,
validateTempReferenceFile
-} from "../temp-references.js";
-import { createComposerSession } from "../composer.js";
+} from "../extension/temp-references.js";
+import { createComposerSession } from "../extension/composer.js";
const supportedFiles = [
["frame.png", "image/png"],
diff --git a/test/theme-bootstrap.test.js b/test/theme-bootstrap.test.js
index e1263c6..83c7909 100644
--- a/test/theme-bootstrap.test.js
+++ b/test/theme-bootstrap.test.js
@@ -2,8 +2,8 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const bootstrap = await readFile(new URL("../theme-bootstrap.js", import.meta.url), "utf8");
-const uiRuntime = await readFile(new URL("../i18n.js", import.meta.url), "utf8");
+const bootstrap = await readFile(new URL("../extension/theme-bootstrap.js", import.meta.url), "utf8");
+const uiRuntime = await readFile(new URL("../extension/i18n.js", import.meta.url), "utf8");
const pages = [
"library.html",
@@ -37,7 +37,7 @@ test("ui initialization replaces provisional first-paint colors with live semant
test("every first-party shell loads bootstrap, shared foundation, then page styles", async () => {
for (const page of pages) {
- const html = await readFile(new URL(`../${page}`, import.meta.url), "utf8");
+ const html = await readFile(new URL(`../extension/${page}`, import.meta.url), "utf8");
const bootstrapIndex = html.indexOf('<script src="theme-bootstrap.js"></script>');
const foundationIndex = html.indexOf('<link rel="stylesheet" href="ui-foundation.css" />');
const stylesheetIndex = html.indexOf('<link rel="stylesheet"', foundationIndex + 1);
diff --git a/test/transfer-scale.test.js b/test/transfer-scale.test.js
index 664cdaf..00b8e58 100644
--- a/test/transfer-scale.test.js
+++ b/test/transfer-scale.test.js
@@ -2,12 +2,12 @@ import test from "node:test";
import assert from "node:assert/strict";
import { createHash } from "node:crypto";
import { execFileSync } from "node:child_process";
-import { createZipBlob, openZipBlob, readZipBlob } from "../zip.js";
-import { renderLibraryJson } from "../lib.js";
-import { parseLibraryPackage } from "../library-package.js";
-import { sha256Blob } from "../blob-digest.js";
-import { resolveZip64Extra, zipSafeInteger } from "../zip64.js";
-import { verifiedDocumentBlob } from "../bounded-media.js";
+import { createZipBlob, openZipBlob, readZipBlob } from "../extension/zip.js";
+import { renderLibraryJson } from "../extension/lib.js";
+import { parseLibraryPackage } from "../extension/library-package.js";
+import { sha256Blob } from "../extension/blob-digest.js";
+import { resolveZip64Extra, zipSafeInteger } from "../extension/zip64.js";
+import { verifiedDocumentBlob } from "../extension/bounded-media.js";
test("more than 5000 cases and projects survive default transfer parsing", () => {
const entries = Array.from({ length: 5001 }, (_, index) => ({
diff --git a/test/transient-menu.test.js b/test/transient-menu.test.js
index 2494544..25adc21 100644
--- a/test/transient-menu.test.js
+++ b/test/transient-menu.test.js
@@ -2,10 +2,10 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const source = await readFile(new URL("../transient-menu.js", import.meta.url), "utf8");
-const library = await readFile(new URL("../library.js", import.meta.url), "utf8");
-const composer = await readFile(new URL("../composer-page.js", import.meta.url), "utf8");
-const html = await readFile(new URL("../library.html", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/transient-menu.js", import.meta.url), "utf8");
+const library = await readFile(new URL("../extension/library.js", import.meta.url), "utf8");
+const composer = await readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8");
+const html = await readFile(new URL("../extension/library.html", import.meta.url), "utf8");
test("transient menus share outside-click, action, peer-open, and Escape dismissal", () => {
assert.match(source, /addEventListener\("pointerdown", onPointerDown, true\)/);
diff --git a/test/trash-background.test.js b/test/trash-background.test.js
index 84cf360..99ba073 100644
--- a/test/trash-background.test.js
+++ b/test/trash-background.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const background = await readFile(new URL("../background.js", import.meta.url), "utf8");
+const background = await readFile(new URL("../extension/background.js", import.meta.url), "utf8");
function functionBlock(name, nextName) {
const start = background.indexOf(`async function ${name}(`);
diff --git a/test/trash.test.js b/test/trash.test.js
index a99e27f..cc24021 100644
--- a/test/trash.test.js
+++ b/test/trash.test.js
@@ -13,7 +13,7 @@ import {
normalizeTrashState,
restoreTrashItems,
takeTrashItems
-} from "../trash.js";
+} from "../extension/trash.js";
test("trash state normalizes serializable items and valid deletion times", () => {
assert.deepEqual(createDefaultTrashState(), { version: TRASH_VERSION, items: [] });
diff --git a/test/ui-foundation.test.js b/test/ui-foundation.test.js
index 2403379..a41ce17 100644
--- a/test/ui-foundation.test.js
+++ b/test/ui-foundation.test.js
@@ -2,8 +2,8 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const foundation = await readFile(new URL("../ui-foundation.css", import.meta.url), "utf8");
-const sprite = await readFile(new URL("../assets/ui-icons.svg", import.meta.url), "utf8");
+const foundation = await readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8");
+const sprite = await readFile(new URL("../extension/assets/ui-icons.svg", import.meta.url), "utf8");
function relativeLuminance(hex) {
const channels = hex.match(/[a-f\d]{2}/gi).map((value) => parseInt(value, 16) / 255);
@@ -85,7 +85,7 @@ test("light fields use one neutral edge with a soft branded halo while dark focu
test("page styles keep domain layout without redefining shared theme roles", async () => {
for (const pageStyle of ["library.css", "curated.css", "collector.css", "skills-page.css", "composer-page.css"]) {
- const source = await readFile(new URL(`../${pageStyle}`, import.meta.url), "utf8");
+ const source = await readFile(new URL(`../extension/${pageStyle}`, import.meta.url), "utf8");
assert.doesNotMatch(source, /--paper:\s*#/i, `${pageStyle} 不应重新定义页面主题色`);
assert.doesNotMatch(source, /--accent:\s*#/i, `${pageStyle} 不应重新定义品牌色`);
assert.doesNotMatch(source, /(?:^|\n)button\s*\{/i, `${pageStyle} 不应重新定义通用按钮`);
@@ -94,7 +94,7 @@ test("page styles keep domain layout without redefining shared theme roles", asy
test("brand green is reserved for fills and indicators instead of light-theme copy", async () => {
for (const sourceFile of ["ui-foundation.css", "library.css", "curated.css", "collector.css", "skills-page.css", "composer-page.css", "share-preview.js"]) {
- const source = await readFile(new URL(`../${sourceFile}`, import.meta.url), "utf8");
+ const source = await readFile(new URL(`../extension/${sourceFile}`, import.meta.url), "utf8");
assert.doesNotMatch(source, /(?:^|[;{])\s*color:\s*var\(--(?:ui-)?accent-emphasis\)/m, `${sourceFile} 不应把品牌荧光绿直接用于文字`);
}
});
diff --git a/test/video-analysis-runner.test.js b/test/video-analysis-runner.test.js
index 8f06fff..331ebf6 100644
--- a/test/video-analysis-runner.test.js
+++ b/test/video-analysis-runner.test.js
@@ -1,9 +1,9 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { runVideoAnalysisJob } from "../video-analysis-runner.js";
-import { AnalysisResponseError } from "../analysis-response.js";
-import { analyzeVideoWithChatCompletions } from "../video-analysis.js";
+import { runVideoAnalysisJob } from "../extension/video-analysis-runner.js";
+import { AnalysisResponseError } from "../extension/analysis-response.js";
+import { analyzeVideoWithChatCompletions } from "../extension/video-analysis.js";
function job(overrides = {}) {
return {
diff --git a/test/video-analysis.test.js b/test/video-analysis.test.js
index 1d535f2..cd6ca8c 100644
--- a/test/video-analysis.test.js
+++ b/test/video-analysis.test.js
@@ -9,7 +9,7 @@ import {
requireVideoAnalysisConfirmation,
VIDEO_RECONSTRUCTION_CONTRACT_VERSION,
videoAnalysisPrompt
-} from "../video-analysis.js";
+} from "../extension/video-analysis.js";
test("a direct video request times out once without retrying or accepting a late response", async () => {
let calls = 0;
diff --git a/test/video-hover-preview.test.js b/test/video-hover-preview.test.js
index 750321c..9992ba7 100644
--- a/test/video-hover-preview.test.js
+++ b/test/video-hover-preview.test.js
@@ -2,7 +2,7 @@ import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
-const source = await readFile(new URL("../video-hover-preview.js", import.meta.url), "utf8");
+const source = await readFile(new URL("../extension/video-hover-preview.js", import.meta.url), "utf8");
test("video hover preview loads one local blob only after pointer entry", () => {
const beforeStart = source.slice(0, source.indexOf("const start"));
diff --git a/test/video-instructions.test.js b/test/video-instructions.test.js
index 8fd4a8b..d39c2a8 100644
--- a/test/video-instructions.test.js
+++ b/test/video-instructions.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { normalizeAiPreferences } from "../ai-runtime.js";
-import { videoAnalysisPrompt } from "../video-analysis.js";
+import { normalizeAiPreferences } from "../extension/ai-runtime.js";
+import { videoAnalysisPrompt } from "../extension/video-analysis.js";
test("video methods expose full audiovisual coverage while preserving custom rules", () => {
const defaults = normalizeAiPreferences({ version: 2 });
diff --git a/test/vision-analysis-cache.test.js b/test/vision-analysis-cache.test.js
index 7d9936a..9a8b2c5 100644
--- a/test/vision-analysis-cache.test.js
+++ b/test/vision-analysis-cache.test.js
@@ -1,7 +1,7 @@
import test from "node:test";
import assert from "node:assert/strict";
-import { findPersistedVisionAnalysis } from "../vision-analysis-cache.js";
+import { findPersistedVisionAnalysis } from "../extension/vision-analysis-cache.js";
function entryWithAnalysis(id, quality, overrides = {}) {
return {
diff --git a/test/vision.test.js b/test/vision.test.js
index aa2e6c0..22b120f 100644
--- a/test/vision.test.js
+++ b/test/vision.test.js
@@ -13,9 +13,9 @@ import {
permissionPatternsForVisionSettings,
probeCompatibleModels,
publicVisionSettings
-} from "../vision.js";
-import { createDefaultFacetCatalog } from "../facets.js";
-import { VISUAL_ANALYSIS_DIMENSIONS } from "../visual-analysis.js";
+} from "../extension/vision.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
+import { VISUAL_ANALYSIS_DIMENSIONS } from "../extension/visual-analysis.js";
function sampleCatalog() {
const catalog = createDefaultFacetCatalog();
diff --git a/test/visual-analysis.test.js b/test/visual-analysis.test.js
index 761d008..fe2967e 100644
--- a/test/visual-analysis.test.js
+++ b/test/visual-analysis.test.js
@@ -9,8 +9,8 @@ import {
normalizeVisualAnalysisV2,
normalizeVisualModelResponse,
prepareVisualSetSummary
-} from "../visual-analysis.js";
-import { createDefaultFacetCatalog } from "../facets.js";
+} from "../extension/visual-analysis.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
function completeAnalysis(overrides = {}) {
return {
diff --git a/test/visual-interaction.test.js b/test/visual-interaction.test.js
index da5b763..2ee8aa7 100644
--- a/test/visual-interaction.test.js
+++ b/test/visual-interaction.test.js
@@ -8,8 +8,8 @@ function rule(source, selector) {
}
test("the current project uses the product accent while other library selections stay restrained", async () => {
- const source = await readFile(new URL("../library.css", import.meta.url), "utf8");
- const foundation = await readFile(new URL("../ui-foundation.css", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/library.css", import.meta.url), "utf8");
+ const foundation = await readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8");
assert.match(foundation, /--selection:\s*color-mix\(in srgb, var\(--ui-text\) 6%, var\(--ui-surface\)\)/);
assert.match(foundation, /--selection-indicator:\s*var\(--ui-accent-emphasis\)/);
@@ -39,7 +39,7 @@ test("the current project uses the product accent while other library selections
});
test("Skill cards keep emphasis in titles and mute paths, body copy, and idle borders", async () => {
- const skills = await readFile(new URL("../skills-page.css", import.meta.url), "utf8");
+ const skills = await readFile(new URL("../extension/skills-page.css", import.meta.url), "utf8");
assert.match(rule(skills, ".skill-card"), /border:\s*1px solid var\(--ui-card-border\)/);
assert.match(rule(skills, ".skill-card"), /font-weight:\s*400/);
@@ -54,8 +54,8 @@ test("Skill cards keep emphasis in titles and mute paths, body copy, and idle bo
test("composer and Skill selections avoid oversized green outer rings", async () => {
const [composer, skills] = await Promise.all([
- readFile(new URL("../composer-page.css", import.meta.url), "utf8"),
- readFile(new URL("../skills-page.css", import.meta.url), "utf8")
+ readFile(new URL("../extension/composer-page.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/skills-page.css", import.meta.url), "utf8")
]);
assert.match(rule(composer, ".composer-input-box:focus-within"), /box-shadow:\s*inset 0 0 0 1px var\(--focus-ring\)/);
@@ -69,9 +69,9 @@ test("composer and Skill selections avoid oversized green outer rings", async ()
test("composer session delete menu reuses the compact shared danger action", async () => {
const [foundation, composer, runtime] = await Promise.all([
- readFile(new URL("../ui-foundation.css", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.css", import.meta.url), "utf8"),
- readFile(new URL("../composer-page.js", import.meta.url), "utf8")
+ readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/composer-page.js", import.meta.url), "utf8")
]);
assert.match(runtime, /composer-session-delete quiet-danger/);
assert.match(rule(composer, ".composer-session-menu-panel"), /min-width:\s*84px/);
@@ -83,7 +83,7 @@ test("composer session delete menu reuses the compact shared danger action", asy
});
test("collector highlights use the shared restrained interaction language", async () => {
- const source = await readFile(new URL("../collector.css", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/collector.css", import.meta.url), "utf8");
const targetBannerSource = source.slice(source.lastIndexOf("\n.target-banner {"));
assert.match(rule(targetBannerSource, ".target-banner"), /box-shadow:\s*inset 2px 0 var\(--selection-indicator\)/);
@@ -95,10 +95,10 @@ test("collector highlights use the shared restrained interaction language", asyn
test("capture notifications use the shared neutral toast instead of legacy green text", async () => {
const [foundation, collector, collectorHtml, libraryHtml] = await Promise.all([
- readFile(new URL("../ui-foundation.css", import.meta.url), "utf8"),
- readFile(new URL("../collector.css", import.meta.url), "utf8"),
- readFile(new URL("../collector.html", import.meta.url), "utf8"),
- readFile(new URL("../library.html", import.meta.url), "utf8")
+ readFile(new URL("../extension/ui-foundation.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/collector.css", import.meta.url), "utf8"),
+ readFile(new URL("../extension/collector.html", import.meta.url), "utf8"),
+ readFile(new URL("../extension/library.html", import.meta.url), "utf8")
]);
const toast = rule(foundation, ".ui-feedback-toast");
@@ -115,7 +115,7 @@ test("capture notifications use the shared neutral toast instead of legacy green
});
test("smart visual picker uses a fine neutral edge with a small branded check", async () => {
- const source = await readFile(new URL("../capture-region.css", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/capture-region.css", import.meta.url), "utf8");
const candidate = rule(source, "#__prompt_case_visual_picker__ .prompt-case-visual-candidate");
const hovered = rule(source, "#__prompt_case_visual_picker__ .prompt-case-visual-candidate:hover");
const selected = rule(source, "#__prompt_case_visual_picker__ .prompt-case-visual-candidate.is-selected");
@@ -130,7 +130,7 @@ test("smart visual picker uses a fine neutral edge with a small branded check",
});
test("smart visual picker shields video controls and defers dynamic remeasurement until the click completes", async () => {
- const source = await readFile(new URL("../capture-region.js", import.meta.url), "utf8");
+ const source = await readFile(new URL("../extension/capture-region.js", import.meta.url), "utf8");
assert.match(source, /document\.addEventListener\(type, stopUnderlyingPageEvent, \{ capture: true, passive: false \}\)/);
assert.match(source, /if \(activeCandidateInteraction\) \{[\s\S]*pendingCandidateRefresh = true/);
assert.match(source, /button\.addEventListener\("pointerdown"/);
diff --git a/test/x-video-capture.test.js b/test/x-video-capture.test.js
index bcb8a99..61a0a29 100644
--- a/test/x-video-capture.test.js
+++ b/test/x-video-capture.test.js
@@ -1,7 +1,7 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import vm from 'node:vm';
-import { installXVideoObserver, applyXVideoSources, resolveXVideoSources } from '../x-video-capture.js';
+import { installXVideoObserver, applyXVideoSources, resolveXVideoSources } from '../extension/x-video-capture.js';
const variant = (name, bitrate = 1) => ({url:`https://video.twimg.com/${name}.mp4`,content_type:'video/mp4',bitrate});
const post = (id, name) => ({rest_id:id,legacy:{extended_entities:{media:[{id_str:`media-${id}`,media_url_https:`https://pbs.twimg.com/${name}.jpg`,video_info:{variants:[variant(name),variant(`${name}-hd`,10)]}}]}}});
diff --git a/test/zip.test.js b/test/zip.test.js
index e819041..19b1c7c 100644
--- a/test/zip.test.js
+++ b/test/zip.test.js
@@ -2,8 +2,8 @@ import test from "node:test";
import assert from "node:assert/strict";
import { deflateRawSync } from "node:zlib";
-import { createZipBlob, openZipBlob, readZipBlob } from "../zip.js";
-import { PORTABLE_LIBRARY_LIMITS } from "../resource-limits.js";
+import { createZipBlob, openZipBlob, readZipBlob } from "../extension/zip.js";
+import { PORTABLE_LIBRARY_LIMITS } from "../extension/resource-limits.js";
test("ZIP roundtrip preserves original image bytes above the document limit", async () => {
assert.equal(PORTABLE_LIBRARY_LIMITS.maxImageBytes, 32 * 1024 * 1024);
diff --git a/tools/build-brand-icons.mjs b/tools/build-brand-icons.mjs
index 012dac9..6e00bd0 100644
--- a/tools/build-brand-icons.mjs
+++ b/tools/build-brand-icons.mjs
@@ -4,8 +4,8 @@ import { fileURLToPath } from "node:url";
import { Resvg } from "@resvg/resvg-js";
const projectRoot = fileURLToPath(new URL("../", import.meta.url));
-const manifest = JSON.parse(await readFile(join(projectRoot, "manifest.json"), "utf8"));
-const source = await readFile(join(projectRoot, "assets", "icons", "icon-source.svg"));
+const manifest = JSON.parse(await readFile(join(projectRoot, "extension", "manifest.json"), "utf8"));
+const source = await readFile(join(projectRoot, "extension", "assets", "icons", "icon-source.svg"));
const targets = new Map(Object.entries({ ...manifest.icons, ...manifest.action?.default_icon })
.map(([size, path]) => [Number(size), path])
.filter(([size, path]) => Number.isInteger(size) && size > 0 && /^assets\/icons\/icon-\d+\.png$/.test(path)));
@@ -19,7 +19,7 @@ for (const [size, relativePath] of [...targets].sort(([left], [right]) => left -
}).render();
validatePixels(rendered, size, relativePath);
const png = rendered.asPng();
- const target = join(projectRoot, relativePath);
+ const target = join(projectRoot, "extension", relativePath);
if (checkOnly) {
const current = await readFile(target).catch(() => null);
if (!current?.equals(png)) throw new Error(`${relativePath} 不是 SVG 母版生成的当前品牌图标`);
diff --git a/tools/build-store-assets.mjs b/tools/build-store-assets.mjs
index a056314..0fdf86b 100644
--- a/tools/build-store-assets.mjs
+++ b/tools/build-store-assets.mjs
@@ -5,7 +5,7 @@ import { Resvg } from "@resvg/resvg-js";
const projectRoot = fileURLToPath(new URL("../", import.meta.url));
const checkOnly = process.argv.includes("--check");
-const iconSource = await readFile(join(projectRoot, "assets/icons/icon-source.svg"));
+const iconSource = await readFile(join(projectRoot, "extension/assets/icons/icon-source.svg"));
const promoSource = await readFile(join(projectRoot, "store/brand/prompt-director-promo-source.svg"));
const outputs = [
diff --git a/tools/build-ui-icons.mjs b/tools/build-ui-icons.mjs
index ca53317..9d727a9 100644
--- a/tools/build-ui-icons.mjs
+++ b/tools/build-ui-icons.mjs
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
const projectRoot = fileURLToPath(new URL("../", import.meta.url));
const sourcePath = join(projectRoot, "node_modules", "lucide-static", "icon-nodes.json");
-const outputPath = join(projectRoot, "assets", "ui-icons.svg");
+const outputPath = join(projectRoot, "extension", "assets", "ui-icons.svg");
const iconNames = [
"arrow-down", "arrow-left", "arrow-up", "check", "chevron-down", "chevron-left", "chevron-right", "circle-check-big", "clipboard", "copy",
"download", "ellipsis", "external-link", "file-text", "folder", "image", "library",
@@ -27,7 +27,7 @@ const sprite = [
""
].join("\n");
-await mkdir(join(projectRoot, "assets"), { recursive: true });
+await mkdir(join(projectRoot, "extension", "assets"), { recursive: true });
await writeFile(outputPath, sprite);
process.stdout.write(`${outputPath}\n${iconNames.length} 个本地图标\n`);
diff --git a/tools/capture-runtime.mjs b/tools/capture-runtime.mjs
index a753851..9f021f8 100644
--- a/tools/capture-runtime.mjs
+++ b/tools/capture-runtime.mjs
@@ -1,6 +1,6 @@
import { readFile, writeFile } from "node:fs/promises";
-import { installXVideoObserver } from "../x-video-capture.js";
-import { PAGE_CAPTURE_LIMITS, PORTABLE_LIBRARY_LIMITS } from "../resource-limits.js";
+import { installXVideoObserver } from "../extension/x-video-capture.js";
+import { PAGE_CAPTURE_LIMITS, PORTABLE_LIBRARY_LIMITS } from "../extension/resource-limits.js";
const check = process.argv.includes("--check");
const root = new URL("../", import.meta.url);
@@ -10,7 +10,7 @@ const files = new Map([
["hls-runtime.js", await readFile(new URL("node_modules/hls.js/dist/hls.min.js", root))]
]);
for (const [name, bytes] of files) {
- const path = new URL(name, root);
+ const path = new URL(`extension/${name}`, root);
if (check) {
if (!bytes.equals(await readFile(path))) throw new Error(`Capture runtime differs: ${name}`);
} else await writeFile(path, bytes);
diff --git a/tools/check-data-compatibility.mjs b/tools/check-data-compatibility.mjs
index bfdf0c0..f25781f 100644
--- a/tools/check-data-compatibility.mjs
+++ b/tools/check-data-compatibility.mjs
@@ -6,10 +6,10 @@ import { fileURLToPath } from "node:url";
import {
CURRENT_LIBRARY_PACKAGE_VERSION,
SUPPORTED_LIBRARY_PACKAGE_VERSIONS
-} from "../library-package-format.js";
-import { prepareLibraryPackageDraft } from "../library-package-migrations.js";
-import { migrateLibraryState } from "../migration.js";
-import { SCHEMA_VERSION } from "../taxonomy.js";
+} from "../extension/library-package-format.js";
+import { prepareLibraryPackageDraft } from "../extension/library-package-migrations.js";
+import { migrateLibraryState } from "../extension/migration.js";
+import { SCHEMA_VERSION } from "../extension/taxonomy.js";
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
const fixtureRoot = join(projectRoot, "test", "fixtures", "compat");
@@ -80,8 +80,9 @@ function latestReleaseTag() {
}
function releaseVersions(tag) {
- const taxonomy = gitFile(tag, "taxonomy.js");
- const packageFormat = gitFile(tag, "library-package-format.js");
+ const sourcePrefix = execFileSync("git", ["ls-tree", "--name-only", tag, "extension/manifest.json"], { cwd: projectRoot, encoding: "utf8" }).trim() ? "extension/" : "";
+ const taxonomy = gitFile(tag, `${sourcePrefix}taxonomy.js`);
+ const packageFormat = gitFile(tag, `${sourcePrefix}library-package-format.js`);
const schemaVersion = integerConstant(taxonomy, "SCHEMA_VERSION");
const currentPackageVersion = integerConstant(packageFormat, "CURRENT_LIBRARY_PACKAGE_VERSION");
const supportedLiteral = packageFormat.match(/SUPPORTED_LIBRARY_PACKAGE_VERSIONS\s*=\s*Object\.freeze\(\[([^\]]+)\]\)/u)?.[1];
diff --git a/tools/check-source.mjs b/tools/check-source.mjs
index a5d9337..7d60734 100644
--- a/tools/check-source.mjs
+++ b/tools/check-source.mjs
@@ -4,7 +4,7 @@ import { extname, join } from "node:path";
import { fileURLToPath } from "node:url";
const projectRoot = fileURLToPath(new URL("../", import.meta.url));
-const sourceDirectories = [projectRoot, join(projectRoot, "tools")];
+const sourceDirectories = [join(projectRoot, "extension"), join(projectRoot, "tools")];
const sourceFiles = [];
for (const directory of sourceDirectories) {
diff --git a/tools/check-store-readiness.mjs b/tools/check-store-readiness.mjs
index ba9ba80..680991d 100644
--- a/tools/check-store-readiness.mjs
+++ b/tools/check-store-readiness.mjs
@@ -6,10 +6,10 @@ import { validateChromeStoreManifest } from "./chrome-store-manifest.mjs";
import { extensionIdFromPublicKey } from "./release-identity.mjs";
const projectRoot = fileURLToPath(new URL("../", import.meta.url));
-const manifest = await json("manifest.json");
+const manifest = await json("extension/manifest.json");
const locales = Object.fromEntries(await Promise.all(["zh_CN", "en"].map(async (locale) => [
locale,
- await json(`_locales/${locale}/messages.json`)
+ await json(`extension/_locales/${locale}/messages.json`)
])));
validateChromeStoreManifest({ manifest, locales });
const extensionId = extensionIdFromPublicKey(manifest);
@@ -44,7 +44,7 @@ for (const phrase of ["Remote code", "Limited Use", "npm run package:release", e
}
for (const [path, expectedWidth, expectedHeight] of [
- ["assets/icons/icon-128.png", 128, 128],
+ ["extension/assets/icons/icon-128.png", 128, 128],
["store/small-promo-440x280.png", 440, 280],
["store/screenshots/01-library-1280x800.png", 1280, 800],
["store/screenshots/02-skills-1280x800.png", 1280, 800],
diff --git a/tools/document-runtime.mjs b/tools/document-runtime.mjs
index 85762b7..6186d19 100644
--- a/tools/document-runtime.mjs
+++ b/tools/document-runtime.mjs
@@ -3,7 +3,7 @@ import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const projectRoot = fileURLToPath(new URL("../", import.meta.url));
-const targetRoot = join(projectRoot, "vendor", "document-ingestion");
+const targetRoot = join(projectRoot, "extension", "vendor", "document-ingestion");
const checkOnly = process.argv.includes("--check");
const rtfDist = join(projectRoot, "node_modules", "@jonahschulte", "rtf-toolkit", "dist");
const sources = [
diff --git a/tools/hash-runtime.mjs b/tools/hash-runtime.mjs
index 6846075..1ebacb1 100644
--- a/tools/hash-runtime.mjs
+++ b/tools/hash-runtime.mjs
@@ -2,7 +2,7 @@ import { mkdir, readFile, writeFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
const source = new URL("../node_modules/@noble/hashes/", import.meta.url);
-const target = new URL("../vendor/noble-hashes/", import.meta.url);
+const target = new URL("../extension/vendor/noble-hashes/", import.meta.url);
const check = process.argv.includes("--check");
const files = ["sha2.js", "_md.js", "_u64.js", "utils.js", "LICENSE"];
if (!check) await mkdir(target, { recursive: true });
diff --git a/tools/local-extension-lab.mjs b/tools/local-extension-lab.mjs
index 38a4658..c96ae26 100644
--- a/tools/local-extension-lab.mjs
+++ b/tools/local-extension-lab.mjs
@@ -5,7 +5,7 @@ import { dirname, join, resolve, sep } from "node:path";
import { fileURLToPath } from "node:url";
import { extensionArchiveName, extensionIdFromPublicKey } from "./release-identity.mjs";
-import { readZipBlob } from "../zip.js";
+import { readZipBlob } from "../extension/zip.js";
const projectRoot = fileURLToPath(new URL("../", import.meta.url));
export const REQUIRED_MODEL_CHAIN_SCRIPTS = [
@@ -147,7 +147,7 @@ export function buildLabReceipt({
async function main() {
const startedAt = new Date().toISOString();
- const manifest = JSON.parse(await readFile(join(projectRoot, "manifest.json"), "utf8"));
+ const manifest = JSON.parse(await readFile(join(projectRoot, "extension", "manifest.json"), "utf8"));
const archiveName = extensionArchiveName(manifest);
const archivePath = join(projectRoot, "dist", archiveName);
const archiveBytes = await readFile(archivePath);
diff --git a/tools/package-extension.mjs b/tools/package-extension.mjs
index 3edb68d..8e54d98 100644
--- a/tools/package-extension.mjs
+++ b/tools/package-extension.mjs
@@ -1,15 +1,16 @@
import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
import { basename, extname, join, relative } from "node:path";
import { fileURLToPath } from "node:url";
-import { createZipBlob } from "../zip.js";
+import { createZipBlob } from "../extension/zip.js";
import { validateChromeStoreManifest } from "./chrome-store-manifest.mjs";
import { verifyPdfjsRuntime } from "./pdfjs-runtime.mjs";
import { chromeStoreUploadManifest, extensionArchiveName } from "./release-identity.mjs";
import { packageRuntimeFiles } from "./extension-package-variants.mjs";
-import { isExtensionProgramPath } from "../local-extension-upgrade.js";
+import { isExtensionProgramPath } from "../extension/local-extension-upgrade.js";
const projectRoot = fileURLToPath(new URL("../", import.meta.url));
-const sourceManifest = JSON.parse(await readFile(join(projectRoot, "manifest.json"), "utf8"));
+const extensionRoot = join(projectRoot, "extension");
+const sourceManifest = JSON.parse(await readFile(join(projectRoot, "extension", "manifest.json"), "utf8"));
const release = process.argv.includes("--release");
const manifest = release ? chromeStoreUploadManifest(sourceManifest) : sourceManifest;
const runtimeExtensions = new Set([".css", ".html", ".js"]);
@@ -17,49 +18,49 @@ const files = [];
await verifyPdfjsRuntime({ projectRoot });
-for (const name of await readdir(projectRoot)) {
+for (const name of await readdir(extensionRoot)) {
if (name === "manifest.json") {
files.push({ name, data: Buffer.from(`${JSON.stringify(manifest, null, 2)}\n`) });
} else if (runtimeExtensions.has(extname(name))) {
- files.push(await packageFile(join(projectRoot, name)));
+ files.push(await packageFile(join(extensionRoot, name)));
}
}
for (const name of ["LICENSE", "NOTICE", "THIRD_PARTY_NOTICES.md"]) {
- files.push(await packageFile(join(projectRoot, name)));
+ files.push({ name, data: await readFile(join(projectRoot, name)) });
}
-for (const name of await readdir(join(projectRoot, "assets", "icons"))) {
+for (const name of await readdir(join(projectRoot, "extension", "assets", "icons"))) {
if (name === "icon-source.svg" || /^icon-(?:16|32|48|128)\.png$/.test(name)) {
- files.push(await packageFile(join(projectRoot, "assets", "icons", name)));
+ files.push(await packageFile(join(projectRoot, "extension", "assets", "icons", name)));
}
}
-files.push(await packageFile(join(projectRoot, "assets", "ui-icons.svg")));
+files.push(await packageFile(join(projectRoot, "extension", "assets", "ui-icons.svg")));
-for (const path of await runtimeFiles(join(projectRoot, "vendor", "pdfjs"))) {
+for (const path of await runtimeFiles(join(projectRoot, "extension", "vendor", "pdfjs"))) {
files.push(await packageFile(path));
}
-for (const path of await runtimeFiles(join(projectRoot, "vendor", "document-ingestion"))) {
+for (const path of await runtimeFiles(join(projectRoot, "extension", "vendor", "document-ingestion"))) {
files.push(await packageFile(path));
}
-for (const path of await runtimeFiles(join(projectRoot, "vendor", "noble-hashes"))) {
+for (const path of await runtimeFiles(join(projectRoot, "extension", "vendor", "noble-hashes"))) {
files.push(await packageFile(path));
}
-for (const locale of await readdir(join(projectRoot, "_locales"), { withFileTypes: true })) {
+for (const locale of await readdir(join(projectRoot, "extension", "_locales"), { withFileTypes: true })) {
if (locale.isDirectory()) {
- files.push(await packageFile(join(projectRoot, "_locales", locale.name, "messages.json")));
+ files.push(await packageFile(join(projectRoot, "extension", "_locales", locale.name, "messages.json")));
}
}
-const locales = Object.fromEntries(await Promise.all((await readdir(join(projectRoot, "_locales"), { withFileTypes: true }))
+const locales = Object.fromEntries(await Promise.all((await readdir(join(projectRoot, "extension", "_locales"), { withFileTypes: true }))
.filter((locale) => locale.isDirectory())
.map(async (locale) => [
locale.name,
- JSON.parse(await readFile(join(projectRoot, "_locales", locale.name, "messages.json"), "utf8"))
+ JSON.parse(await readFile(join(projectRoot, "extension", "_locales", locale.name, "messages.json"), "utf8"))
])));
validateChromeStoreManifest({ manifest, locales });
validateManifest(manifest, files.map((file) => file.name));
@@ -75,7 +76,7 @@ process.stdout.write(`${outputPath}\n${runtimeFilesForDistribution.length} 个
async function packageFile(path) {
return {
- name: relative(projectRoot, path).replaceAll("\\", "/"),
+ name: relative(extensionRoot, path).replaceAll("\\", "/"),
data: await readFile(path)
};
}
diff --git a/tools/pdfjs-runtime.mjs b/tools/pdfjs-runtime.mjs
index cfcbe9c..1d9bfba 100644
--- a/tools/pdfjs-runtime.mjs
+++ b/tools/pdfjs-runtime.mjs
@@ -50,7 +50,7 @@ function pdfjsPaths(projectRoot) {
packageLock: join(root, "package-lock.json"),
installedPackage: join(root, "node_modules", "pdfjs-dist", "package.json"),
installedRoot: join(root, "node_modules", "pdfjs-dist"),
- vendorRoot: join(root, "vendor", "pdfjs")
+ vendorRoot: join(root, "extension", "vendor", "pdfjs")
};
}
diff --git a/tools/run-release-upgrade-e2e.mjs b/tools/run-release-upgrade-e2e.mjs
index 8c5c766..7223393 100644
--- a/tools/run-release-upgrade-e2e.mjs
+++ b/tools/run-release-upgrade-e2e.mjs
@@ -6,7 +6,7 @@ import { fileURLToPath } from "node:url";
import { extensionArchiveName } from "./release-identity.mjs";
import { verifyDataCompatibility } from "./check-data-compatibility.mjs";
-import { compareExtensionVersions } from "../extension-update.js";
+import { compareExtensionVersions } from "../extension/extension-update.js";
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
const python = process.env.PYTHON || "python3";
@@ -14,7 +14,7 @@ const temporaryRoot = await mkdtemp(join(tmpdir(), "promptdirector-release-upgra
try {
const report = await verifyDataCompatibility();
- const manifest = JSON.parse(await readFile(join(projectRoot, "manifest.json"), "utf8"));
+ const manifest = JSON.parse(await readFile(join(projectRoot, "extension", "manifest.json"), "utf8"));
let baselineTag = report.releaseBaseline.tag;
if (compareExtensionVersions(baselineTag.replace(/^v/u, ""), manifest.version) >= 0) {
baselineTag = execFileSync("git", ["tag", "--merged", "HEAD", "--sort=-version:refname", "--list", "v[0-9]*"], { cwd: projectRoot, encoding: "utf8" })
@@ -47,7 +47,7 @@ try {
...process.env,
PROMPTDIRECTOR_NODE: process.execPath,
PROMPTDIRECTOR_CURRENT_ARCHIVE: currentArchive,
- PROMPTDIRECTOR_PREVIOUS_EXTENSION_DIR: previousDirectory,
+ PROMPTDIRECTOR_PREVIOUS_EXTENSION_DIR: await sourceExtensionDirectory(previousDirectory),
PROMPTDIRECTOR_CURRENT_EXTENSION_DIR: currentDirectory,
PROMPTDIRECTOR_PREVIOUS_RELEASE_TAG: baselineTag
}
@@ -55,7 +55,7 @@ try {
const nativePreviousDirectory = join(temporaryRoot, "native-previous-release");
await mkdir(nativePreviousDirectory);
execFileSync(python, ["-m", "zipfile", "-e", previousArchive, nativePreviousDirectory], { stdio: "inherit" });
- execFileSync(python, [join(projectRoot, "test", "local_upgrade_native_e2e.py"), nativePreviousDirectory, currentArchive], {
+ execFileSync(python, [join(projectRoot, "test", "local_upgrade_native_e2e.py"), await sourceExtensionDirectory(nativePreviousDirectory), currentArchive], {
cwd: projectRoot,
stdio: "inherit",
env: process.env
@@ -67,3 +67,11 @@ try {
} finally {
await rm(temporaryRoot, { recursive: true, force: true });
}
+
+async function sourceExtensionDirectory(directory) {
+ const nested = join(directory, "extension");
+ try { await access(join(nested, "manifest.json")); return nested; }
+ catch (error) { if (error.code !== "ENOENT") throw error; }
+ await access(join(directory, "manifest.json"));
+ return directory;
+}
diff --git a/tools/validate-release-identity.mjs b/tools/validate-release-identity.mjs
index 4dc7dff..1fd54e6 100644
--- a/tools/validate-release-identity.mjs
+++ b/tools/validate-release-identity.mjs
@@ -3,7 +3,7 @@ import { fileURLToPath } from "node:url";
import { requireStableExtensionIdentity } from "./release-identity.mjs";
-const manifestUrl = new URL("../manifest.json", import.meta.url);
+const manifestUrl = new URL("../extension/manifest.json", import.meta.url);
const manifest = JSON.parse(await readFile(fileURLToPath(manifestUrl), "utf8"));
requireStableExtensionIdentity(manifest);
process.stdout.write("正式扩展身份已校验\n");
diff --git a/tools/zhipu-live-smoke.mjs b/tools/zhipu-live-smoke.mjs
index 61d3ba0..56319e2 100644
--- a/tools/zhipu-live-smoke.mjs
+++ b/tools/zhipu-live-smoke.mjs
@@ -2,22 +2,22 @@ import { createHash } from "node:crypto";
import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
-import { createAiProviderModule } from "../ai-provider-module.js";
-import { getAiProviderPreset } from "../ai-provider-presets.js";
-import { analyzeTextDetailedWithDeepSeek } from "../deepseek.js";
-import { createDefaultFacetCatalog } from "../facets.js";
+import { createAiProviderModule } from "../extension/ai-provider-module.js";
+import { getAiProviderPreset } from "../extension/ai-provider-presets.js";
+import { analyzeTextDetailedWithDeepSeek } from "../extension/deepseek.js";
+import { createDefaultFacetCatalog } from "../extension/facets.js";
import {
aiConfigurationFromStorage,
projectAiRuntime,
resolveTextTaskSettings,
resolveVideoAnalysisTask,
resolveVisionTaskSettings
-} from "../ai-runtime.js";
-import { createComposerSession, normalizeComposerSettings } from "../composer.js";
-import { executeComposerTurnWithService, planComposerTurnWithService } from "../composer-service.js";
-import { extractCreativeSkillDraft } from "../creative-skill-service.js";
-import { analyzeVideoWithChatCompletions } from "../video-analysis.js";
-import { analyzeImageWithVision, createVisionRequestBudget } from "../vision.js";
+} from "../extension/ai-runtime.js";
+import { createComposerSession, normalizeComposerSettings } from "../extension/composer.js";
+import { executeComposerTurnWithService, planComposerTurnWithService } from "../extension/composer-service.js";
+import { extractCreativeSkillDraft } from "../extension/creative-skill-service.js";
+import { analyzeVideoWithChatCompletions } from "../extension/video-analysis.js";
+import { analyzeImageWithVision, createVisionRequestBudget } from "../extension/vision.js";
const MODEL = String(process.env.PROMPTDIRECTOR_ZHIPU_MODEL ?? "glm-5.3-flash").trim();
const ALL_TASKS = ["textTags", "skillExtraction", "creativePlanning", "imageAnalysis", "videoAnalysis"];