@hex4c59/pi-ext-config-sync 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 - 2026-11-17
4
+
5
+ ### Added
6
+
7
+ - `/sync` 命令:`setup`、`login`、`logout`、`status`、`pull`、`push`、`repo`、`branch`、`auto`。
8
+ - GitHub 设备码登录,令牌保存在 `auth.json` 的 `config-sync` 条目。
9
+ - 通过私有仓库同步 `settings.json`、`models.json`、`mcp.json`、`keybindings.json`、`AGENTS.md`、`SYSTEM.md`、`APPEND_SYSTEM.md`、`themes/`、`prompts/` 和 `skills/`。
10
+ - 本机专用设置字段过滤,拉取时与远端设置合并。
11
+ - 基于上次基准、本机和远端哈希的逐文件冲突检测,支持整体或逐文件选择。
12
+ - `auth.json` 中 `api_key` 凭据的口令加密同步,使用 scrypt 和 AES-256-GCM。
13
+ - `models.json` / `mcp.json` 明文字段检查。
14
+ - 拉取前备份被覆盖或删除的本机文件,最多保留 10 份。
15
+ - 可选的启动时自动拉取。
16
+ - 默认拒绝公开仓库,非 config-sync 仓库需要确认后才覆盖。
17
+ - 空仓库或缺少目标分支时,先用 Contents API 建立首个提交,再执行完整推送。
18
+
19
+ ### Notes
20
+
21
+ - 0.1.0 为首次发布。
22
+ - 已用隔离配置和真实私有仓库完成推送 / 拉取联调;设备码登录已用真实 GitHub OAuth App 验证,并使用登录得到的令牌重跑联调。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Hex4C59
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,224 @@
1
- # Temporary Holding Version
1
+ # config-sync
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 把选定范围的 Pi 配置和加密后的 API 密钥同步到一个私有 GitHub 仓库。每台设备登录同一个 GitHub 账号后,用 `/sync pull` 拉取配置,用 `/sync push` 上传改动。
4
+
5
+ ## 登录方式
6
+
7
+ 这个扩展使用 GitHub 设备码登录,不需要 Google 账号。Google 登录只能证明“你是谁”,不能授权写入某个 GitHub 仓库;要访问仓库,仍然必须由 GitHub 发放令牌。
8
+
9
+ 设备码流程适合没有浏览器的场景:Pi 显示一个网址和一次性代码,在任意浏览器里输入代码并授权即可。扩展只保存 GitHub 返回的访问令牌,不接触 GitHub 密码。
10
+
11
+ ## 安装
12
+
13
+ 正式安装:
14
+
15
+ ```bash
16
+ pi install npm:@hex4c59/pi-ext-config-sync
17
+ ```
18
+
19
+ 从源码开发时,在仓库根目录临时加载:
20
+
21
+ ```bash
22
+ pi -e ./config-sync
23
+ ```
24
+
25
+ ## 准备 GitHub OAuth App
26
+
27
+ 每个使用者需要自己的 OAuth App,扩展不内置客户端凭据。
28
+
29
+ 1. 打开 GitHub 的 `Settings` → `Developer settings` → `OAuth Apps` → `New OAuth App`。
30
+ 2. 填写名称、主页地址和 `Authorization callback URL`。设备码流程不使用回调地址,填一个可访问的地址即可,例如 `https://github.com`。
31
+ 3. 创建后在应用设置里勾选 `Enable Device Flow`。
32
+ 4. 复制 `Client ID`。不需要 `Client Secret`。
33
+
34
+ 然后在 Pi 中保存客户端 ID:
35
+
36
+ ```text
37
+ /sync setup <client-id>
38
+ ```
39
+
40
+ 客户端 ID 不是密钥,会写入本机的 `~/.pi/agent/config-sync/config.json`。
41
+
42
+ ## 第一次使用
43
+
44
+ 第一台设备:
45
+
46
+ ```text
47
+ /sync setup <client-id>
48
+ /sync login
49
+ /sync push
50
+ ```
51
+
52
+ `/sync login` 会显示 `https://github.com/login/device` 和一次性代码,并把代码复制到剪贴板。授权完成后,令牌保存在 `auth.json` 中。
53
+
54
+ `/sync push` 默认使用 `<GitHub 登录名>/pi-config`。仓库不存在时,会在确认后创建为私有仓库。第一次推送凭据时,需要设置一个至少 8 个字符的口令;仓库里保存的是用该口令加密的 `secrets.enc`,不保存口令本身。
55
+
56
+ 第二台设备:
57
+
58
+ ```text
59
+ /sync setup <client-id>
60
+ /sync login
61
+ /sync pull
62
+ ```
63
+
64
+ 拉取完成后,按提示重载 Pi。
65
+
66
+ 也可以显式指定仓库和分支:
67
+
68
+ ```text
69
+ /sync repo <owner/name>
70
+ /sync branch <name>
71
+ /sync repo default
72
+ /sync branch default
73
+ ```
74
+
75
+ 回退到默认值会清除本机记录的上次同步基准,下一次拉取或推送会重新比较全部文件。
76
+
77
+ ## 命令
78
+
79
+ | 命令 | 作用 |
80
+ | --- | --- |
81
+ | `/sync help` | 显示命令列表 |
82
+ | `/sync setup <client-id>` | 保存 GitHub OAuth App 的 Client ID |
83
+ | `/sync login` | 开始 GitHub 设备码登录 |
84
+ | `/sync logout` | 删除 `auth.json` 中的 GitHub 令牌 |
85
+ | `/sync status` | 显示登录、仓库、分支、自动拉取和上次同步信息,不联网 |
86
+ | `/sync pull [--force]` | 从 GitHub 下载配置;`--force` 用远端覆盖所有冲突文件 |
87
+ | `/sync push [--force] [--yes]` | 上传配置;`--force` 覆盖远端冲突,`--yes` 跳过推送前确认 |
88
+ | `/sync repo <owner/name>` | 设置仓库 |
89
+ | `/sync branch <name>` | 设置分支 |
90
+ | `/sync auto on` | 启动时自动拉取,不弹确认 |
91
+ | `/sync auto off` | 关闭自动拉取 |
92
+
93
+ ## 同步范围
94
+
95
+ | 路径 | 内容 |
96
+ | --- | --- |
97
+ | `settings.json` | Pi 设置;同步前去掉本机专用字段 |
98
+ | `models.json` | 自定义模型与 provider 定义 |
99
+ | `mcp.json` | MCP 服务器定义 |
100
+ | `keybindings.json` | 按键绑定 |
101
+ | `AGENTS.md` | 全局项目说明 |
102
+ | `SYSTEM.md`、`APPEND_SYSTEM.md` | 系统提示词 |
103
+ | `themes/` | 主题 |
104
+ | `prompts/` | 提示词模板 |
105
+ | `skills/` | Skill 源文件 |
106
+
107
+ `settings.json` 中的 `shellPath`、`lsp`、`lastChangelogVersion`、`extensionChangelogVersions` 和 `sessionDir` 默认保留为本机值,不参与同步。这个列表可以在 `config.json` 的 `localSettingsKeys` 中修改。
108
+
109
+ 不参与同步的内容:
110
+
111
+ - 以 `.` 开头的文件和目录,以及 `.DS_Store`、`Thumbs.db`、`.git`、`node_modules`
112
+ - 符号链接
113
+ - 超过 10 MB 的单个文件
114
+ - 总计超过 2000 个文件或 50 MB 的内容
115
+ - `auth.json` 中的 OAuth 凭据和未列入范围的 provider
116
+
117
+ ## 凭据同步
118
+
119
+ 只同步 `auth.json` 中形如 `{"type":"api_key","key":"..."}` 的条目。默认排除使用设备登录或本机客户端凭据的 provider:`github-copilot`、`qoder`、`qoder-cn`、`trae-cn`、`workbuddy`、`workbuddy-ai`,以及本扩展自己的 `config-sync` 令牌。
120
+
121
+ `config.json` 中的过滤字段:
122
+
123
+ ```json
124
+ {
125
+ "includeAuthProviders": [],
126
+ "excludeAuthProviders": ["config-sync", "github-copilot", "qoder", "qoder-cn", "trae-cn", "workbuddy", "workbuddy-ai"]
127
+ }
128
+ ```
129
+
130
+ - `includeAuthProviders` 非空时,只同步其中的 provider。
131
+ - 显式包含可以覆盖排除,但条目仍必须是合法的 `api_key` 形状。
132
+ - 不支持同步 OAuth、设备码或其他非 `api_key` 条目。
133
+
134
+ 加密格式:
135
+
136
+ - 口令经 scrypt 派生密钥,参数 `N=32768, r=8, p=1`,16 字节随机盐。
137
+ - 数据用 AES-256-GCM 加密,12 字节随机 IV,16 字节认证标签。
138
+ - 加密文件为 `secrets.enc`,明文只在内存中出现。
139
+
140
+ 口令不会写入磁盘、仓库或日志。口令丢失后无法解密仓库中的旧凭据;此时删除仓库里的 `secrets.enc`,再推送一次即可设置新口令。
141
+
142
+ `models.json` 和 `mcp.json` 在推送前会做明文检查:
143
+
144
+ - `models.json` 中值为明文的 `apiKey` / `api_key` 会阻止推送;`$ENV_NAME` 和 `!command` 引用允许通过。
145
+ - `mcp.json` 中 URL 自带的用户名密码、以及 `headers` / `env` 中名称像密钥的明文值会阻止推送;`${VAR}` 和 `!command` 引用允许通过。
146
+
147
+ 这是启发式检查,不能证明文件里没有其他形式的密钥。推送前仍应自行确认。
148
+
149
+ ## 冲突处理
150
+
151
+ 扩展在本机记录上次同步的提交和文件哈希,用“上次基准 / 本机 / 远端”三方比较:
152
+
153
+ - 只有远端变化:拉取时写入远端版本。
154
+ - 只有本机变化:拉取时保留本机版本,推送时上传本机版本。
155
+ - 两边都变化:拉取时询问“全部用远端”“全部保留本机”或逐文件选择;推送时默认拒绝,需要先拉取,或用 `--force` 覆盖远端。
156
+ - 新设备没有基准:远端独有文件直接写入,本机独有文件保留。
157
+ - 远端删除且本机未改动:拉取时删除本机文件;本机删除且远端未改动:推送时删除远端文件。
158
+
159
+ 除 `settings.json` 外,文本和二进制文件都按整文件覆盖,不做行级合并。`settings.json` 拉取时会把远端内容与本机专用字段合并后再写入。
160
+
161
+ 推送会用完整的文件列表创建提交,因此仓库必须专门用于 config-sync。向已有其他文件的仓库推送会替换整个文件树;首次遇到不是 config-sync 创建的仓库时,扩展会要求确认。
162
+
163
+ ## 自动拉取
164
+
165
+ `/sync auto on` 后,Pi 以 TUI 模式启动时会在后台拉取一次:
166
+
167
+ - 不弹冲突确认,遇到冲突会跳过并提示手动运行 `/sync pull`。
168
+ - 不处理凭据;`secrets.enc` 有变化时只提示手动拉取。
169
+ - 有文件更新时提示 `/reload`。
170
+
171
+ 自动拉取不会推送,也不会在 `session_start` 以外的时机运行。
172
+
173
+ ## 本机文件与备份
174
+
175
+ | 路径 | 内容 |
176
+ | --- | --- |
177
+ | `~/.pi/agent/auth.json` | GitHub 令牌,provider ID 为 `config-sync` |
178
+ | `~/.pi/agent/config-sync/config.json` | 客户端 ID、仓库、分支和过滤设置 |
179
+ | `~/.pi/agent/config-sync/state.json` | 设备 ID、登录名、上次同步提交与文件哈希 |
180
+ | `~/.pi/agent/config-sync/backups/<时间>/agent/` | 拉取覆盖或删除前的本机文件 |
181
+
182
+ 备份最多保留 10 份,只复制实际存在且会被覆盖或删除的普通文件。需要回滚时,把备份目录中的文件复制回 `~/.pi/agent/` 对应位置。
183
+
184
+ `state.json` 损坏时会被重命名为 `state.json.corrupt-<时间>`,然后生成新的设备 ID 和空基准。下一次拉取会按新设备处理。
185
+
186
+ ## 网络请求
187
+
188
+ 扩展只访问以下域名:
189
+
190
+ | 域名 | 用途 |
191
+ | --- | --- |
192
+ | `github.com` | 设备码申请、令牌轮询 |
193
+ | `api.github.com` | 用户信息、仓库、Git tree / blob / commit / ref |
194
+
195
+ 请求使用固定的 `User-Agent: pi-config-sync`,单次超时 30 秒。GitHub 令牌通过 `Authorization: Bearer` 头发送,不写入日志或错误信息。除 GitHub 外不发送配置内容。
196
+
197
+ ## 安全边界
198
+
199
+ - GitHub 令牌拥有 `repo` 范围,能读写该账号的私有仓库。令牌保存在 `auth.json`,卸载扩展不会自动删除;需要清除时先运行 `/sync logout`。
200
+ - 仓库默认必须是私有仓库。只有手动把 `allowPublicRepo` 设为 `true` 才允许推送公开仓库;公开仓库中的 `secrets.enc` 仍受口令保护,但配置文件本身是明文。
201
+ - 口令只在 TUI 模式下输入,其他模式会拒绝读取,避免明文回显。
202
+ - 扩展能读取 Pi 会话、配置和凭据,权限与 Pi 进程相同。只应安装可信来源的构建产物。
203
+ - 推送前的明文检查只覆盖 `models.json` 和 `mcp.json` 的已知字段,不扫描 `AGENTS.md`、`prompts/`、`skills/` 等自由文本。
204
+
205
+ ## 已知限制
206
+
207
+ - 只支持 GitHub,不支持 Google 登录或其他代码托管服务。
208
+ - 没有后台定时同步;推送需要手动执行,自动拉取只在启动时运行一次。
209
+ - 不同设备的 `settings.json` 中如果包含本机包路径或其他设备相关字段,需要自行加入 `localSettingsKeys`,否则会互相覆盖。
210
+ - 同步的是配置内容,不安装 npm 包;`settings.json` 里的 `packages` 记录会随配置同步,但对应包仍需在每台设备上安装。
211
+ - 不合并非 JSON 文件,不处理符号链接,不保留远端文件的历史版本。
212
+ - 目前没有用于多个配置档案或多个 GitHub 账号的切换功能。
213
+
214
+ ## 验证状态
215
+
216
+ 已在 Node.js v24 上通过 TypeScript 类型检查和 59 个单元测试,覆盖路径校验、冲突计划、加密往返、错误口令、KDF 参数边界、凭据过滤、明文审计、配置读写、令牌存储和备份。
217
+
218
+ 已在真实 GitHub 私有仓库 `Hex4C59/pi-config-e2e` 上完成端到端联调。测试使用两个隔离的 agent 目录,覆盖空仓库初始化和推送、第二设备拉取、`settings.json` 本机字段保留、两种冲突处理、凭据轮换和错误口令重试;仓库内容中没有出现明文 API key 或 GitHub 令牌。联调同时修正了空仓库首次推送和 `manifest.json` 推送路径校验的问题。先用 `gh` 令牌验证,随后用 OAuth App 设备码登录得到的 `gho_` 令牌重跑,结果一致。
219
+
220
+ 口令输入界面已用真实 `InteractiveMode` 录制对比证据,GIF 保存在 `config-sync/quality/ui/`,不随 npm 包分发。config-sync 是新增包,没有旧版本源码,因此“改动前”取 Pi 自带的同类输入框作为基线;两侧在同一会话、同一终端尺寸和主题下采集,逐字输入同一示例口令。该证据只验证对话框本身,不覆盖 `/sync push` 的完整调用链。
221
+
222
+ 设备码登录已用真实 GitHub OAuth App 完成:`GET /user` 返回 `Hex4C59`,令牌作用域为 `repo`。登录后的令牌已用于上述隔离联调,临时目录中的令牌副本已删除。
223
+
224
+ 长期使用前,仍建议保留一份独立的凭据备份。
@@ -0,0 +1,163 @@
1
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
2
+ import { copyToClipboard, getAgentDir } from "@earendil-works/pi-coding-agent";
3
+ import { errorMessage } from "../src/files.ts";
4
+ import { SyncError } from "../src/types.ts";
5
+ import type { SyncUi } from "../src/types.ts";
6
+ import {
7
+ clearPassphraseCache,
8
+ runAutoPull,
9
+ runLogin,
10
+ runLogout,
11
+ runPull,
12
+ runPush,
13
+ runSetAuto,
14
+ runSetBranch,
15
+ runSetRepo,
16
+ runSetup,
17
+ runStatus,
18
+ } from "../src/operations.ts";
19
+ import { askMaskedPassphrase } from "../src/secret-input.ts";
20
+
21
+ const SUBCOMMANDS = [
22
+ { value: "setup", label: "setup", description: "Save the GitHub OAuth App client ID" },
23
+ { value: "login", label: "login", description: "Authorize this device with GitHub" },
24
+ { value: "logout", label: "logout", description: "Remove the stored GitHub token" },
25
+ { value: "status", label: "status", description: "Show sign-in, repository and last sync" },
26
+ { value: "pull", label: "pull", description: "Download configuration from GitHub" },
27
+ { value: "push", label: "push", description: "Upload local configuration to GitHub" },
28
+ { value: "repo", label: "repo", description: "Set the repository as owner/name" },
29
+ { value: "branch", label: "branch", description: "Set the branch name" },
30
+ { value: "auto", label: "auto", description: "Toggle pull on startup" },
31
+ { value: "help", label: "help", description: "Show commands" },
32
+ ];
33
+
34
+ const HELP = [
35
+ "config-sync commands:",
36
+ "/sync setup <client-id> Save the GitHub OAuth App client ID",
37
+ "/sync login Authorize this device with GitHub",
38
+ "/sync logout Remove the stored GitHub token",
39
+ "/sync status Show sign-in, repository and last sync",
40
+ "/sync pull [--force] Download configuration from GitHub",
41
+ "/sync push [--force] [--yes] Upload local configuration to GitHub",
42
+ "/sync repo <owner/name|default> Set the repository",
43
+ "/sync branch <name|default> Set the branch",
44
+ "/sync auto on|off Toggle automatic pull on startup",
45
+ ].join("\n");
46
+
47
+ export default function configSyncExtension(pi: ExtensionAPI): void {
48
+ pi.registerCommand("sync", {
49
+ description: "Sync Pi configuration through a private GitHub repository",
50
+ getArgumentCompletions: (prefix) => {
51
+ const trimmed = prefix.trimStart();
52
+ if (trimmed.includes(" ")) {
53
+ const [command, value = ""] = trimmed.split(/\s+/);
54
+ if (command === "auto") {
55
+ const options = ["on", "off"].filter((option) => option.startsWith(value));
56
+ return options.length > 0
57
+ ? options.map((option) => ({ value: option, label: option }))
58
+ : null;
59
+ }
60
+ return null;
61
+ }
62
+ const matches = SUBCOMMANDS.filter((item) => item.value.startsWith(trimmed));
63
+ return matches.length > 0 ? matches : null;
64
+ },
65
+ handler: async (args, ctx) => {
66
+ const input = args.trim();
67
+ const [command = "", ...rest] = input.split(/\s+/);
68
+ const subcommand = command.toLowerCase();
69
+ const ui = createUi(ctx);
70
+ try {
71
+ switch (subcommand) {
72
+ case "":
73
+ case "help":
74
+ ui.notify(HELP, "info");
75
+ return;
76
+ case "setup":
77
+ await runSetup(ui, getAgentDir(), rest.join(" "));
78
+ return;
79
+ case "login":
80
+ await runLogin(ui, getAgentDir());
81
+ return;
82
+ case "logout":
83
+ await runLogout(ui, getAgentDir());
84
+ return;
85
+ case "status":
86
+ await runStatus(ui, getAgentDir());
87
+ return;
88
+ case "pull": {
89
+ assertFlags(rest, ["--force"]);
90
+ const result = await runPull(ui, getAgentDir(), {
91
+ force: rest.includes("--force"),
92
+ });
93
+ if (result.changed + result.deleted > 0) {
94
+ const reload = await ctx.ui.confirm(
95
+ "Reload Pi",
96
+ "Configuration was updated. Reload extensions, prompts and themes now?",
97
+ );
98
+ if (reload) await ctx.reload();
99
+ }
100
+ return;
101
+ }
102
+ case "push": {
103
+ assertFlags(rest, ["--force", "--yes"]);
104
+ await runPush(ui, getAgentDir(), {
105
+ force: rest.includes("--force"),
106
+ yes: rest.includes("--yes"),
107
+ });
108
+ return;
109
+ }
110
+ case "repo":
111
+ await runSetRepo(ui, getAgentDir(), rest.join(" "));
112
+ return;
113
+ case "branch":
114
+ await runSetBranch(ui, getAgentDir(), rest.join(" "));
115
+ return;
116
+ case "auto":
117
+ await runSetAuto(ui, getAgentDir(), rest.join(" "));
118
+ return;
119
+ default:
120
+ throw new SyncError(`Unknown /sync subcommand: ${subcommand}. Run /sync help.`);
121
+ }
122
+ } catch (error) {
123
+ ui.notify(errorMessage(error), "error");
124
+ }
125
+ },
126
+ });
127
+
128
+ pi.on("session_start", async (event, ctx) => {
129
+ if (event.reason !== "startup") return;
130
+ if (!ctx.hasUI || ctx.mode !== "tui") return;
131
+ try {
132
+ await runAutoPull(createUi(ctx), getAgentDir());
133
+ } catch (error) {
134
+ ctx.ui.notify(`config-sync auto pull skipped: ${errorMessage(error)}`, "warning");
135
+ }
136
+ });
137
+
138
+ pi.on("session_shutdown", () => {
139
+ clearPassphraseCache();
140
+ });
141
+ }
142
+
143
+ function createUi(ctx: ExtensionContext): SyncUi {
144
+ return {
145
+ notify: (message, type) => ctx.ui.notify(message, type ?? "info"),
146
+ confirm: (title, message) => ctx.ui.confirm(title, message),
147
+ select: (title, options) => ctx.ui.select(title, options),
148
+ askText: (title, placeholder) => ctx.ui.input(title, placeholder),
149
+ askPassphrase: (title) => askMaskedPassphrase(ctx, title),
150
+ copyText: (text) => {
151
+ // 剪贴板不可用时忽略;设备码同时显示在通知中。
152
+ void copyToClipboard(text).catch(() => undefined);
153
+ },
154
+ setStatus: (key, text) => ctx.ui.setStatus(key, text),
155
+ };
156
+ }
157
+
158
+ function assertFlags(args: string[], allowed: string[]): void {
159
+ const unknown = args.filter((arg) => !allowed.includes(arg));
160
+ if (unknown.length > 0) {
161
+ throw new SyncError(`Unknown option: ${unknown.join(", ")}`);
162
+ }
163
+ }
package/package.json CHANGED
@@ -1,6 +1,48 @@
1
1
  {
2
2
  "name": "@hex4c59/pi-ext-config-sync",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Sync Pi configuration and encrypted credentials through a private GitHub repository.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Hex4C59/my-pi-extensions",
9
+ "directory": "config-sync"
10
+ },
11
+ "type": "module",
12
+ "keywords": [
13
+ "pi-package"
14
+ ],
15
+ "publishConfig": {
16
+ "registry": "https://registry.npmjs.org/",
17
+ "access": "public"
18
+ },
19
+ "engines": {
20
+ "node": ">=22.19.0"
21
+ },
22
+ "files": [
23
+ "extensions",
24
+ "src",
25
+ "README.md",
26
+ "CHANGELOG.md",
27
+ "LICENSE"
28
+ ],
29
+ "pi": {
30
+ "extensions": [
31
+ "./extensions/config-sync.ts"
32
+ ]
33
+ },
34
+ "peerDependencies": {
35
+ "@earendil-works/pi-coding-agent": "*",
36
+ "@earendil-works/pi-tui": "*"
37
+ },
38
+ "devDependencies": {
39
+ "@earendil-works/pi-coding-agent": "1.5.0",
40
+ "@earendil-works/pi-tui": "1.5.0",
41
+ "@types/node": "^22.19.0",
42
+ "typescript": "^6.0.3"
43
+ },
44
+ "scripts": {
45
+ "typecheck": "tsc --noEmit",
46
+ "test": "node --experimental-strip-types --test tests/*.test.ts"
47
+ }
48
+ }