@neuralnomads/codenomad 0.9.0 → 0.9.2

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.
@@ -10,8 +10,11 @@ const PreferencesSchema = z.object({
10
10
  thinkingBlocksExpansion: z.enum(["expanded", "collapsed"]).default("expanded"),
11
11
  showTimelineTools: z.boolean().default(true),
12
12
  lastUsedBinary: z.string().optional(),
13
+ locale: z.string().optional(),
13
14
  environmentVariables: z.record(z.string()).default({}),
14
15
  modelRecents: z.array(ModelPreferenceSchema).default([]),
16
+ modelFavorites: z.array(ModelPreferenceSchema).default([]),
17
+ modelThinkingSelections: z.record(z.string(), z.string()).default({}),
15
18
  diffViewMode: z.enum(["split", "unified"]).default("split"),
16
19
  toolOutputExpansion: z.enum(["expanded", "collapsed"]).default("expanded"),
17
20
  diagnosticsExpansion: z.enum(["expanded", "collapsed"]).default("expanded"),
package/dist/index.js CHANGED
@@ -205,22 +205,32 @@ async function main() {
205
205
  return;
206
206
  }
207
207
  shuttingDown = true;
208
- logger.info("Received shutdown signal, closing server");
209
- try {
210
- await server.stop();
211
- logger.info("HTTP server stopped");
212
- }
213
- catch (error) {
214
- logger.error({ err: error }, "Failed to stop HTTP server");
215
- }
216
- try {
217
- instanceEventBridge.shutdown();
218
- await workspaceManager.shutdown();
219
- logger.info("Workspace manager shutdown complete");
220
- }
221
- catch (error) {
222
- logger.error({ err: error }, "Workspace manager shutdown failed");
223
- }
208
+ logger.info("Received shutdown signal, stopping workspaces and server");
209
+ const shutdownWorkspaces = (async () => {
210
+ try {
211
+ instanceEventBridge.shutdown();
212
+ }
213
+ catch (error) {
214
+ logger.warn({ err: error }, "Instance event bridge shutdown failed");
215
+ }
216
+ try {
217
+ await workspaceManager.shutdown();
218
+ logger.info("Workspace manager shutdown complete");
219
+ }
220
+ catch (error) {
221
+ logger.error({ err: error }, "Workspace manager shutdown failed");
222
+ }
223
+ })();
224
+ const shutdownHttp = (async () => {
225
+ try {
226
+ await server.stop();
227
+ logger.info("HTTP server stopped");
228
+ }
229
+ catch (error) {
230
+ logger.error({ err: error }, "Failed to stop HTTP server");
231
+ }
232
+ })();
233
+ await Promise.allSettled([shutdownWorkspaces, shutdownHttp]);
224
234
  // no-op: remote UI manifest replaces GitHub release monitor
225
235
  logger.info("Exiting process");
226
236
  process.exit(0);
@@ -3,6 +3,6 @@
3
3
  "version": "0.5.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@opencode-ai/plugin": "1.1.30"
6
+ "@opencode-ai/plugin": "1.1.36"
7
7
  }
8
8
  }
@@ -136,16 +136,19 @@ export class WorkspaceManager {
136
136
  }
137
137
  async shutdown() {
138
138
  this.options.logger.info("Shutting down all workspaces");
139
+ const stopTasks = [];
139
140
  for (const [id, workspace] of this.workspaces) {
140
- if (workspace.pid) {
141
- this.options.logger.info({ workspaceId: id }, "Stopping workspace during shutdown");
142
- await this.runtime.stop(id).catch((error) => {
143
- this.options.logger.error({ workspaceId: id, err: error }, "Failed to stop workspace during shutdown");
144
- });
145
- }
146
- else {
141
+ if (!workspace.pid) {
147
142
  this.options.logger.debug({ workspaceId: id }, "Workspace already stopped");
143
+ continue;
148
144
  }
145
+ this.options.logger.info({ workspaceId: id }, "Stopping workspace during shutdown");
146
+ stopTasks.push(this.runtime.stop(id).catch((error) => {
147
+ this.options.logger.error({ workspaceId: id, err: error }, "Failed to stop workspace during shutdown");
148
+ }));
149
+ }
150
+ if (stopTasks.length > 0) {
151
+ await Promise.allSettled(stopTasks);
149
152
  }
150
153
  this.workspaces.clear();
151
154
  this.opencodeAuth.clear();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuralnomads/codenomad",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "CodeNomad Server",
5
5
  "author": {
6
6
  "name": "Neural Nomads",