Commit Graph
6 Commits
Author SHA1 Message Date
Qiu Yuzhou fe4c3e166e refactor(ng2): centralize typed failure presentation 2026-09-23 10:51:26 +08:00
Qiu Yuzhou ea801d5f38 feat(catalog): remove node enable state
Migrate legacy enabled fields to v3 without preserving their semantics.
Keep recoverable invalid imports visible and filter them during activation.
2026-09-22 08:40:13 +08:00
Qiu Yuzhou 00fcd61a99 refactor(ng2): change bundle id to ShadowsocksX-NG2
Distinct id from Legacy (com.qiuyuzhou.ShadowsocksX-NG) lets NG2 own
~/Library/Application Support/ShadowsocksX-NG2/ directly; the v2/
subdir prefix is removed from all runtime paths.

- app/agent/tests targets + LaunchAgent plist renamed accordingly
- keychain service, queue labels, and Vendor signIdentifiers follow
  the new bundle id; embedded helpers re-sign at build time
- Legacy handoff/import constants keep pointing at the old id

Migration: dev data under ShadowsocksX-NG/v2/ is not carried over
(fresh catalog/activation); old LaunchAgent registration and old
keychain entries must be cleaned up manually.
2026-09-21 20:33:37 +08:00
Qiu Yuzhou 0ecca53a20 feat(ng2): subscription fetch, snapshot semantics and UI (#35)
SIP-008 v1 + x_shadowsocksx_ng extension parsing with flat fallback;
HTTPS/Content-Type gated fetch seam; atomic snapshot commits carrying
only the local enabled overlay; URL edit keeps identity; recursive
delete clears source, fixed group, members and credentials; subscription
cards pane and menu-bar update-all wiring.
2026-09-21 06:15:52 +08:00
Qiu Yuzhou 9439e597e2 feat(ng2): activation semantics and runtime config derivation (#26)
激活状态机与派生层(spec #21 D3 激活族 + D5 派生):

- ActivationStateMachine:持久化活动目标(服务器或分组);激活原子成功
  或点名失败(保留原目标与运行状态);目录提交后立即重展开,失效即清除
  并发出停止意图(删除/禁用/变空/无效叶子各路径,无静默回退)
- 组激活按显式子序递归展开有效启用叶子;组目标保持组 UUID
- SslocalRuntimeDocument:完整 sslocal JSON 契约文档,凭据派生时解析,
  插件字段无插件时整体省略;ManagedPluginProviding 缝按「未提供」参与
  无效判定(真实受管集 #38 接通)
- ActivationStateFileStore:activation.json 持久化(0700/0600、原子替换,
  损坏按安全侧恢复为无活动目标);与 CatalogFileStore 共享 AtomicFileWriter
2026-09-20 18:50:58 +08:00
Qiu Yuzhou 0cf28c97fe feat(ng2): config catalog domain core with credential refs (#25)
配置目录领域核心(spec #21 D3/D5,票 #25):

- Domain/ 新增配置目录树:单父、显子序、无环;手动/订阅来源严格分离;
  有效启用 = 节点及其全部祖先启用;手动节点携带子树移动与重排;
  非空手动组递归删除(返回被删条目供 Keychain 清理);空组持久保留;
  非法操作(跨来源、身份复用即共享父、成环、订阅节点结构改动、
  订阅服务器直挂根)全部带明确原因拒绝且状态不动。
- 凭据引用:密码/插件参数只在 Keychain 存权威副本,配置树只持
  CredentialReference;KeychainCredentialStore 写读一致、覆盖写、幂等删。
- CatalogFileStore:v2/catalog.json 目录 0700/文件 0600,临时文件原子替换;
  缺失 → 空目录,损坏/版本未知/结构不一致(悬空、共享父、成环含根外孤环、
  不可达)→ 命名明确的 corrupt,结构校验收敛在
  ConfigurationCatalog.validated 工厂。
- 测试 43 项覆盖全部验收项;project.yml 增加 Domain/ 源码目录。
- .swiftlint.yml 关闭 trailing_comma(与 .swift-format 尾逗号基线冲突,
  触发案例见文件内注释),README/AGENTS.md 同步 Domain/ 与工具说明。
2026-09-20 15:22:09 +08:00