ikanban-web 0.2.2 → 0.2.3

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/bin/cli.js CHANGED
@@ -54,8 +54,38 @@ function proxyRequest(req, res) {
54
54
  const server = http.createServer((req, res) => {
55
55
  const url = new URL(req.url, `http://localhost:${PORT}`)
56
56
 
57
- // Proxy API and WebSocket upgrade paths to OpenCode backend
58
- if (url.pathname.startsWith("/api/") || url.pathname.startsWith("/v1/")) {
57
+ // Proxy OpenCode API paths to backend.
58
+ // These are the top-level path segments used by @opencode-ai/sdk.
59
+ const API_PREFIXES = [
60
+ "/agent",
61
+ "/auth",
62
+ "/command",
63
+ "/config",
64
+ "/event",
65
+ "/experimental",
66
+ "/file",
67
+ "/find",
68
+ "/formatter",
69
+ "/global",
70
+ "/instance",
71
+ "/log",
72
+ "/lsp",
73
+ "/mcp",
74
+ "/path",
75
+ "/permission",
76
+ "/project",
77
+ "/provider",
78
+ "/pty",
79
+ "/question",
80
+ "/session",
81
+ "/skill",
82
+ "/tui",
83
+ "/vcs",
84
+ ]
85
+ const isApi = API_PREFIXES.some(
86
+ (p) => url.pathname === p || url.pathname.startsWith(p + "/"),
87
+ )
88
+ if (isApi) {
59
89
  return proxyRequest(req, res)
60
90
  }
61
91