snow-flow 10.0.93 → 10.0.95
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/package.json
CHANGED
package/src/cli/cmd/serve.ts
CHANGED
|
@@ -14,6 +14,12 @@ export const ServeCommand = cmd({
|
|
|
14
14
|
const opts = await resolveNetworkOptions(args)
|
|
15
15
|
const server = Server.listen(opts)
|
|
16
16
|
console.log(`opencode server listening on http://${server.hostname}:${server.port}`)
|
|
17
|
+
|
|
18
|
+
// Pre-warm Instance bootstrap so it's cached before TUI connects
|
|
19
|
+
fetch(`http://127.0.0.1:${server.port}/config`)
|
|
20
|
+
.then(() => console.log("server bootstrap warmup complete"))
|
|
21
|
+
.catch((e) => console.log(`server bootstrap warmup failed: ${e instanceof Error ? e.message : e}`))
|
|
22
|
+
|
|
17
23
|
await new Promise(() => {})
|
|
18
24
|
await server.stop()
|
|
19
25
|
},
|
|
@@ -103,6 +103,13 @@ export const TuiThreadCommand = cmd({
|
|
|
103
103
|
if (args.connect) {
|
|
104
104
|
// Connect mode: use existing server, no worker
|
|
105
105
|
url = args.connect
|
|
106
|
+
console.log(`[snow-flow] connect mode: ${url}`)
|
|
107
|
+
try {
|
|
108
|
+
const res = await fetch(`${url}/config`, { signal: AbortSignal.timeout(10000) })
|
|
109
|
+
console.log(`[snow-flow] server ready: ${res.status}`)
|
|
110
|
+
} catch (e) {
|
|
111
|
+
console.log(`[snow-flow] server check failed: ${e instanceof Error ? e.message : e}`)
|
|
112
|
+
}
|
|
106
113
|
onExit = async () => {}
|
|
107
114
|
onUpgrade = async () => ({})
|
|
108
115
|
} else {
|