@openchamber/web 1.13.3 → 1.13.4
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-output.js +0 -7
- package/bin/cli.js +132 -5548
- package/bin/cli.test.js +674 -0
- package/bin/lib/DOCUMENTATION.md +121 -0
- package/bin/lib/cli-args.js +726 -0
- package/bin/lib/cli-errors.js +18 -0
- package/bin/lib/cli-executables.js +54 -0
- package/bin/lib/cli-http.js +215 -0
- package/bin/lib/cli-lifecycle.js +421 -0
- package/bin/lib/cli-log-files.js +93 -0
- package/bin/lib/cli-network.js +153 -0
- package/bin/lib/cli-paths.js +111 -0
- package/bin/lib/cli-ports.js +51 -0
- package/bin/lib/cli-process.js +292 -0
- package/bin/lib/cli-startup.js +370 -0
- package/bin/lib/cli-tunnel-capabilities.js +9 -0
- package/bin/lib/cli-tunnel-profiles.js +366 -0
- package/bin/lib/cli-tunnel-utils.js +300 -0
- package/bin/lib/commands-connect-url.js +173 -0
- package/bin/lib/commands-lifecycle.js +396 -0
- package/bin/lib/commands-logs.js +110 -0
- package/bin/lib/commands-serve.js +396 -0
- package/bin/lib/commands-startup.js +64 -0
- package/bin/lib/commands-status.js +114 -0
- package/bin/lib/commands-tunnel.js +1757 -0
- package/bin/lib/commands-update.js +141 -0
- package/dist/assets/{DiagramView-BmHROYsX.js → DiagramView-BAoYIAGR.js} +1 -1
- package/dist/assets/{MarkdownRendererImpl-DiJE-v5Q.js → MarkdownRendererImpl-B0NE4mIY.js} +3 -3
- package/dist/assets/MultiRunWindow-BT4kt6aB.js +1 -0
- package/dist/assets/NewWorktreeDialog-Bx-zQyBp.js +167 -0
- package/dist/assets/{OnboardingScreen-DpBF8dKJ.js → OnboardingScreen-CbJOPUxm.js} +1 -1
- package/dist/assets/{SessionSwitcherDropdown-1xaHUxPK.js → SessionSwitcherDropdown-BbUzUNEi.js} +1 -1
- package/dist/assets/{SettingsWindow-ChwLyQAe.js → SettingsWindow-CSb8eo8p.js} +1 -1
- package/dist/assets/{TerminalView-DGEBNuAp.js → TerminalView-ME5MOz7S.js} +1 -1
- package/dist/assets/es-Bk-yR0w-.js +15 -0
- package/dist/assets/fr-f1ibV7QU.js +13 -0
- package/dist/assets/index-B82A6jBD.css +1 -0
- package/dist/assets/index-BsXkdBYx.js +3 -0
- package/dist/assets/ja-D9mS3zWP.js +15 -0
- package/dist/assets/ko-Cpl1IA3D.js +15 -0
- package/dist/assets/{main-fm_8J7Lk.js → main-D6eC2bnV.js} +2 -2
- package/dist/assets/main-fsOGbLGZ.js +214 -0
- package/dist/assets/miniChat-DKGU29GZ.js +2 -0
- package/dist/assets/mobile-YHQHMYWC.js +2 -0
- package/dist/assets/pl-CYke_fxL.js +15 -0
- package/dist/assets/pt-BR-Clb6Z8up.js +15 -0
- package/dist/assets/renderElectronMiniChatApp-3vxeddJO.js +2 -0
- package/dist/assets/{renderMobileApp-6s0G1iIJ.js → renderMobileApp-BrvLHYCY.js} +5 -5
- package/dist/assets/uk-CXn8cxXa.js +15 -0
- package/dist/assets/{useAppFontEffects-CV5C5O0r.js → useAppFontEffects-b7bqtGFf.js} +124 -119
- package/dist/assets/{vendor-.bun-CC_Xso_s.js → vendor-.bun-By2L9XvG.js} +1 -1
- package/dist/assets/zh-CN-BRwwlEdG.js +15 -0
- package/dist/assets/zh-TW-D5pg5Z8l.js +15 -0
- package/dist/index.html +4 -4
- package/dist/mini-chat.html +4 -4
- package/dist/mobile.html +4 -4
- package/package.json +1 -1
- package/server/lib/cloudflare-tunnel.js +2 -2
- package/server/lib/event-stream/global-hub.js +1 -1
- package/server/lib/event-stream/index.js +0 -12
- package/server/lib/event-stream/runtime.js +1 -1
- package/server/lib/git/service.js +18 -0
- package/server/lib/git/service.test.js +48 -0
- package/server/lib/notifications/index.js +1 -4
- package/server/lib/opencode/agents.js +0 -6
- package/server/lib/opencode/commands.js +0 -5
- package/server/lib/opencode/config-entity-routes.js +39 -21
- package/server/lib/opencode/feature-routes-runtime.js +27 -62
- package/server/lib/opencode/lifecycle.js +13 -1
- package/server/lib/opencode/npm-registry.js +3 -3
- package/server/lib/opencode/proxy.js +3 -3
- package/server/lib/opencode/shared.js +0 -6
- package/server/lib/opencode/skills.js +0 -2
- package/server/lib/opencode/snippets.js +0 -2
- package/server/lib/package-manager.js +5 -5
- package/server/lib/projects/project-config.js +0 -8
- package/server/lib/quota/DOCUMENTATION.md +3 -1
- package/server/lib/quota/providers/claude.js +1 -1
- package/server/lib/quota/providers/codex.js +1 -1
- package/server/lib/quota/providers/copilot.js +1 -1
- package/server/lib/quota/providers/cursor.js +1 -1
- package/server/lib/quota/providers/google/auth.js +2 -2
- package/server/lib/quota/providers/google/index.js +0 -27
- package/server/lib/quota/providers/google/transforms.js +1 -1
- package/server/lib/quota/providers/index.js +1 -1
- package/server/lib/quota/providers/kimi.js +1 -1
- package/server/lib/quota/providers/minimax-cn-coding-plan.js +1 -1
- package/server/lib/quota/providers/minimax-coding-plan.js +1 -1
- package/server/lib/quota/providers/nanogpt.js +1 -1
- package/server/lib/quota/providers/ollama-cloud.js +1 -1
- package/server/lib/quota/providers/openai.js +4 -4
- package/server/lib/quota/providers/openrouter.js +1 -1
- package/server/lib/quota/providers/wafer.js +1 -1
- package/server/lib/quota/providers/zai.js +1 -1
- package/server/lib/quota/providers/zhipuai-coding-plan.js +1 -1
- package/server/lib/skills-catalog/cache.js +0 -4
- package/server/lib/skills-catalog/clawdhub/api.js +0 -32
- package/server/lib/skills-catalog/clawdhub/scan.js +0 -52
- package/server/lib/skills-catalog/curated-sources.js +1 -1
- package/server/lib/skills-catalog/source.js +5 -0
- package/server/lib/terminal/runtime.js +11 -9
- package/server/lib/text/summarization.js +1 -1
- package/server/lib/tunnels/providers/ngrok.js +1 -1
- package/server/lib/tunnels/types.js +2 -2
- package/dist/assets/MultiRunWindow-yZoCT7F7.js +0 -1
- package/dist/assets/NewWorktreeDialog-CTMiE7Xd.js +0 -167
- package/dist/assets/es-CTE-E8we.js +0 -15
- package/dist/assets/fr-TVkZpyEo.js +0 -13
- package/dist/assets/index-B4pCDMbq.css +0 -1
- package/dist/assets/index-D9uMvTQF.js +0 -3
- package/dist/assets/ko-D_UCJIIL.js +0 -15
- package/dist/assets/main-eAd3a6tx.js +0 -214
- package/dist/assets/miniChat-Bbjg31IC.js +0 -2
- package/dist/assets/mobile-B3_j_DsB.js +0 -2
- package/dist/assets/pl-nDEkk-GZ.js +0 -15
- package/dist/assets/pt-BR-B_g2RcgU.js +0 -15
- package/dist/assets/renderElectronMiniChatApp-CB13zs6N.js +0 -2
- package/dist/assets/uk-CWLhnPGW.js +0 -15
- package/dist/assets/zh-CN-BFxe1b5m.js +0 -15
- package/dist/assets/zh-TW-n-d-xbGV.js +0 -15
- package/server/lib/opencode/index.js +0 -95
- package/server/lib/quota/providers/interface.js +0 -55
- package/server/lib/skills-catalog/clawdhub/index.js +0 -30
- package/server/lib/skills-catalog/index.js +0 -42
- package/server/lib/terminal/index.js +0 -31
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
export const providerId = 'claude';
|
|
12
12
|
export const providerName = 'Claude';
|
|
13
|
-
|
|
13
|
+
const aliases = ['anthropic', 'claude'];
|
|
14
14
|
|
|
15
15
|
export const isConfigured = () => {
|
|
16
16
|
const auth = readAuthFile();
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
|
|
12
12
|
export const providerId = 'codex';
|
|
13
13
|
export const providerName = 'Codex';
|
|
14
|
-
|
|
14
|
+
const aliases = ['openai', 'codex', 'chatgpt'];
|
|
15
15
|
|
|
16
16
|
export const isConfigured = () => {
|
|
17
17
|
const auth = readAuthFile();
|
|
@@ -40,7 +40,7 @@ const buildCopilotWindows = (payload) => {
|
|
|
40
40
|
|
|
41
41
|
export const providerId = 'github-copilot';
|
|
42
42
|
export const providerName = 'GitHub Copilot';
|
|
43
|
-
|
|
43
|
+
const aliases = ['github-copilot', 'copilot'];
|
|
44
44
|
|
|
45
45
|
export const isConfigured = () => {
|
|
46
46
|
const auth = readAuthFile();
|
|
@@ -21,7 +21,7 @@ const STATE_DB = join(homedir(), 'Library', 'Application Support', 'Cursor', 'Us
|
|
|
21
21
|
|
|
22
22
|
export const providerId = 'cursor';
|
|
23
23
|
export const providerName = 'Cursor';
|
|
24
|
-
|
|
24
|
+
const aliases = ['cursor'];
|
|
25
25
|
|
|
26
26
|
const readJwtPayload = (token) => {
|
|
27
27
|
try {
|
|
@@ -39,7 +39,7 @@ export const resolveGoogleOAuthClient = (sourceId) => {
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
const resolveGeminiCliAuth = (auth) => {
|
|
43
43
|
const entry = normalizeAuthEntry(getAuthEntry(auth, ['google', 'google.oauth']));
|
|
44
44
|
const entryObject = asObject(entry);
|
|
45
45
|
if (!entryObject) {
|
|
@@ -64,7 +64,7 @@ export const resolveGeminiCliAuth = (auth) => {
|
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
const resolveAntigravityAuth = () => {
|
|
68
68
|
for (const filePath of ANTIGRAVITY_ACCOUNTS_PATHS) {
|
|
69
69
|
const data = readJsonFile(filePath);
|
|
70
70
|
const accounts = data?.accounts;
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google Provider
|
|
3
|
-
*
|
|
4
|
-
* Google quota provider implementation.
|
|
5
|
-
* @module quota/providers/google
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
resolveGoogleOAuthClient,
|
|
10
|
-
resolveGeminiCliAuth,
|
|
11
|
-
resolveAntigravityAuth,
|
|
12
|
-
resolveGoogleAuthSources,
|
|
13
|
-
DEFAULT_PROJECT_ID
|
|
14
|
-
} from './auth.js';
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
resolveGoogleWindow,
|
|
18
|
-
transformQuotaBucket,
|
|
19
|
-
transformModelData
|
|
20
|
-
} from './transforms.js';
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
refreshGoogleAccessToken,
|
|
24
|
-
fetchGoogleQuotaBuckets,
|
|
25
|
-
fetchGoogleModels
|
|
26
|
-
} from './api.js';
|
|
27
|
-
|
|
28
1
|
import { buildResult } from '../../utils/index.js';
|
|
29
2
|
import {
|
|
30
3
|
resolveGoogleAuthSources,
|
|
@@ -29,7 +29,7 @@ export const parseGoogleRefreshToken = (rawRefreshToken) => {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
const resolveGoogleWindow = (sourceId, resetAt) => {
|
|
33
33
|
if (sourceId === 'gemini') {
|
|
34
34
|
return { label: 'daily', seconds: GOOGLE_DAILY_WINDOW_SECONDS };
|
|
35
35
|
}
|
|
@@ -168,7 +168,7 @@ export const fetchCopilotAddonQuota = copilot.fetchQuotaAddon;
|
|
|
168
168
|
export const fetchKimiQuota = kimi.fetchQuota;
|
|
169
169
|
export const fetchOpenRouterQuota = openrouter.fetchQuota;
|
|
170
170
|
export const fetchZaiQuota = zai.fetchQuota;
|
|
171
|
-
|
|
171
|
+
const fetchZhipuaiCodingPlanQuota = zhipuaiCodingPlan.fetchQuota;
|
|
172
172
|
export const fetchNanoGptQuota = nanogpt.fetchQuota;
|
|
173
173
|
export const fetchMinimaxCodingPlanQuota = minimaxCodingPlan.fetchQuota;
|
|
174
174
|
export const fetchMinimaxCnCodingPlanQuota = minimaxCnCodingPlan.fetchQuota;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const providerId = 'kimi-for-coding';
|
|
14
14
|
export const providerName = 'Kimi for Coding';
|
|
15
|
-
|
|
15
|
+
const aliases = ['kimi-for-coding', 'kimi'];
|
|
16
16
|
|
|
17
17
|
export const isConfigured = () => {
|
|
18
18
|
const auth = readAuthFile();
|
|
@@ -10,6 +10,6 @@ const provider = createMiniMaxCodingPlanProvider({
|
|
|
10
10
|
|
|
11
11
|
export const providerId = provider.providerId;
|
|
12
12
|
export const providerName = provider.providerName;
|
|
13
|
-
|
|
13
|
+
const aliases = provider.aliases;
|
|
14
14
|
export const isConfigured = provider.isConfigured;
|
|
15
15
|
export const fetchQuota = provider.fetchQuota;
|
|
@@ -10,6 +10,6 @@ const provider = createMiniMaxCodingPlanProvider({
|
|
|
10
10
|
|
|
11
11
|
export const providerId = provider.providerId;
|
|
12
12
|
export const providerName = provider.providerName;
|
|
13
|
-
|
|
13
|
+
const aliases = provider.aliases;
|
|
14
14
|
export const isConfigured = provider.isConfigured;
|
|
15
15
|
export const fetchQuota = provider.fetchQuota;
|
|
@@ -12,7 +12,7 @@ const NANO_GPT_DAILY_WINDOW_SECONDS = 86400;
|
|
|
12
12
|
|
|
13
13
|
export const providerId = 'nano-gpt';
|
|
14
14
|
export const providerName = 'NanoGPT';
|
|
15
|
-
|
|
15
|
+
const aliases = ['nano-gpt', 'nanogpt', 'nano_gpt'];
|
|
16
16
|
|
|
17
17
|
export const isConfigured = () => {
|
|
18
18
|
const auth = readAuthFile();
|
|
@@ -7,7 +7,7 @@ const COOKIE_PATH = join(homedir(), '.config', 'ollama-quota', 'cookie');
|
|
|
7
7
|
|
|
8
8
|
export const providerId = 'ollama-cloud';
|
|
9
9
|
export const providerName = 'Ollama Cloud';
|
|
10
|
-
|
|
10
|
+
const aliases = ['ollama-cloud', 'ollamacloud'];
|
|
11
11
|
|
|
12
12
|
const readCookieFile = () => {
|
|
13
13
|
try {
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
toTimestamp
|
|
9
9
|
} from '../utils/index.js';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const providerId = 'openai';
|
|
12
|
+
const providerName = 'OpenAI';
|
|
13
|
+
const aliases = ['openai', 'codex', 'chatgpt'];
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const isConfigured = () => {
|
|
16
16
|
const auth = readAuthFile();
|
|
17
17
|
const entry = normalizeAuthEntry(getAuthEntry(auth, aliases));
|
|
18
18
|
return Boolean(entry?.access || entry?.token);
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const providerId = 'wafer';
|
|
14
14
|
export const providerName = 'Wafer.ai';
|
|
15
|
-
|
|
15
|
+
const aliases = ['wafer', 'wafer-ai', 'wafer_ai', 'wafer.ai'];
|
|
16
16
|
|
|
17
17
|
const WAFER_QUOTA_URL = 'https://pass.wafer.ai/v1/inference/quota';
|
|
18
18
|
const WAFER_WINDOW_SECONDS = 5 * 3600;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
|
|
14
14
|
export const providerId = 'zai-coding-plan';
|
|
15
15
|
export const providerName = 'z.ai';
|
|
16
|
-
|
|
16
|
+
const aliases = ['zai-coding-plan', 'zai', 'z.ai'];
|
|
17
17
|
|
|
18
18
|
export const isConfigured = () => {
|
|
19
19
|
const auth = readAuthFile();
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
|
|
39
39
|
export const providerId = 'zhipuai-coding-plan';
|
|
40
40
|
export const providerName = 'Zhipu AI Coding Plan';
|
|
41
|
-
|
|
41
|
+
const aliases = ['zhipuai-coding-plan', 'zhipuai', 'zhipu'];
|
|
42
42
|
|
|
43
43
|
function getApiKey() {
|
|
44
44
|
const auth = readAuthFile();
|
|
@@ -82,38 +82,6 @@ export async function fetchClawdHubSkills({ cursor } = {}) {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* Fetch details for a specific skill version
|
|
87
|
-
* @param {string} slug - Skill slug/identifier
|
|
88
|
-
* @param {string} [version='latest'] - Version string or 'latest'
|
|
89
|
-
* @returns {Promise<{ skill: Object, version: Object }>}
|
|
90
|
-
*/
|
|
91
|
-
export async function fetchClawdHubSkillVersion(slug, version = 'latest') {
|
|
92
|
-
// For 'latest', we need to first get the skill metadata to find the latest version
|
|
93
|
-
if (version === 'latest') {
|
|
94
|
-
const skillResponse = await rateLimitedFetch(`${CLAWDHUB_API_BASE}/skills/${encodeURIComponent(slug)}`);
|
|
95
|
-
if (!skillResponse.ok) {
|
|
96
|
-
throw new Error(`ClawdHub skill not found: ${slug}`);
|
|
97
|
-
}
|
|
98
|
-
const skillData = await skillResponse.json();
|
|
99
|
-
const latestVersion = skillData.skill?.tags?.latest || skillData.latestVersion?.version;
|
|
100
|
-
if (!latestVersion) {
|
|
101
|
-
throw new Error(`No latest version found for skill: ${slug}`);
|
|
102
|
-
}
|
|
103
|
-
version = latestVersion;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const url = `${CLAWDHUB_API_BASE}/skills/${encodeURIComponent(slug)}/versions/${encodeURIComponent(version)}`;
|
|
107
|
-
const response = await rateLimitedFetch(url);
|
|
108
|
-
|
|
109
|
-
if (!response.ok) {
|
|
110
|
-
const text = await response.text().catch(() => '');
|
|
111
|
-
throw new Error(`ClawdHub version error (${response.status}): ${text || response.statusText}`);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return response.json();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
85
|
/**
|
|
118
86
|
* Download a skill package as a ZIP buffer
|
|
119
87
|
* @param {string} slug - Skill slug/identifier
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import { fetchClawdHubSkills } from './api.js';
|
|
9
9
|
|
|
10
|
-
const MAX_PAGES = 20; // Safety limit to prevent infinite loops
|
|
11
10
|
const CLAWDHUB_PAGE_LIMIT = 25;
|
|
12
11
|
|
|
13
12
|
const mapClawdHubItem = (item) => {
|
|
@@ -39,57 +38,6 @@ const mapClawdHubItem = (item) => {
|
|
|
39
38
|
};
|
|
40
39
|
};
|
|
41
40
|
|
|
42
|
-
/**
|
|
43
|
-
* Scan ClawdHub registry for all available skills
|
|
44
|
-
* @returns {Promise<{ ok: boolean, items?: Array, error?: Object }>}
|
|
45
|
-
*/
|
|
46
|
-
export async function scanClawdHub() {
|
|
47
|
-
try {
|
|
48
|
-
const allItems = [];
|
|
49
|
-
let cursor = null;
|
|
50
|
-
|
|
51
|
-
for (let page = 0; page < MAX_PAGES; page++) {
|
|
52
|
-
let items = [];
|
|
53
|
-
let nextCursor = null;
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
const pageResult = await fetchClawdHubSkills({ cursor });
|
|
57
|
-
items = pageResult.items || [];
|
|
58
|
-
nextCursor = pageResult.nextCursor || null;
|
|
59
|
-
} catch (error) {
|
|
60
|
-
if (page > 0 && allItems.length > 0) {
|
|
61
|
-
console.warn('ClawdHub pagination failed; returning partial results.');
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
throw error;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
for (const item of items) {
|
|
68
|
-
allItems.push(mapClawdHubItem(item));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (!nextCursor) {
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
cursor = nextCursor;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Sort by downloads (most popular first)
|
|
78
|
-
allItems.sort((a, b) => (b.clawdhub?.downloads || 0) - (a.clawdhub?.downloads || 0));
|
|
79
|
-
|
|
80
|
-
return { ok: true, items: allItems };
|
|
81
|
-
} catch (error) {
|
|
82
|
-
console.error('ClawdHub scan error:', error);
|
|
83
|
-
return {
|
|
84
|
-
ok: false,
|
|
85
|
-
error: {
|
|
86
|
-
kind: 'networkError',
|
|
87
|
-
message: error instanceof Error ? error.message : 'Failed to fetch skills from ClawdHub',
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
41
|
/**
|
|
94
42
|
* Scan a single ClawdHub page (cursor-based)
|
|
95
43
|
* @returns {Promise<{ ok: boolean, items?: Array, nextCursor?: string | null, error?: Object }>}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const GITHUB_HOST = 'github.com';
|
|
2
|
+
const CLAWDHUB_SOURCE_PREFIX = 'clawdhub:';
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
function normalizeGitOwnerRepo(owner, repo) {
|
|
@@ -85,3 +86,7 @@ export function parseSkillRepoSource(input, options = {}) {
|
|
|
85
86
|
|
|
86
87
|
return { ok: false, error: { kind: 'invalidSource', message: 'Unsupported repository source format' } };
|
|
87
88
|
}
|
|
89
|
+
|
|
90
|
+
export function isClawdHubSource(input) {
|
|
91
|
+
return typeof input === 'string' && input.trim().toLowerCase().startsWith(CLAWDHUB_SOURCE_PREFIX);
|
|
92
|
+
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { WebSocketServer } from 'ws';
|
|
2
2
|
import {
|
|
3
|
-
TERMINAL_INPUT_WS_MAX_PAYLOAD_BYTES,
|
|
4
|
-
TERMINAL_INPUT_WS_PATH,
|
|
3
|
+
TERMINAL_WS_MAX_PAYLOAD_BYTES as TERMINAL_INPUT_WS_MAX_PAYLOAD_BYTES,
|
|
4
|
+
TERMINAL_WS_PATH as TERMINAL_INPUT_WS_PATH,
|
|
5
|
+
createTerminalWsControlFrame as createTerminalInputWsControlFrame,
|
|
6
|
+
isRebindRateLimited,
|
|
7
|
+
normalizeTerminalWsMessageToText as normalizeTerminalInputWsMessageToText,
|
|
8
|
+
parseRequestPathname,
|
|
9
|
+
pruneRebindTimestamps,
|
|
10
|
+
readTerminalWsControlFrame as readTerminalInputWsControlFrame,
|
|
11
|
+
} from './terminal-ws-protocol.js';
|
|
12
|
+
import {
|
|
5
13
|
TERMINAL_OUTPUT_REPLAY_MAX_BYTES,
|
|
6
14
|
appendTerminalOutputReplayChunk,
|
|
7
15
|
createTerminalOutputReplayBuffer,
|
|
8
|
-
createTerminalInputWsControlFrame,
|
|
9
|
-
isRebindRateLimited,
|
|
10
16
|
listTerminalOutputReplayChunksSince,
|
|
11
|
-
|
|
12
|
-
parseRequestPathname,
|
|
13
|
-
pruneRebindTimestamps,
|
|
14
|
-
readTerminalInputWsControlFrame,
|
|
15
|
-
} from './index.js';
|
|
17
|
+
} from './output-replay-buffer.js';
|
|
16
18
|
|
|
17
19
|
export function createTerminalRuntime({
|
|
18
20
|
app,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from '../types.js';
|
|
14
14
|
import { getTunnelDependencyInstallInfo } from '../install-help.js';
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const ngrokTunnelProviderCapabilities = {
|
|
17
17
|
provider: TUNNEL_PROVIDER_NGROK,
|
|
18
18
|
defaults: {
|
|
19
19
|
mode: TUNNEL_MODE_QUICK,
|
|
@@ -10,7 +10,7 @@ export const TUNNEL_MODE_MANAGED_LOCAL = 'managed-local';
|
|
|
10
10
|
|
|
11
11
|
export const TUNNEL_INTENT_EPHEMERAL_PUBLIC = 'ephemeral-public';
|
|
12
12
|
export const TUNNEL_INTENT_PERSISTENT_PUBLIC = 'persistent-public';
|
|
13
|
-
|
|
13
|
+
const TUNNEL_INTENT_PRIVATE_NETWORK = 'private-network';
|
|
14
14
|
|
|
15
15
|
const SUPPORTED_TUNNEL_INTENTS = new Set([
|
|
16
16
|
TUNNEL_INTENT_EPHEMERAL_PUBLIC,
|
|
@@ -108,7 +108,7 @@ export function normalizeTunnelMode(value) {
|
|
|
108
108
|
return TUNNEL_MODE_QUICK;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
function normalizeTunnelIntent(value) {
|
|
112
112
|
if (typeof value !== 'string') {
|
|
113
113
|
return undefined;
|
|
114
114
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as _,R as k,j as n,bj as D,bi as C,bh as I,bf as M,bd as S}from"./vendor-.bun-CC_Xso_s.js";import{u as z,m as w,I as O}from"./useAppFontEffects-CV5C5O0r.js";import{M as P}from"./main-eAd3a6tx.js";import"./index-D9uMvTQF.js";import"./NewWorktreeDialog-CTMiE7Xd.js";import"./mobileLayoutPreference-Dio-WWkI.js";import"./SessionSwitcherDropdown-1xaHUxPK.js";const G=R=>{const e=_.c(33),{open:y,onOpenChange:t,initialPrompt:j}=R,i=k.useId(),{t:o}=z(),N=B;let s;e[0]!==t?(s=v=>{!v&&N()||t(v)},e[0]=t,e[1]=s):s=e[1];let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(D,{className:w("fixed inset-0 z-50 bg-black/50 dark:bg-black/75","transition-opacity duration-150 ease-out","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0")}),e[2]=h):h=e[2];let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=w("relative pointer-events-auto","w-[90vw] max-w-[720px] h-[680px] max-h-[85vh]","flex flex-col rounded-xl border shadow-none overflow-hidden origin-center","bg-background","transition-all duration-150 ease-out","data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98]","data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]"),e[3]=x):x=e[3];let a;e[4]!==t?(a=()=>t(!1),e[4]=t,e[5]=a):a=e[5];let l;e[6]!==o?(l=o("multiRun.window.actions.closeAria"),e[6]=o,e[7]=l):l=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(O,{name:"close",className:"h-5 w-5"}),e[8]=b):b=e[8];let r;e[9]!==a||e[10]!==l?(r=n.jsx("div",{className:"absolute right-0.5 top-0.5 z-50",children:n.jsx("button",{type:"button",onClick:a,"aria-label":l,className:"inline-flex h-7 w-7 items-center justify-center rounded-md p-0.5 text-muted-foreground hover:text-foreground hover:bg-interactive-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:b})}),e[9]=a,e[10]=l,e[11]=r):r=e[11];let c;e[12]!==o?(c=o("multiRun.window.description"),e[12]=o,e[13]=c):c=e[13];let d;e[14]!==i||e[15]!==c?(d=n.jsx(C,{id:i,className:"sr-only",children:c}),e[14]=i,e[15]=c,e[16]=d):d=e[16];let u,m;e[17]!==t?(u=()=>t(!1),m=()=>t(!1),e[17]=t,e[18]=u,e[19]=m):(u=e[18],m=e[19]);let f;e[20]!==j||e[21]!==u||e[22]!==m?(f=n.jsx(P,{initialPrompt:j,onCreated:u,onCancel:m,isWindowed:!0}),e[20]=j,e[21]=u,e[22]=m,e[23]=f):f=e[23];let p;e[24]!==i||e[25]!==f||e[26]!==r||e[27]!==d?(p=n.jsxs(I,{children:[h,n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center pointer-events-none",children:n.jsxs(M,{"aria-describedby":i,className:x,children:[r,d,f]})})]}),e[24]=i,e[25]=f,e[26]=r,e[27]=d,e[28]=p):p=e[28];let g;return e[29]!==y||e[30]!==s||e[31]!==p?(g=n.jsx(S,{open:y,onOpenChange:s,children:p}),e[29]=y,e[30]=s,e[31]=p,e[32]=g):g=e[32],g};function B(){return typeof document>"u"?!1:!!document.querySelector('[data-slot="dropdown-menu-content"][data-open], [data-slot="select-content"][data-open]')}export{G as MultiRunWindow};
|