@openchamber/web 1.11.5 → 1.11.6

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.
Files changed (48) hide show
  1. package/dist/assets/{MarkdownRendererImpl-C3-ZpwEx.js → MarkdownRendererImpl-COdbjw73.js} +3 -3
  2. package/dist/assets/{MultiRunWindow-BDfPzMDy.js → MultiRunWindow-BKSHxjMq.js} +1 -1
  3. package/dist/assets/{OnboardingScreen-DGgh4IXB.js → OnboardingScreen-Chjg337p.js} +1 -1
  4. package/dist/assets/{SettingsWindow-B8QKr5dB.js → SettingsWindow-C0lRRW8M.js} +1 -1
  5. package/dist/assets/{TerminalView-D7IIkSGJ.js → TerminalView-Bvil3j1u.js} +4 -4
  6. package/dist/assets/es-BZIAUghG.js +15 -0
  7. package/dist/assets/index-UcCH2KN9.css +1 -0
  8. package/dist/assets/ko-DU9l-zox.js +15 -0
  9. package/dist/assets/{main-VVcyjpiF.js → main-Blhx9Fp5.js} +2 -2
  10. package/dist/assets/main-d2-dY4er.js +232 -0
  11. package/dist/assets/miniChat-CJ7-rZFl.js +2 -0
  12. package/dist/assets/{modelPrefsAutoSave-Ctdc3cCY.js → modelPrefsAutoSave-DRJSYigo.js} +96 -96
  13. package/dist/assets/{pl-C577DpsX.js → pl-CdqzokG-.js} +1 -1
  14. package/dist/assets/pt-BR-Bknbr_Y3.js +15 -0
  15. package/dist/assets/{renderElectronMiniChatApp-CsddCM3q.js → renderElectronMiniChatApp-BxZRI73j.js} +2 -2
  16. package/dist/assets/uk-Be4E8ZNO.js +15 -0
  17. package/dist/assets/zh-CN-qpPiaZMg.js +15 -0
  18. package/dist/index.html +3 -3
  19. package/dist/mini-chat.html +3 -3
  20. package/package.json +1 -1
  21. package/server/index.js +2 -0
  22. package/server/lib/cloudflare-tunnel.js +3 -5
  23. package/server/lib/ngrok-tunnel.js +209 -0
  24. package/server/lib/opencode/core-routes.js +1 -0
  25. package/server/lib/opencode/feature-routes-runtime.js +35 -0
  26. package/server/lib/opencode/index.js +19 -0
  27. package/server/lib/opencode/npm-registry.js +157 -0
  28. package/server/lib/opencode/npm-registry.test.js +179 -0
  29. package/server/lib/opencode/plugin-routes.js +373 -0
  30. package/server/lib/opencode/plugin-routes.test.js +384 -0
  31. package/server/lib/opencode/plugin-spec.js +107 -0
  32. package/server/lib/opencode/plugin-spec.test.js +154 -0
  33. package/server/lib/opencode/plugins.js +393 -0
  34. package/server/lib/opencode/plugins.test.js +176 -0
  35. package/server/lib/opencode/settings-helpers.js +3 -0
  36. package/server/lib/opencode/settings-helpers.test.js +11 -0
  37. package/server/lib/tunnels/DOCUMENTATION.md +1 -0
  38. package/server/lib/tunnels/providers/ngrok.js +117 -0
  39. package/server/lib/tunnels/types.js +2 -0
  40. package/dist/assets/es-dIVpApmS.js +0 -15
  41. package/dist/assets/index-Bk9IWJe1.css +0 -1
  42. package/dist/assets/ko-Cqf3E9-d.js +0 -15
  43. package/dist/assets/main-D45l3Dxw.js +0 -232
  44. package/dist/assets/miniChat-a9w7WM0c.js +0 -2
  45. package/dist/assets/pt-BR-BeeF6VlK.js +0 -15
  46. package/dist/assets/uk-CZ7XVz_D.js +0 -15
  47. package/dist/assets/zh-CN-BMSSqdyO.js +0 -15
  48. /package/dist/assets/{index-DHluop4D.js → index-B9LvUHdG.js} +0 -0
@@ -0,0 +1,117 @@
1
+ import {
2
+ checkNgrokApiReachability,
3
+ checkNgrokAuthtokenConfigured,
4
+ checkNgrokAvailable,
5
+ startNgrokQuickTunnel,
6
+ } from '../../ngrok-tunnel.js';
7
+
8
+ import {
9
+ TUNNEL_INTENT_EPHEMERAL_PUBLIC,
10
+ TUNNEL_MODE_QUICK,
11
+ TUNNEL_PROVIDER_NGROK,
12
+ TunnelServiceError,
13
+ } from '../types.js';
14
+
15
+ export const ngrokTunnelProviderCapabilities = {
16
+ provider: TUNNEL_PROVIDER_NGROK,
17
+ defaults: {
18
+ mode: TUNNEL_MODE_QUICK,
19
+ optionDefaults: {},
20
+ },
21
+ modes: [
22
+ {
23
+ key: TUNNEL_MODE_QUICK,
24
+ label: 'Quick Tunnel',
25
+ intent: TUNNEL_INTENT_EPHEMERAL_PUBLIC,
26
+ requires: [],
27
+ supports: ['sessionTTL'],
28
+ stability: 'beta',
29
+ },
30
+ ],
31
+ };
32
+
33
+ export function createNgrokTunnelProvider() {
34
+ return {
35
+ id: TUNNEL_PROVIDER_NGROK,
36
+ capabilities: ngrokTunnelProviderCapabilities,
37
+ checkAvailability: async () => {
38
+ const result = await checkNgrokAvailable();
39
+ if (result.available) {
40
+ return result;
41
+ }
42
+ return {
43
+ ...result,
44
+ message: 'ngrok is not installed. Install it with: brew install ngrok',
45
+ };
46
+ },
47
+ diagnose: async () => {
48
+ const dependency = await checkNgrokAvailable();
49
+ const authtoken = await checkNgrokAuthtokenConfigured(dependency.path);
50
+ const network = await checkNgrokApiReachability();
51
+ const startupReady = dependency.available && authtoken.configured && network.reachable;
52
+ const providerChecks = [
53
+ {
54
+ id: 'dependency',
55
+ label: 'ngrok installed',
56
+ status: dependency.available ? 'pass' : 'fail',
57
+ detail: dependency.available
58
+ ? (dependency.version || dependency.path || 'ngrok available')
59
+ : 'ngrok is not installed. Install it with: brew install ngrok',
60
+ },
61
+ {
62
+ id: 'authtoken',
63
+ label: 'ngrok authtoken configured',
64
+ status: authtoken.configured ? 'pass' : 'fail',
65
+ detail: authtoken.configured
66
+ ? authtoken.detail
67
+ : (authtoken.detail || 'Run: ngrok config add-authtoken <your-ngrok-token>'),
68
+ },
69
+ {
70
+ id: 'network',
71
+ label: 'ngrok API reachable',
72
+ status: network.reachable ? 'pass' : 'fail',
73
+ detail: network.reachable
74
+ ? (network.status ? `HTTP ${network.status}` : 'Reachable')
75
+ : (network.error || 'Could not reach api.ngrok.com'),
76
+ },
77
+ ];
78
+
79
+ return {
80
+ providerChecks,
81
+ modes: [
82
+ {
83
+ mode: TUNNEL_MODE_QUICK,
84
+ checks: [
85
+ {
86
+ id: 'startup_readiness',
87
+ label: 'Provider startup readiness',
88
+ status: startupReady ? 'pass' : 'fail',
89
+ detail: startupReady
90
+ ? 'Provider dependency, auth, and network checks passed.'
91
+ : 'Resolve provider checks before starting tunnels.',
92
+ },
93
+ ],
94
+ summary: {
95
+ ready: startupReady,
96
+ failures: startupReady ? 0 : 1,
97
+ warnings: 0,
98
+ },
99
+ ready: startupReady,
100
+ blockers: startupReady ? [] : ['Resolve provider checks before starting tunnels.'],
101
+ },
102
+ ],
103
+ };
104
+ },
105
+ start: async (request, context = {}) => {
106
+ if (request.mode !== TUNNEL_MODE_QUICK) {
107
+ throw new TunnelServiceError('mode_unsupported', `Ngrok only supports '${TUNNEL_MODE_QUICK}' mode right now`);
108
+ }
109
+ return startNgrokQuickTunnel({ port: context.activePort });
110
+ },
111
+ stop: (controller) => {
112
+ controller?.stop?.();
113
+ },
114
+ resolvePublicUrl: (controller) => controller?.getPublicUrl?.() ?? null,
115
+ getMetadata: () => null,
116
+ };
117
+ }
@@ -2,6 +2,7 @@ import os from 'os';
2
2
  import path from 'path';
3
3
 
4
4
  export const TUNNEL_PROVIDER_CLOUDFLARE = 'cloudflare';
5
+ export const TUNNEL_PROVIDER_NGROK = 'ngrok';
5
6
 
6
7
  export const TUNNEL_MODE_QUICK = 'quick';
7
8
  export const TUNNEL_MODE_MANAGED_REMOTE = 'managed-remote';
@@ -34,6 +35,7 @@ export class TunnelServiceError extends Error {
34
35
 
35
36
  const SUPPORTED_TUNNEL_PROVIDERS = new Set([
36
37
  TUNNEL_PROVIDER_CLOUDFLARE,
38
+ TUNNEL_PROVIDER_NGROK,
37
39
  ]);
38
40
 
39
41
  export function normalizeTunnelProvider(value) {