@axhub/genie 0.2.7 → 0.2.8
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/dist/api-docs.html +2 -2
- package/dist/assets/App-CTKZtqB1.js +460 -0
- package/dist/assets/App-qxJ8_QYu.css +32 -0
- package/dist/assets/ReviewApp-DM6BNAzR.js +1 -0
- package/dist/assets/{_basePickBy-C19AekOu.js → _basePickBy-CqJbRZ9y.js} +1 -1
- package/dist/assets/{_baseUniq-JsnevLw_.js → _baseUniq-BS8YH8jO.js} +1 -1
- package/dist/assets/{arc-BLpcuBlf.js → arc-BBmKEN-S.js} +1 -1
- package/dist/assets/architectureDiagram-2XIMDMQ5-N5lcb82R.js +36 -0
- package/dist/assets/{blockDiagram-WCTKOSBZ-DQBLwsUS.js → blockDiagram-WCTKOSBZ-DTMwHuLn.js} +3 -3
- package/dist/assets/c4Diagram-IC4MRINW-BTKlkXI9.js +10 -0
- package/dist/assets/channel-1oJBvF-0.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-De63kbgc.js → chunk-4BX2VUAB-DUdoTxAc.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DtTDDdM9.js → chunk-55IACEB6-Bm_92xe4.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DHuwd8tw.js → chunk-FMBD7UC4-CGW0g62g.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-BgytFtmO.js → chunk-JSJVCQXG-DYkTH3w1.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-nZdp86aN.js → chunk-KX2RTZJC-C9oTlISU.js} +1 -1
- package/dist/assets/chunk-NQ4KR5QH-CM50ygWP.js +220 -0
- package/dist/assets/{chunk-QZHKN3VN-DvUQ3mnO.js → chunk-QZHKN3VN-7dzpYeNJ.js} +1 -1
- package/dist/assets/chunk-WL4C6EOR-Cm9nQrsr.js +189 -0
- package/dist/assets/classDiagram-VBA2DB6C-d5TeKFM4.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-d5TeKFM4.js +1 -0
- package/dist/assets/clone-CinxIlEu.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-Ccp_p0JZ.js +1 -0
- package/dist/assets/cytoscape.esm-2ZfV8NB5.js +331 -0
- package/dist/assets/{dagre-KLK3FWXG-CHYIvW47.js → dagre-KLK3FWXG-fBwTLUp9.js} +1 -1
- package/dist/assets/diagram-E7M64L7V-CeNVmFUp.js +24 -0
- package/dist/assets/{diagram-IFDJBPK2-Dzsiln_C.js → diagram-IFDJBPK2-CtavyLGa.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-DKnGbUpE.js → diagram-P4PSJMXO-CpQTjQwc.js} +1 -1
- package/dist/assets/erDiagram-INFDFZHY-B8R5vwhd.js +70 -0
- package/dist/assets/{flowDiagram-PKNHOUZH-BAZ2-jKp.js → flowDiagram-PKNHOUZH-BvkVVwIQ.js} +4 -4
- package/dist/assets/ganttDiagram-A5KZAMGK-DOu3hSNa.js +292 -0
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-BflpyjGy.js → gitGraphDiagram-K3NZZRJ6-C7zT67YE.js} +1 -1
- package/dist/assets/{graph-suelaXFh.js → graph-D11wiwHo.js} +1 -1
- package/dist/assets/highlighted-body-TPN3WLV5-Babpthg-.js +1 -0
- package/dist/assets/index-DFxzgWoO.js +2 -0
- package/dist/assets/index-YCFGDVKw.css +1 -0
- package/dist/assets/{infoDiagram-LFFYTUFH-pfD1FA3p.js → infoDiagram-LFFYTUFH-BmA7IpQG.js} +1 -1
- package/dist/assets/ishikawaDiagram-PHBUUO56-BEquZd3E.js +70 -0
- package/dist/assets/journeyDiagram-4ABVD52K-BfemGz7f.js +139 -0
- package/dist/assets/{kanban-definition-K7BYSVSG-FWinmur1.js → kanban-definition-K7BYSVSG-CWja3mln.js} +5 -5
- package/dist/assets/{layout-vcz43XvZ.js → layout-BLUNf-PJ.js} +1 -1
- package/dist/assets/{linear-le4gc0vx.js → linear-DukIV_Xv.js} +1 -1
- package/dist/assets/mermaid-O7DHMXV3-SgtM28qI.js +1038 -0
- package/dist/assets/mindmap-definition-YRQLILUH-4UjqXITU.js +68 -0
- package/dist/assets/{pieDiagram-SKSYHLDU-C7PKDh3b.js → pieDiagram-SKSYHLDU-8AxqJd0M.js} +2 -2
- package/dist/assets/quadrantDiagram-337W2JSQ-D60m8V8r.js +7 -0
- package/dist/assets/requirementDiagram-Z7DCOOCP-zqh9jBVf.js +73 -0
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-4gulcOP4.js → sankeyDiagram-WA2Y5GQK-CDZILTLI.js} +3 -3
- package/dist/assets/sequenceDiagram-2WXFIKYE-7BReFd0L.js +145 -0
- package/dist/assets/{stateDiagram-RAJIS63D-CB4Vl7qM.js → stateDiagram-RAJIS63D-HPTVdIG4.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-DTUf5_gC.js +1 -0
- package/dist/assets/timeline-definition-YZTLITO2-CTVllFgr.js +61 -0
- package/dist/assets/{treemap-KZPCXAKY-DZSEE6Hz.js → treemap-KZPCXAKY-BtyxboJZ.js} +58 -58
- package/dist/assets/vendor-codemirror-Dz7_EqNA.js +39 -0
- package/dist/assets/vendor-react-Cpt6D04s.js +59 -0
- package/dist/assets/vendor-xterm-DfaPXD3y.js +66 -0
- package/dist/assets/{vennDiagram-LZ73GAT5-8E_G06fI.js → vennDiagram-LZ73GAT5-D96ZI6Mg.js} +4 -4
- package/dist/assets/xychartDiagram-JWTSCODW-eRk-39YO.js +7 -0
- package/dist/index.html +4 -4
- package/package.json +34 -33
- package/server/acp-runtime/client.js +82 -15
- package/server/acp-runtime/index.js +5 -16
- package/server/channels/runtime/AgentRuntimeAdapter.js +1 -10
- package/server/claude-sdk.js +1 -3
- package/server/cli.js +136 -0
- package/server/gemini-cli.js +1 -3
- package/server/index.js +86 -14
- package/server/openai-codex.js +1 -3
- package/server/opencode-cli.js +1 -3
- package/server/projects.js +128 -85
- package/server/routes/cc-connect.js +1131 -0
- package/server/routes/cli-auth.js +1 -73
- package/server/routes/commands.js +4 -9
- package/server/routes/projects.js +45 -24
- package/server/session-core/providerDiscovery.js +8 -3
- package/server/utils/ccConnectManager.js +390 -0
- package/server/utils/ccConnectState.js +575 -0
- package/server/utils/resolveCommandPath.js +71 -0
- package/server/utils/workspaceRoots.js +154 -0
- package/dist/assets/App-BWSqiXAT.js +0 -220
- package/dist/assets/App-DrlLKa8f.css +0 -1
- package/dist/assets/ReviewApp-nz3mbArg.js +0 -1
- package/dist/assets/architectureDiagram-2XIMDMQ5-CarjBOOv.js +0 -36
- package/dist/assets/c4Diagram-IC4MRINW-CGobwBIj.js +0 -10
- package/dist/assets/channel-DkFNxV_H.js +0 -1
- package/dist/assets/chunk-NQ4KR5QH-CMH6EDP2.js +0 -220
- package/dist/assets/chunk-WL4C6EOR-Dn7db_6t.js +0 -189
- package/dist/assets/classDiagram-VBA2DB6C-DtwCEe8S.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-DtwCEe8S.js +0 -1
- package/dist/assets/clone-C0lCEIEO.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-DD_nzqsz.js +0 -1
- package/dist/assets/cytoscape.esm-5J0xJHOV.js +0 -321
- package/dist/assets/diagram-E7M64L7V-TVdvHtGc.js +0 -24
- package/dist/assets/erDiagram-INFDFZHY-5Kw0bByo.js +0 -70
- package/dist/assets/ganttDiagram-A5KZAMGK-CsADFkcq.js +0 -292
- package/dist/assets/highlighted-body-OFNGDK62-CZrBMazC.js +0 -1
- package/dist/assets/index-B01NxbUv.css +0 -1
- package/dist/assets/index-DW5pGgQ_.js +0 -2
- package/dist/assets/ishikawaDiagram-PHBUUO56-ndm9snwO.js +0 -70
- package/dist/assets/journeyDiagram-4ABVD52K-HgF2t7z5.js +0 -139
- package/dist/assets/mermaid-GHXKKRXX-CK8m3lad.js +0 -870
- package/dist/assets/mindmap-definition-YRQLILUH-CNq9SKj4.js +0 -68
- package/dist/assets/quadrantDiagram-337W2JSQ-B7FnztNO.js +0 -7
- package/dist/assets/requirementDiagram-Z7DCOOCP-Bl_BM2Th.js +0 -73
- package/dist/assets/sequenceDiagram-2WXFIKYE-VEuJDwyJ.js +0 -145
- package/dist/assets/stateDiagram-v2-FVOUBMTO-C85ucl39.js +0 -1
- package/dist/assets/timeline-definition-YZTLITO2-BPGKhi7f.js +0 -61
- package/dist/assets/vendor-codemirror-CyOKkaQZ.js +0 -31
- package/dist/assets/vendor-react-CP4yFTs7.js +0 -8
- package/dist/assets/vendor-xterm-DfcmCpbH.js +0 -66
- package/dist/assets/xychartDiagram-JWTSCODW-CbBk50-O.js +0 -7
- package/server/acp-runtime/client.test.js +0 -688
- package/server/acp-runtime/session-store.test.js +0 -89
- package/server/cli.test.js +0 -76
- package/server/external-agent/service.test.js +0 -53
- package/server/external-agent/ws.test.js +0 -289
- package/shared/conversationEvents.test.js +0 -403
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import os from 'os';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
export const UNIX_WORKSPACE_ROOTS = '__workspace_roots__';
|
|
5
|
+
|
|
6
|
+
export function parseWorkspaceRoots(value) {
|
|
7
|
+
if (!value || typeof value !== 'string') {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const seen = new Set();
|
|
12
|
+
const roots = [];
|
|
13
|
+
|
|
14
|
+
for (const entry of value.split(',')) {
|
|
15
|
+
const trimmed = entry.trim();
|
|
16
|
+
if (!trimmed) continue;
|
|
17
|
+
|
|
18
|
+
const resolved = path.resolve(trimmed);
|
|
19
|
+
if (seen.has(resolved)) continue;
|
|
20
|
+
|
|
21
|
+
seen.add(resolved);
|
|
22
|
+
roots.push(resolved);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return roots;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function getDefaultWorkspaceRoots({
|
|
29
|
+
platform = process.platform,
|
|
30
|
+
homeDir = os.homedir()
|
|
31
|
+
} = {}) {
|
|
32
|
+
if (platform === 'win32') {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const roots = [path.resolve(homeDir)];
|
|
37
|
+
|
|
38
|
+
if (platform === 'darwin') {
|
|
39
|
+
roots.push('/Volumes');
|
|
40
|
+
} else if (platform === 'linux') {
|
|
41
|
+
roots.push('/mnt', '/media');
|
|
42
|
+
const userName = path.basename(homeDir);
|
|
43
|
+
if (userName) {
|
|
44
|
+
roots.push(path.join('/run/media', userName));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return [...new Set(roots.map((root) => path.resolve(root)))];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function resolveWorkspaceRootSettings({
|
|
52
|
+
env = process.env,
|
|
53
|
+
platform = process.platform,
|
|
54
|
+
homeDir = os.homedir()
|
|
55
|
+
} = {}) {
|
|
56
|
+
const configuredRoots = parseWorkspaceRoots(env.WORKSPACES_ROOTS);
|
|
57
|
+
const hasWorkspaceRootRestriction = configuredRoots.length > 0 || platform !== 'win32';
|
|
58
|
+
const allowedWorkspaceRoots = configuredRoots.length > 0
|
|
59
|
+
? configuredRoots
|
|
60
|
+
: (hasWorkspaceRootRestriction ? getDefaultWorkspaceRoots({ platform, homeDir }) : []);
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
defaultWorkspaceRoot: path.resolve(homeDir),
|
|
64
|
+
hasWorkspaceRootRestriction,
|
|
65
|
+
allowedWorkspaceRoots,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const workspaceRootSettings = resolveWorkspaceRootSettings();
|
|
70
|
+
|
|
71
|
+
export const DEFAULT_WORKSPACES_ROOT = workspaceRootSettings.defaultWorkspaceRoot;
|
|
72
|
+
export const HAS_WORKSPACES_ROOT_RESTRICTION = workspaceRootSettings.hasWorkspaceRootRestriction;
|
|
73
|
+
export const WORKSPACES_ROOTS = workspaceRootSettings.allowedWorkspaceRoots;
|
|
74
|
+
|
|
75
|
+
export function expandWorkspacePath(inputPath, homeDir = DEFAULT_WORKSPACES_ROOT) {
|
|
76
|
+
if (!inputPath) return inputPath;
|
|
77
|
+
if (inputPath === '~') {
|
|
78
|
+
return homeDir;
|
|
79
|
+
}
|
|
80
|
+
if (inputPath.startsWith('~/') || inputPath.startsWith('~\\')) {
|
|
81
|
+
return path.join(homeDir, inputPath.slice(2));
|
|
82
|
+
}
|
|
83
|
+
return inputPath;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function isPathWithinAllowedRoots(candidatePath, allowedRoots) {
|
|
87
|
+
const normalizedCandidate = path.resolve(candidatePath);
|
|
88
|
+
|
|
89
|
+
return allowedRoots.some((allowedRoot) => {
|
|
90
|
+
const normalizedRoot = path.resolve(allowedRoot);
|
|
91
|
+
return normalizedCandidate === normalizedRoot
|
|
92
|
+
|| normalizedCandidate.startsWith(normalizedRoot + path.sep);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export async function resolveAllowedWorkspaceRoots({
|
|
97
|
+
fsImpl,
|
|
98
|
+
allowedWorkspaceRoots = WORKSPACES_ROOTS
|
|
99
|
+
} = {}) {
|
|
100
|
+
const resolvedRoots = [];
|
|
101
|
+
const seen = new Set();
|
|
102
|
+
|
|
103
|
+
for (const root of allowedWorkspaceRoots) {
|
|
104
|
+
let resolvedRoot;
|
|
105
|
+
|
|
106
|
+
try {
|
|
107
|
+
resolvedRoot = await fsImpl.realpath(root);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
resolvedRoot = path.resolve(root);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (seen.has(resolvedRoot)) continue;
|
|
113
|
+
seen.add(resolvedRoot);
|
|
114
|
+
resolvedRoots.push(resolvedRoot);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return resolvedRoots;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function formatAllowedWorkspaceRoots(allowedRoots) {
|
|
121
|
+
return allowedRoots.join(', ');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function shouldUseVirtualWorkspaceRoots({
|
|
125
|
+
dirPath,
|
|
126
|
+
hasWorkspaceRootRestriction = HAS_WORKSPACES_ROOT_RESTRICTION
|
|
127
|
+
} = {}) {
|
|
128
|
+
return hasWorkspaceRootRestriction
|
|
129
|
+
&& (!dirPath || dirPath === UNIX_WORKSPACE_ROOTS);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function buildWorkspaceRootSuggestions({
|
|
133
|
+
allowedWorkspaceRoots = WORKSPACES_ROOTS,
|
|
134
|
+
homeDir = DEFAULT_WORKSPACES_ROOT
|
|
135
|
+
} = {}) {
|
|
136
|
+
const resolvedHomeDir = path.resolve(homeDir);
|
|
137
|
+
const seen = new Set();
|
|
138
|
+
const suggestions = [];
|
|
139
|
+
|
|
140
|
+
for (const root of allowedWorkspaceRoots) {
|
|
141
|
+
const resolvedRoot = path.resolve(root);
|
|
142
|
+
if (seen.has(resolvedRoot)) continue;
|
|
143
|
+
|
|
144
|
+
seen.add(resolvedRoot);
|
|
145
|
+
suggestions.push({
|
|
146
|
+
path: resolvedRoot,
|
|
147
|
+
name: resolvedRoot === resolvedHomeDir ? 'Home' : (path.basename(resolvedRoot) || resolvedRoot),
|
|
148
|
+
type: 'directory',
|
|
149
|
+
isWorkspaceRoot: true
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return suggestions;
|
|
154
|
+
}
|