repoburg 1.3.231 → 1.3.233

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,8 @@
10
10
  href="https://fonts.googleapis.com/css2?family=Inter:wght@400;450;510;590;600&family=JetBrains+Mono:wght@400;500&display=swap"
11
11
  rel="stylesheet"
12
12
  />
13
- <script type="module" crossorigin src="/assets/index-BFzfnSZm.js"></script>
14
- <link rel="stylesheet" crossorigin href="/assets/index-lc9eQnqi.css">
13
+ <script type="module" crossorigin src="/assets/index-BGAclp9s.js"></script>
14
+ <link rel="stylesheet" crossorigin href="/assets/index-B8tLcszC.css">
15
15
  </head>
16
16
  <body>
17
17
  <div id="root"></div>
@@ -90,6 +90,7 @@ async function loadAgentPane(opts = {}) {
90
90
  });
91
91
  },
92
92
  shutdown: mod.shutdownAllProviders,
93
+ handleVscodeUpgrade: mod.handleVscodeWebUpgrade,
93
94
  close: () => fastify.close(),
94
95
  };
95
96
  }
@@ -118,6 +119,14 @@ function createUpgradeRouter(pane, daemonWss, guard) {
118
119
  socket.write('HTTP/1.1 403 Forbidden\r\n\r\n');
119
120
  socket.destroy();
120
121
  };
122
+ if (pane && url.startsWith('/vscode')) {
123
+ if (pane.handleVscodeUpgrade) {
124
+ pane.handleVscodeUpgrade(req, socket, head);
125
+ return;
126
+ }
127
+ reject();
128
+ return;
129
+ }
121
130
  if (pane && url.startsWith('/ws')) {
122
131
  if (!guard) {
123
132
  guardedUpgrade();
@@ -140,6 +140,28 @@ describe('createUpgradeRouter', () => {
140
140
  route({ url: '/ws' }, {}, Buffer.alloc(0));
141
141
  expect(daemonWss.handleUpgrade).toHaveBeenCalled();
142
142
  });
143
+ it('sends /vscode upgrades to the embedded pane proxy', () => {
144
+ const pane = {
145
+ handleWsUpgrade: jest.fn(),
146
+ handleVscodeUpgrade: jest.fn(),
147
+ };
148
+ const daemonWss = { handleUpgrade: jest.fn(), emit: jest.fn() };
149
+ const route = (0, agentPane_1.createUpgradeRouter)(pane, daemonWss);
150
+ route({ url: '/vscode/stable-hash/' }, {}, Buffer.alloc(0));
151
+ expect(pane.handleVscodeUpgrade).toHaveBeenCalled();
152
+ expect(pane.handleWsUpgrade).not.toHaveBeenCalled();
153
+ expect(daemonWss.handleUpgrade).not.toHaveBeenCalled();
154
+ });
155
+ it('destroys /vscode upgrades when the pane bundle has no proxy handler', () => {
156
+ const pane = { handleWsUpgrade: jest.fn() };
157
+ const daemonWss = { handleUpgrade: jest.fn(), emit: jest.fn() };
158
+ const route = (0, agentPane_1.createUpgradeRouter)(pane, daemonWss);
159
+ const socket = { write: jest.fn(), destroy: jest.fn() };
160
+ route({ url: '/vscode/' }, socket, Buffer.alloc(0));
161
+ expect(socket.write).toHaveBeenCalledWith(expect.stringContaining('403'));
162
+ expect(socket.destroy).toHaveBeenCalled();
163
+ expect(daemonWss.handleUpgrade).not.toHaveBeenCalled();
164
+ });
143
165
  });
144
166
  describe('loadAgentPane', () => {
145
167
  it('returns null when disabled via the kill-switch', async () => {
@@ -46,6 +46,11 @@ async function main() {
46
46
  // Embedded agent-pane API. MUST precede express.json() — Fastify parses its
47
47
  // own request bodies; the stream can only be consumed once.
48
48
  app.all('/api/*', (0, agentPane_1.createPaneDelegate)(pane));
49
+ // Same-origin VS Code web proxy (/vscode/* in the embedded app). Route-style
50
+ // mount (not app.use) keeps req.url intact — serve-web serves under the
51
+ // /vscode base path. Unauthenticated by design: the connection token is the
52
+ // secret (see createUpgradeRouter). Must also precede express.json().
53
+ app.all(['/vscode', '/vscode/*'], (0, agentPane_1.createPaneDelegate)(pane));
49
54
  app.use(express_1.default.json());
50
55
  // Tunnel lifecycle API — local-only; the CF ingress edge blocks /remote/*
51
56
  // for tunnel traffic (see account-server CloudflareService.setIngress).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repoburg",
3
- "version": "1.3.231",
3
+ "version": "1.3.233",
4
4
  "description": "A local AI-powered software developer assistant that runs on your own machine.",
5
5
  "author": "Celal Ertug",
6
6
  "license": "SEE LICENSE IN LICENSE",
Binary file