@neuralnomads/codenomad 0.13.3 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/manager.js +5 -1
- package/dist/background-processes/manager.js +164 -25
- package/dist/cli-upgrade.js +53 -0
- package/dist/cli-upgrade.test.js +31 -0
- package/dist/config/schema.js +1 -0
- package/dist/events/bus.js +4 -0
- package/dist/filesystem/browser.js +15 -1
- package/dist/index.js +79 -11
- package/dist/opencode-config/package-lock.json +380 -0
- package/dist/opencode-config/package.json +2 -2
- package/dist/opencode-config/plugin/lib/background-process.ts +14 -2
- package/dist/plugins/voice-mode.js +2 -1
- package/dist/server/__tests__/network-addresses.test.js +68 -0
- package/dist/server/__tests__/remote-proxy.test.js +204 -0
- package/dist/server/http-server.js +292 -47
- package/dist/server/network-addresses.js +43 -1
- package/dist/server/remote-proxy.js +466 -0
- package/dist/server/routes/background-processes.js +19 -1
- package/dist/server/routes/meta.js +0 -3
- package/dist/server/routes/plugin.js +5 -1
- package/dist/server/routes/remote-proxy.js +42 -0
- package/dist/server/routes/remote-servers.js +142 -0
- package/dist/server/routes/settings.js +1 -1
- package/dist/server/routes/sidecars.js +46 -0
- package/dist/server/routes/workspaces.js +118 -0
- package/dist/settings/migrate.js +5 -0
- package/dist/settings/service.js +64 -4
- package/dist/sidecars/manager.js +193 -0
- package/dist/workspaces/__tests__/git-worktrees.test.js +43 -0
- package/dist/workspaces/__tests__/spawn.test.js +140 -0
- package/dist/workspaces/git-mutations.js +98 -0
- package/dist/workspaces/git-status.js +323 -0
- package/dist/workspaces/git-worktrees.js +18 -1
- package/dist/workspaces/manager.js +11 -4
- package/dist/workspaces/opencode-auth.js +18 -0
- package/dist/workspaces/opencode-auth.test.js +34 -0
- package/dist/workspaces/runtime.js +56 -78
- package/dist/workspaces/spawn.js +219 -0
- package/dist/workspaces/worktree-directory.js +74 -0
- package/package.json +1 -1
- package/public/assets/ChangesTab-ovdqLHc3.js +2 -0
- package/public/assets/DiffToolbar-B12EfXMX.js +1 -0
- package/public/assets/FilesTab-nb_itEXG.js +2 -0
- package/public/assets/GitChangesTab-DcT_4BL2.js +2 -0
- package/public/assets/{SplitFilePanel-DwrJM7GQ.js → SplitFilePanel-BOHH3F--.js} +1 -1
- package/public/assets/StatusTab-Dyt_EG33.js +1 -0
- package/public/assets/align-justify-9zpyaAdy.js +1 -0
- package/public/assets/{bundle-full-JwmTIwMd.js → bundle-full-xFW13Lny.js} +1 -1
- package/public/assets/diff-viewer-xG9yjpN8.js +1 -0
- package/public/assets/git-diff-vendor-CSgooKT_.js +52 -0
- package/public/assets/index-7DpT014-.js +1 -0
- package/public/assets/index-BDK4V9L0.js +1 -0
- package/public/assets/index-Bx-Bezt2.js +1 -0
- package/public/assets/index-CCAZZY0l.js +1 -0
- package/public/assets/index-CEcZq5WB.js +1 -0
- package/public/assets/index-CQCmSDHL.js +1 -0
- package/public/assets/{index-CkYwnPl7.js → index-Cz_fl8aY.js} +1 -1
- package/public/assets/index-Dcgftm1m.css +1 -0
- package/public/assets/index-m4C3yx3J.js +1 -0
- package/public/assets/index-mh_z9p40.js +2 -0
- package/public/assets/{loading-CfqkoCbA.js → loading-HUhLEgb_.js} +1 -1
- package/public/assets/main-CKhfaeKI.js +48 -0
- package/public/assets/{markdown-D2uUJada.js → markdown-BeXU9Z-x.js} +22 -22
- package/public/assets/monaco-viewer-BgP6xpZ6.js +26 -0
- package/public/assets/{todo-i3zWdksA.js → todo-D6PVVp_f.js} +1 -1
- package/public/assets/tool-call-Dgn3NlA8.js +60 -0
- package/public/assets/unified-picker-DuNuUpLy.js +1 -0
- package/public/assets/wrap-text-zghCl6wN.js +1 -0
- package/public/index.html +5 -5
- package/public/loading.html +5 -5
- package/public/sw.js +1 -1
- package/public/ui-version.json +1 -1
- package/public/assets/ChangesTab-X8IIoIdB.js +0 -2
- package/public/assets/DiffToolbar-Djg0ksr_.js +0 -1
- package/public/assets/FilesTab-BpYPA_Zr.js +0 -2
- package/public/assets/GitChangesTab-DeGsV8--.js +0 -2
- package/public/assets/StatusTab-mT1B3wST.js +0 -1
- package/public/assets/diff-viewer-CKnTxbWB.js +0 -1
- package/public/assets/git-diff-vendor-CAv-4upN.js +0 -52
- package/public/assets/index-BEzx5r3P.css +0 -1
- package/public/assets/index-BHjkPi4D.js +0 -1
- package/public/assets/index-CUkIenrg.js +0 -1
- package/public/assets/index-D9RMxxcS.js +0 -1
- package/public/assets/index-DiFfJ0HM.js +0 -1
- package/public/assets/index-LmDdmmJP.js +0 -1
- package/public/assets/index-UaIyK67v.js +0 -1
- package/public/assets/index-lhjxIgwf.js +0 -2
- package/public/assets/index-xsUu1uOf.js +0 -1
- package/public/assets/main-B3yZBpaS.js +0 -56
- package/public/assets/monaco-viewer-UU9TfOpS.js +0 -15
- package/public/assets/tool-call-Bl3Lai68.js +0 -60
- package/public/assets/unified-picker-B506AoQt.js +0 -1
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codenomad/opencode-config",
|
|
3
|
+
"version": "0.15.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "@codenomad/opencode-config",
|
|
9
|
+
"version": "0.15.0",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@opencode-ai/plugin": "1.14.24"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": {
|
|
16
|
+
"version": "3.0.3",
|
|
17
|
+
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz",
|
|
18
|
+
"integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==",
|
|
19
|
+
"cpu": [
|
|
20
|
+
"arm64"
|
|
21
|
+
],
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"optional": true,
|
|
24
|
+
"os": [
|
|
25
|
+
"darwin"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": {
|
|
29
|
+
"version": "3.0.3",
|
|
30
|
+
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz",
|
|
31
|
+
"integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==",
|
|
32
|
+
"cpu": [
|
|
33
|
+
"x64"
|
|
34
|
+
],
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"optional": true,
|
|
37
|
+
"os": [
|
|
38
|
+
"darwin"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": {
|
|
42
|
+
"version": "3.0.3",
|
|
43
|
+
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz",
|
|
44
|
+
"integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==",
|
|
45
|
+
"cpu": [
|
|
46
|
+
"arm"
|
|
47
|
+
],
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"optional": true,
|
|
50
|
+
"os": [
|
|
51
|
+
"linux"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": {
|
|
55
|
+
"version": "3.0.3",
|
|
56
|
+
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz",
|
|
57
|
+
"integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==",
|
|
58
|
+
"cpu": [
|
|
59
|
+
"arm64"
|
|
60
|
+
],
|
|
61
|
+
"license": "MIT",
|
|
62
|
+
"optional": true,
|
|
63
|
+
"os": [
|
|
64
|
+
"linux"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": {
|
|
68
|
+
"version": "3.0.3",
|
|
69
|
+
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz",
|
|
70
|
+
"integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==",
|
|
71
|
+
"cpu": [
|
|
72
|
+
"x64"
|
|
73
|
+
],
|
|
74
|
+
"license": "MIT",
|
|
75
|
+
"optional": true,
|
|
76
|
+
"os": [
|
|
77
|
+
"linux"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": {
|
|
81
|
+
"version": "3.0.3",
|
|
82
|
+
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz",
|
|
83
|
+
"integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==",
|
|
84
|
+
"cpu": [
|
|
85
|
+
"x64"
|
|
86
|
+
],
|
|
87
|
+
"license": "MIT",
|
|
88
|
+
"optional": true,
|
|
89
|
+
"os": [
|
|
90
|
+
"win32"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"node_modules/@opencode-ai/plugin": {
|
|
94
|
+
"version": "1.14.24",
|
|
95
|
+
"resolved": "https://registry.npmjs.org/@opencode-ai/plugin/-/plugin-1.14.24.tgz",
|
|
96
|
+
"integrity": "sha512-upzw2a9KfzIkIvvjYSPJiyV6o85D3HLmhVvAJIwV8mYWxbvi2wP2NA0hJaMp2+GZVuUl/ra8WV8kacD1CWcb4w==",
|
|
97
|
+
"license": "MIT",
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"@opencode-ai/sdk": "1.14.24",
|
|
100
|
+
"effect": "4.0.0-beta.48",
|
|
101
|
+
"zod": "4.1.8"
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"@opentui/core": ">=0.1.99",
|
|
105
|
+
"@opentui/solid": ">=0.1.99"
|
|
106
|
+
},
|
|
107
|
+
"peerDependenciesMeta": {
|
|
108
|
+
"@opentui/core": {
|
|
109
|
+
"optional": true
|
|
110
|
+
},
|
|
111
|
+
"@opentui/solid": {
|
|
112
|
+
"optional": true
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"node_modules/@opencode-ai/sdk": {
|
|
117
|
+
"version": "1.14.24",
|
|
118
|
+
"resolved": "https://registry.npmjs.org/@opencode-ai/sdk/-/sdk-1.14.24.tgz",
|
|
119
|
+
"integrity": "sha512-hZWc1jx+gtZBM6Mff9iOMlXM1at9BbAGg0uNrQk8DuXpd8K19fu942emojdInO2zy0jC5/wWggsi7GJu7HMp/w==",
|
|
120
|
+
"license": "MIT",
|
|
121
|
+
"dependencies": {
|
|
122
|
+
"cross-spawn": "7.0.6"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"node_modules/@standard-schema/spec": {
|
|
126
|
+
"version": "1.1.0",
|
|
127
|
+
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
|
|
128
|
+
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
|
|
129
|
+
"license": "MIT"
|
|
130
|
+
},
|
|
131
|
+
"node_modules/cross-spawn": {
|
|
132
|
+
"version": "7.0.6",
|
|
133
|
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
|
134
|
+
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
|
135
|
+
"license": "MIT",
|
|
136
|
+
"dependencies": {
|
|
137
|
+
"path-key": "^3.1.0",
|
|
138
|
+
"shebang-command": "^2.0.0",
|
|
139
|
+
"which": "^2.0.1"
|
|
140
|
+
},
|
|
141
|
+
"engines": {
|
|
142
|
+
"node": ">= 8"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"node_modules/detect-libc": {
|
|
146
|
+
"version": "2.1.2",
|
|
147
|
+
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
|
148
|
+
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
|
|
149
|
+
"license": "Apache-2.0",
|
|
150
|
+
"optional": true,
|
|
151
|
+
"engines": {
|
|
152
|
+
"node": ">=8"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"node_modules/effect": {
|
|
156
|
+
"version": "4.0.0-beta.48",
|
|
157
|
+
"resolved": "https://registry.npmjs.org/effect/-/effect-4.0.0-beta.48.tgz",
|
|
158
|
+
"integrity": "sha512-MMAM/ZabuNdNmgXiin+BAanQXK7qM8mlt7nfXDoJ/Gn9V8i89JlCq+2N0AiWmqFLXjGLA0u3FjiOjSOYQk5uMw==",
|
|
159
|
+
"license": "MIT",
|
|
160
|
+
"dependencies": {
|
|
161
|
+
"@standard-schema/spec": "^1.1.0",
|
|
162
|
+
"fast-check": "^4.6.0",
|
|
163
|
+
"find-my-way-ts": "^0.1.6",
|
|
164
|
+
"ini": "^6.0.0",
|
|
165
|
+
"kubernetes-types": "^1.30.0",
|
|
166
|
+
"msgpackr": "^1.11.9",
|
|
167
|
+
"multipasta": "^0.2.7",
|
|
168
|
+
"toml": "^4.1.1",
|
|
169
|
+
"uuid": "^13.0.0",
|
|
170
|
+
"yaml": "^2.8.3"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"node_modules/fast-check": {
|
|
174
|
+
"version": "4.7.0",
|
|
175
|
+
"resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.7.0.tgz",
|
|
176
|
+
"integrity": "sha512-NsZRtqvSSoCP0HbNjUD+r1JH8zqZalyp6gLY9e7OYs7NK9b6AHOs2baBFeBG7bVNsuoukh89x2Yg3rPsul8ziQ==",
|
|
177
|
+
"funding": [
|
|
178
|
+
{
|
|
179
|
+
"type": "individual",
|
|
180
|
+
"url": "https://github.com/sponsors/dubzzz"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "opencollective",
|
|
184
|
+
"url": "https://opencollective.com/fast-check"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"license": "MIT",
|
|
188
|
+
"dependencies": {
|
|
189
|
+
"pure-rand": "^8.0.0"
|
|
190
|
+
},
|
|
191
|
+
"engines": {
|
|
192
|
+
"node": ">=12.17.0"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"node_modules/find-my-way-ts": {
|
|
196
|
+
"version": "0.1.6",
|
|
197
|
+
"resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz",
|
|
198
|
+
"integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==",
|
|
199
|
+
"license": "MIT"
|
|
200
|
+
},
|
|
201
|
+
"node_modules/ini": {
|
|
202
|
+
"version": "6.0.0",
|
|
203
|
+
"resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz",
|
|
204
|
+
"integrity": "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==",
|
|
205
|
+
"license": "ISC",
|
|
206
|
+
"engines": {
|
|
207
|
+
"node": "^20.17.0 || >=22.9.0"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"node_modules/isexe": {
|
|
211
|
+
"version": "2.0.0",
|
|
212
|
+
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
|
213
|
+
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
|
214
|
+
"license": "ISC"
|
|
215
|
+
},
|
|
216
|
+
"node_modules/kubernetes-types": {
|
|
217
|
+
"version": "1.30.0",
|
|
218
|
+
"resolved": "https://registry.npmjs.org/kubernetes-types/-/kubernetes-types-1.30.0.tgz",
|
|
219
|
+
"integrity": "sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q==",
|
|
220
|
+
"license": "Apache-2.0"
|
|
221
|
+
},
|
|
222
|
+
"node_modules/msgpackr": {
|
|
223
|
+
"version": "1.11.10",
|
|
224
|
+
"resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.10.tgz",
|
|
225
|
+
"integrity": "sha512-iCZNq+HszvF+fC3anCm4nBmWEnbeIAfpDs6IStAEKhQ2YSgkjzVG2FF9XJqwwQh5bH3N9OUTUt4QwVN6MLMLtA==",
|
|
226
|
+
"license": "MIT",
|
|
227
|
+
"optionalDependencies": {
|
|
228
|
+
"msgpackr-extract": "^3.0.2"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"node_modules/msgpackr-extract": {
|
|
232
|
+
"version": "3.0.3",
|
|
233
|
+
"resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz",
|
|
234
|
+
"integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==",
|
|
235
|
+
"hasInstallScript": true,
|
|
236
|
+
"license": "MIT",
|
|
237
|
+
"optional": true,
|
|
238
|
+
"dependencies": {
|
|
239
|
+
"node-gyp-build-optional-packages": "5.2.2"
|
|
240
|
+
},
|
|
241
|
+
"bin": {
|
|
242
|
+
"download-msgpackr-prebuilds": "bin/download-prebuilds.js"
|
|
243
|
+
},
|
|
244
|
+
"optionalDependencies": {
|
|
245
|
+
"@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3",
|
|
246
|
+
"@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3",
|
|
247
|
+
"@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3",
|
|
248
|
+
"@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3",
|
|
249
|
+
"@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3",
|
|
250
|
+
"@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"node_modules/multipasta": {
|
|
254
|
+
"version": "0.2.7",
|
|
255
|
+
"resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.7.tgz",
|
|
256
|
+
"integrity": "sha512-KPA58d68KgGil15oDqXjkUBEBYc00XvbPj5/X+dyzeo/lWm9Nc25pQRlf1D+gv4OpK7NM0J1odrbu9JNNGvynA==",
|
|
257
|
+
"license": "MIT"
|
|
258
|
+
},
|
|
259
|
+
"node_modules/node-gyp-build-optional-packages": {
|
|
260
|
+
"version": "5.2.2",
|
|
261
|
+
"resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz",
|
|
262
|
+
"integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==",
|
|
263
|
+
"license": "MIT",
|
|
264
|
+
"optional": true,
|
|
265
|
+
"dependencies": {
|
|
266
|
+
"detect-libc": "^2.0.1"
|
|
267
|
+
},
|
|
268
|
+
"bin": {
|
|
269
|
+
"node-gyp-build-optional-packages": "bin.js",
|
|
270
|
+
"node-gyp-build-optional-packages-optional": "optional.js",
|
|
271
|
+
"node-gyp-build-optional-packages-test": "build-test.js"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"node_modules/path-key": {
|
|
275
|
+
"version": "3.1.1",
|
|
276
|
+
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
|
277
|
+
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
|
278
|
+
"license": "MIT",
|
|
279
|
+
"engines": {
|
|
280
|
+
"node": ">=8"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"node_modules/pure-rand": {
|
|
284
|
+
"version": "8.4.0",
|
|
285
|
+
"resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.0.tgz",
|
|
286
|
+
"integrity": "sha512-IoM8YF/jY0hiugFo/wOWqfmarlE6J0wc6fDK1PhftMk7MGhVZl88sZimmqBBFomLOCSmcCCpsfj7wXASCpvK9A==",
|
|
287
|
+
"funding": [
|
|
288
|
+
{
|
|
289
|
+
"type": "individual",
|
|
290
|
+
"url": "https://github.com/sponsors/dubzzz"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"type": "opencollective",
|
|
294
|
+
"url": "https://opencollective.com/fast-check"
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
"license": "MIT"
|
|
298
|
+
},
|
|
299
|
+
"node_modules/shebang-command": {
|
|
300
|
+
"version": "2.0.0",
|
|
301
|
+
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
|
302
|
+
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
|
303
|
+
"license": "MIT",
|
|
304
|
+
"dependencies": {
|
|
305
|
+
"shebang-regex": "^3.0.0"
|
|
306
|
+
},
|
|
307
|
+
"engines": {
|
|
308
|
+
"node": ">=8"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"node_modules/shebang-regex": {
|
|
312
|
+
"version": "3.0.0",
|
|
313
|
+
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
|
314
|
+
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
|
315
|
+
"license": "MIT",
|
|
316
|
+
"engines": {
|
|
317
|
+
"node": ">=8"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"node_modules/toml": {
|
|
321
|
+
"version": "4.1.1",
|
|
322
|
+
"resolved": "https://registry.npmjs.org/toml/-/toml-4.1.1.tgz",
|
|
323
|
+
"integrity": "sha512-EBJnVBr3dTXdA89WVFoAIPUqkBjxPMwRqsfuo1r240tKFHXv3zgca4+NJib/h6TyvGF7vOawz0jGuryJCdNHrw==",
|
|
324
|
+
"license": "MIT",
|
|
325
|
+
"engines": {
|
|
326
|
+
"node": ">=20"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"node_modules/uuid": {
|
|
330
|
+
"version": "13.0.0",
|
|
331
|
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz",
|
|
332
|
+
"integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==",
|
|
333
|
+
"funding": [
|
|
334
|
+
"https://github.com/sponsors/broofa",
|
|
335
|
+
"https://github.com/sponsors/ctavan"
|
|
336
|
+
],
|
|
337
|
+
"license": "MIT",
|
|
338
|
+
"bin": {
|
|
339
|
+
"uuid": "dist-node/bin/uuid"
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"node_modules/which": {
|
|
343
|
+
"version": "2.0.2",
|
|
344
|
+
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
|
345
|
+
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
|
346
|
+
"license": "ISC",
|
|
347
|
+
"dependencies": {
|
|
348
|
+
"isexe": "^2.0.0"
|
|
349
|
+
},
|
|
350
|
+
"bin": {
|
|
351
|
+
"node-which": "bin/node-which"
|
|
352
|
+
},
|
|
353
|
+
"engines": {
|
|
354
|
+
"node": ">= 8"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"node_modules/yaml": {
|
|
358
|
+
"version": "2.8.3",
|
|
359
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
|
|
360
|
+
"integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
|
|
361
|
+
"license": "ISC",
|
|
362
|
+
"bin": {
|
|
363
|
+
"yaml": "bin.mjs"
|
|
364
|
+
},
|
|
365
|
+
"engines": {
|
|
366
|
+
"node": ">= 14.6"
|
|
367
|
+
},
|
|
368
|
+
"funding": {
|
|
369
|
+
"url": "https://github.com/sponsors/eemeli"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"node_modules/zod": {
|
|
373
|
+
"version": "4.1.8",
|
|
374
|
+
"license": "MIT",
|
|
375
|
+
"funding": {
|
|
376
|
+
"url": "https://github.com/sponsors/colinhacks"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
@@ -13,6 +13,11 @@ type BackgroundProcess = {
|
|
|
13
13
|
outputSizeBytes?: number
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
type BackgroundProcessNotificationRequest = {
|
|
17
|
+
sessionID: string
|
|
18
|
+
directory: string
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
type BackgroundProcessOptions = {
|
|
17
22
|
baseDir: string
|
|
18
23
|
}
|
|
@@ -36,12 +41,19 @@ export function createBackgroundProcessTools(config: CodeNomadConfig, options: B
|
|
|
36
41
|
args: {
|
|
37
42
|
title: tool.schema.string().describe("Short label for the process (e.g. Dev server, DB server)"),
|
|
38
43
|
command: tool.schema.string().describe("Shell command to run in the workspace"),
|
|
44
|
+
notify: tool.schema.boolean().optional().describe("Notify the current session when the process ends"),
|
|
39
45
|
},
|
|
40
|
-
async execute(args) {
|
|
46
|
+
async execute(args, context) {
|
|
41
47
|
assertCommandWithinBase(args.command, options.baseDir)
|
|
48
|
+
const notification: BackgroundProcessNotificationRequest | undefined = args.notify
|
|
49
|
+
? {
|
|
50
|
+
sessionID: context.sessionID,
|
|
51
|
+
directory: context.directory,
|
|
52
|
+
}
|
|
53
|
+
: undefined
|
|
42
54
|
const process = await request<BackgroundProcess>("", {
|
|
43
55
|
method: "POST",
|
|
44
|
-
body: JSON.stringify({ title: args.title, command: args.command }),
|
|
56
|
+
body: JSON.stringify({ title: args.title, command: args.command, notify: args.notify, notification }),
|
|
45
57
|
})
|
|
46
58
|
|
|
47
59
|
return `Started background process ${process.id} (${process.title})\nStatus: ${process.status}\nCommand: ${process.command}`
|
|
@@ -12,7 +12,7 @@ export class VoiceModeManager {
|
|
|
12
12
|
setEnabled(instanceId, connection, enabled) {
|
|
13
13
|
if (enabled && !this.options.connections.isConnected(connection)) {
|
|
14
14
|
this.options.logger.debug({ instanceId, clientId: connection.clientId, connectionId: connection.connectionId }, "Ignoring voice mode enable for disconnected client connection");
|
|
15
|
-
return;
|
|
15
|
+
return false;
|
|
16
16
|
}
|
|
17
17
|
const key = getConnectionKey(connection);
|
|
18
18
|
const current = this.enabledConnectionsByInstance.get(instanceId) ?? new Set();
|
|
@@ -30,6 +30,7 @@ export class VoiceModeManager {
|
|
|
30
30
|
}
|
|
31
31
|
this.options.logger.debug({ instanceId, clientId: connection.clientId, connectionId: connection.connectionId, enabled }, "Voice mode updated for client connection");
|
|
32
32
|
this.publishIfChanged(instanceId);
|
|
33
|
+
return true;
|
|
33
34
|
}
|
|
34
35
|
syncInstance(instanceId) {
|
|
35
36
|
this.options.channel.send(instanceId, buildVoiceModeEvent(this.isEnabled(instanceId)));
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import { describe, it } from "node:test";
|
|
4
|
+
import { resolveNetworkAddresses, resolveRemoteAddresses } from "../network-addresses";
|
|
5
|
+
describe("resolveNetworkAddresses", () => {
|
|
6
|
+
it("preserves interface order among external addresses", () => {
|
|
7
|
+
const addresses = [
|
|
8
|
+
{ address: "172.24.0.1", family: "IPv4", internal: false },
|
|
9
|
+
{ address: "192.168.1.128", family: "IPv4", internal: false },
|
|
10
|
+
{ address: "10.0.0.8", family: 4, internal: false },
|
|
11
|
+
{ address: "127.0.0.1", family: "IPv4", internal: true },
|
|
12
|
+
{ address: "169.254.10.20", family: "IPv4", internal: false },
|
|
13
|
+
];
|
|
14
|
+
usingMockedNetworkInterfaces(addresses, () => {
|
|
15
|
+
const result = resolveNetworkAddresses({ host: "0.0.0.0", protocol: "https", port: 9898 });
|
|
16
|
+
assert.deepEqual(result.map((entry) => entry.ip), ["172.24.0.1", "192.168.1.128", "10.0.0.8", "169.254.10.20", "127.0.0.1"]);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
describe("resolveRemoteAddresses", () => {
|
|
21
|
+
it("keeps all external addresses user-visible while preferring non-link-local addresses for the primary URL", () => {
|
|
22
|
+
const addresses = [
|
|
23
|
+
{ address: "169.254.10.20", family: "IPv4", internal: false },
|
|
24
|
+
{ address: "192.168.1.128", family: "IPv4", internal: false },
|
|
25
|
+
{ address: "172.24.0.1", family: "IPv4", internal: false },
|
|
26
|
+
];
|
|
27
|
+
usingMockedNetworkInterfaces(addresses, () => {
|
|
28
|
+
const result = resolveRemoteAddresses({ host: "0.0.0.0", protocol: "https", port: 9898 });
|
|
29
|
+
assert.deepEqual(result.userVisible.map((entry) => entry.ip), ["192.168.1.128", "172.24.0.1", "169.254.10.20"]);
|
|
30
|
+
assert.equal(result.primaryRemoteUrl, "https://192.168.1.128:9898");
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
it("prefers private LAN addresses over public addresses", () => {
|
|
34
|
+
const addresses = [
|
|
35
|
+
{ address: "203.0.113.40", family: "IPv4", internal: false },
|
|
36
|
+
{ address: "192.168.1.128", family: "IPv4", internal: false },
|
|
37
|
+
{ address: "8.8.8.8", family: "IPv4", internal: false },
|
|
38
|
+
];
|
|
39
|
+
usingMockedNetworkInterfaces(addresses, () => {
|
|
40
|
+
const result = resolveRemoteAddresses({ host: "0.0.0.0", protocol: "https", port: 9898 });
|
|
41
|
+
assert.deepEqual(result.userVisible.map((entry) => entry.ip), ["192.168.1.128", "203.0.113.40", "8.8.8.8"]);
|
|
42
|
+
assert.equal(result.primaryRemoteUrl, "https://192.168.1.128:9898");
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
it("uses a public address when no private LAN address is available", () => {
|
|
46
|
+
const addresses = [
|
|
47
|
+
{ address: "169.254.10.20", family: "IPv4", internal: false },
|
|
48
|
+
{ address: "203.0.113.40", family: "IPv4", internal: false },
|
|
49
|
+
];
|
|
50
|
+
usingMockedNetworkInterfaces(addresses, () => {
|
|
51
|
+
const result = resolveRemoteAddresses({ host: "0.0.0.0", protocol: "https", port: 9898 });
|
|
52
|
+
assert.deepEqual(result.userVisible.map((entry) => entry.ip), ["203.0.113.40", "169.254.10.20"]);
|
|
53
|
+
assert.equal(result.primaryRemoteUrl, "https://203.0.113.40:9898");
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
function usingMockedNetworkInterfaces(addresses, callback) {
|
|
58
|
+
const original = os.networkInterfaces;
|
|
59
|
+
os.networkInterfaces = (() => ({
|
|
60
|
+
ethernet0: addresses,
|
|
61
|
+
}));
|
|
62
|
+
try {
|
|
63
|
+
callback();
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
os.networkInterfaces = original;
|
|
67
|
+
}
|
|
68
|
+
}
|