unagent 0.0.1

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.
@@ -0,0 +1,2 @@
1
+ import { _ as getAgentConfig, a as getAgentSkillsDir, c as isCI, d as detectAgentByEnv, f as detectCurrentAgent, g as agents, h as AgentConfig, i as getAgentRulesPath, l as isTTY, m as isRunningInAgent, n as agentConfigExists, o as getXDGPaths, p as detectInstalledAgents, r as getAgentConfigDir, s as hasTTY, t as XDGPaths, u as DetectedAgent, v as getAgentIds, y as getAllAgents } from "../index-BW91Ai1Y.js";
2
+ export { AgentConfig, DetectedAgent, XDGPaths, agentConfigExists, agents, detectAgentByEnv, detectCurrentAgent, detectInstalledAgents, getAgentConfig, getAgentConfigDir, getAgentIds, getAgentRulesPath, getAgentSkillsDir, getAllAgents, getXDGPaths, hasTTY, isCI, isRunningInAgent, isTTY };
@@ -0,0 +1,4 @@
1
+ import { a as agentConfigExists, c as getAgentSkillsDir, d as isCI, f as isTTY, g as getAllAgents, h as getAgentIds, i as isRunningInAgent, l as getXDGPaths, m as getAgentConfig, n as detectCurrentAgent, o as getAgentConfigDir, p as agents, r as detectInstalledAgents, s as getAgentRulesPath, t as detectAgentByEnv, u as hasTTY } from "../env-BUegcU7a.js";
2
+ import "../path-nPuHl-f5.js";
3
+
4
+ export { agentConfigExists, agents, detectAgentByEnv, detectCurrentAgent, detectInstalledAgents, getAgentConfig, getAgentConfigDir, getAgentIds, getAgentRulesPath, getAgentSkillsDir, getAllAgents, getXDGPaths, hasTTY, isCI, isRunningInAgent, isTTY };
@@ -0,0 +1,392 @@
1
+ import { t as expandPath } from "./path-nPuHl-f5.js";
2
+ import { existsSync } from "node:fs";
3
+ import { homedir } from "node:os";
4
+ import { join } from "pathe";
5
+ import { hasTTY, isCI } from "std-env";
6
+
7
+ //#region src/env/agents.ts
8
+ const agents = {
9
+ "claude-code": {
10
+ name: "Claude Code",
11
+ configDir: "~/.claude",
12
+ rulesFile: "CLAUDE.md",
13
+ skillsDir: "skills",
14
+ envDetect: ["CLAUDE_CODE", "CLAUDE_CODE_ENTRY"],
15
+ description: "Anthropic's official CLI for Claude"
16
+ },
17
+ "cursor": {
18
+ name: "Cursor",
19
+ configDir: "~/.cursor",
20
+ rulesFile: ".cursorrules",
21
+ skillsDir: "rules",
22
+ envDetect: ["CURSOR_SESSION_ID"],
23
+ description: "AI-powered code editor"
24
+ },
25
+ "windsurf": {
26
+ name: "Windsurf",
27
+ configDir: "~/.codeium/windsurf",
28
+ rulesFile: ".windsurfrules",
29
+ skillsDir: "rules",
30
+ envDetect: ["WINDSURF_SESSION_ID"],
31
+ description: "Codeium's AI code editor"
32
+ },
33
+ "cline": {
34
+ name: "Cline",
35
+ configDir: "~/.cline",
36
+ rulesFile: ".clinerules",
37
+ skillsDir: "rules",
38
+ envDetect: ["CLINE_TASK"],
39
+ description: "VS Code extension for Claude"
40
+ },
41
+ "aider": {
42
+ name: "Aider",
43
+ configDir: "~/.aider",
44
+ rulesFile: ".aider.conf.yml",
45
+ envDetect: ["AIDER_MODEL"],
46
+ description: "AI pair programming in terminal"
47
+ },
48
+ "continue": {
49
+ name: "Continue",
50
+ configDir: "~/.continue",
51
+ rulesFile: "config.json",
52
+ skillsDir: "rules",
53
+ envDetect: ["CONTINUE_GLOBAL_DIR"],
54
+ description: "Open-source AI code assistant"
55
+ },
56
+ "copilot": {
57
+ name: "GitHub Copilot",
58
+ configDir: "~/.config/github-copilot",
59
+ envDetect: ["GITHUB_COPILOT_TOKEN"],
60
+ description: "GitHub's AI pair programmer"
61
+ },
62
+ "codex": {
63
+ name: "OpenAI Codex CLI",
64
+ configDir: "~/.codex",
65
+ rulesFile: "instructions.md",
66
+ envDetect: ["CODEX_HOME"],
67
+ description: "OpenAI's Codex CLI"
68
+ },
69
+ "zed": {
70
+ name: "Zed",
71
+ configDir: "~/.config/zed",
72
+ rulesFile: "settings.json",
73
+ envDetect: ["ZED_IMPERSONATE"],
74
+ description: "High-performance code editor with AI"
75
+ },
76
+ "void": {
77
+ name: "Void",
78
+ configDir: "~/.void",
79
+ rulesFile: ".voidrules",
80
+ envDetect: ["VOID_EDITOR"],
81
+ description: "Open-source Cursor alternative"
82
+ },
83
+ "amp": {
84
+ name: "Amp",
85
+ configDir: "~/.amp",
86
+ rulesFile: "amp.md",
87
+ skillsDir: "skills",
88
+ envDetect: ["AMP_SESSION"],
89
+ description: "Sourcegraph's AI coding agent"
90
+ },
91
+ "roo": {
92
+ name: "Roo Code",
93
+ configDir: "~/.roo",
94
+ rulesFile: ".roorules",
95
+ skillsDir: "rules",
96
+ envDetect: ["ROO_CODE"],
97
+ description: "AI coding assistant"
98
+ },
99
+ "avante": {
100
+ name: "Avante",
101
+ configDir: "~/.config/nvim",
102
+ rulesFile: "avante.lua",
103
+ envDetect: ["AVANTE_PROVIDER"],
104
+ description: "Neovim AI plugin"
105
+ },
106
+ "codestory": {
107
+ name: "CodeStory",
108
+ configDir: "~/.codestory",
109
+ rulesFile: ".codestoryrules",
110
+ envDetect: ["CODESTORY_SESSION"],
111
+ description: "AI-powered code editor"
112
+ },
113
+ "gpt-engineer": {
114
+ name: "GPT Engineer",
115
+ configDir: "~/.gpt-engineer",
116
+ rulesFile: "prompt",
117
+ envDetect: ["GPTE_API_KEY"],
118
+ description: "AI code generation"
119
+ },
120
+ "sweep": {
121
+ name: "Sweep",
122
+ configDir: "~/.sweep",
123
+ rulesFile: "sweep.yaml",
124
+ envDetect: ["SWEEP_API_KEY"],
125
+ description: "AI junior developer"
126
+ },
127
+ "mentat": {
128
+ name: "Mentat",
129
+ configDir: "~/.mentat",
130
+ rulesFile: ".mentat_config.json",
131
+ envDetect: ["MENTAT_API_KEY"],
132
+ description: "AI coding assistant"
133
+ },
134
+ "goose": {
135
+ name: "Goose",
136
+ configDir: "~/.config/goose",
137
+ rulesFile: "config.yaml",
138
+ envDetect: ["GOOSE_PROVIDER"],
139
+ description: "Block's AI agent"
140
+ },
141
+ "supermaven": {
142
+ name: "Supermaven",
143
+ configDir: "~/.supermaven",
144
+ envDetect: ["SUPERMAVEN_API_KEY"],
145
+ description: "Fast AI code completion"
146
+ },
147
+ "tabnine": {
148
+ name: "Tabnine",
149
+ configDir: "~/.tabnine",
150
+ envDetect: ["TABNINE_API_KEY"],
151
+ description: "AI code completion"
152
+ },
153
+ "codeium": {
154
+ name: "Codeium",
155
+ configDir: "~/.codeium",
156
+ envDetect: ["CODEIUM_API_KEY"],
157
+ description: "Free AI code completion"
158
+ },
159
+ "sourcegraph-cody": {
160
+ name: "Sourcegraph Cody",
161
+ configDir: "~/.sourcegraph",
162
+ rulesFile: "cody.json",
163
+ envDetect: ["SRC_ACCESS_TOKEN"],
164
+ description: "Sourcegraph's AI assistant"
165
+ },
166
+ "amazon-q": {
167
+ name: "Amazon Q",
168
+ configDir: "~/.aws/amazonq",
169
+ envDetect: ["AMAZON_Q_TOKEN"],
170
+ description: "AWS AI assistant"
171
+ },
172
+ "gemini-code-assist": {
173
+ name: "Gemini Code Assist",
174
+ configDir: "~/.config/google-cloud",
175
+ envDetect: ["GOOGLE_APPLICATION_CREDENTIALS"],
176
+ description: "Google's AI coding assistant"
177
+ },
178
+ "replit-agent": {
179
+ name: "Replit Agent",
180
+ configDir: "~/.replit",
181
+ rulesFile: ".replit",
182
+ envDetect: ["REPL_ID"],
183
+ description: "Replit's AI agent"
184
+ },
185
+ "devin": {
186
+ name: "Devin",
187
+ configDir: "~/.devin",
188
+ envDetect: ["DEVIN_API_KEY"],
189
+ description: "Cognition's AI software engineer"
190
+ },
191
+ "bolt": {
192
+ name: "Bolt",
193
+ configDir: "~/.bolt",
194
+ envDetect: ["BOLT_API_KEY"],
195
+ description: "StackBlitz AI"
196
+ },
197
+ "v0": {
198
+ name: "v0",
199
+ configDir: "~/.v0",
200
+ envDetect: ["V0_API_KEY"],
201
+ description: "Vercel's AI UI generator"
202
+ },
203
+ "lovable": {
204
+ name: "Lovable",
205
+ configDir: "~/.lovable",
206
+ envDetect: ["LOVABLE_API_KEY"],
207
+ description: "AI full-stack developer"
208
+ },
209
+ "pythagora": {
210
+ name: "Pythagora",
211
+ configDir: "~/.pythagora",
212
+ rulesFile: "prompts.json",
213
+ envDetect: ["PYTHAGORA_API_KEY"],
214
+ description: "AI developer"
215
+ },
216
+ "smol-developer": {
217
+ name: "Smol Developer",
218
+ configDir: "~/.smol",
219
+ rulesFile: "prompt.md",
220
+ envDetect: ["SMOL_AI_KEY"],
221
+ description: "AI junior developer"
222
+ },
223
+ "plandex": {
224
+ name: "Plandex",
225
+ configDir: "~/.plandex",
226
+ rulesFile: "plandex.yaml",
227
+ envDetect: ["PLANDEX_API_KEY"],
228
+ description: "AI coding agent for complex tasks"
229
+ },
230
+ "auto-gpt": {
231
+ name: "Auto-GPT",
232
+ configDir: "~/.auto-gpt",
233
+ rulesFile: "ai_settings.yaml",
234
+ envDetect: ["AUTO_GPT_KEY"],
235
+ description: "Autonomous GPT-4 agent"
236
+ },
237
+ "agent-gpt": {
238
+ name: "AgentGPT",
239
+ configDir: "~/.agent-gpt",
240
+ envDetect: ["AGENT_GPT_KEY"],
241
+ description: "Browser-based AI agent"
242
+ },
243
+ "babyagi": {
244
+ name: "BabyAGI",
245
+ configDir: "~/.babyagi",
246
+ envDetect: ["BABY_AGI_KEY"],
247
+ description: "Task-driven AI agent"
248
+ },
249
+ "langchain-agent": {
250
+ name: "LangChain Agent",
251
+ configDir: "~/.langchain",
252
+ envDetect: ["LANGCHAIN_API_KEY"],
253
+ description: "LangChain-based agents"
254
+ },
255
+ "crewai": {
256
+ name: "CrewAI",
257
+ configDir: "~/.crewai",
258
+ rulesFile: "agents.yaml",
259
+ envDetect: ["CREWAI_API_KEY"],
260
+ description: "Multi-agent orchestration"
261
+ },
262
+ "autogen": {
263
+ name: "AutoGen",
264
+ configDir: "~/.autogen",
265
+ rulesFile: "OAI_CONFIG_LIST",
266
+ envDetect: ["AUTOGEN_USE_DOCKER"],
267
+ description: "Microsoft's multi-agent framework"
268
+ },
269
+ "chatdev": {
270
+ name: "ChatDev",
271
+ configDir: "~/.chatdev",
272
+ rulesFile: "config.yaml",
273
+ envDetect: ["CHATDEV_KEY"],
274
+ description: "AI software company"
275
+ },
276
+ "metagpt": {
277
+ name: "MetaGPT",
278
+ configDir: "~/.metagpt",
279
+ rulesFile: "config2.yaml",
280
+ envDetect: ["METAGPT_KEY"],
281
+ description: "Multi-agent software company"
282
+ },
283
+ "superagi": {
284
+ name: "SuperAGI",
285
+ configDir: "~/.superagi",
286
+ envDetect: ["SUPERAGI_KEY"],
287
+ description: "Open-source AGI framework"
288
+ },
289
+ "jarvis": {
290
+ name: "Jarvis",
291
+ configDir: "~/.jarvis",
292
+ envDetect: ["JARVIS_API_KEY"],
293
+ description: "AI assistant"
294
+ },
295
+ "claude-engineer": {
296
+ name: "Claude Engineer",
297
+ configDir: "~/.claude-engineer",
298
+ rulesFile: "system_prompt.txt",
299
+ envDetect: ["CLAUDE_ENGINEER"],
300
+ description: "Claude-based coding assistant"
301
+ },
302
+ "codegeex": {
303
+ name: "CodeGeeX",
304
+ configDir: "~/.codegeex",
305
+ envDetect: ["CODEGEEX_API_KEY"],
306
+ description: "AI code assistant"
307
+ },
308
+ "safurai": {
309
+ name: "Safurai",
310
+ configDir: "~/.safurai",
311
+ envDetect: ["SAFURAI_API_KEY"],
312
+ description: "AI code assistant"
313
+ },
314
+ "codegpt": {
315
+ name: "CodeGPT",
316
+ configDir: "~/.codegpt",
317
+ envDetect: ["CODEGPT_API_KEY"],
318
+ description: "VS Code AI extension"
319
+ }
320
+ };
321
+ function getAgentConfig(agentId) {
322
+ return agents[agentId];
323
+ }
324
+ function getAgentIds() {
325
+ return Object.keys(agents);
326
+ }
327
+ function getAllAgents() {
328
+ return Object.values(agents);
329
+ }
330
+
331
+ //#endregion
332
+ //#region src/env/paths.ts
333
+ function getXDGPaths() {
334
+ const home = homedir();
335
+ return {
336
+ data: process.env.XDG_DATA_HOME || join(home, ".local", "share"),
337
+ config: process.env.XDG_CONFIG_HOME || join(home, ".config"),
338
+ cache: process.env.XDG_CACHE_HOME || join(home, ".cache"),
339
+ state: process.env.XDG_STATE_HOME || join(home, ".local", "state")
340
+ };
341
+ }
342
+ function getAgentConfigDir(agent) {
343
+ return expandPath(agent.configDir);
344
+ }
345
+ function getAgentRulesPath(agent) {
346
+ if (!agent.rulesFile) return void 0;
347
+ return join(getAgentConfigDir(agent), agent.rulesFile);
348
+ }
349
+ function getAgentSkillsDir(agent) {
350
+ if (!agent.skillsDir) return void 0;
351
+ return join(getAgentConfigDir(agent), agent.skillsDir);
352
+ }
353
+ function agentConfigExists(agent) {
354
+ return existsSync(getAgentConfigDir(agent));
355
+ }
356
+ /** @deprecated Use `hasTTY` from std-env instead */
357
+ const isTTY = hasTTY;
358
+
359
+ //#endregion
360
+ //#region src/env/detect.ts
361
+ function detectAgentByEnv(agent) {
362
+ if (!agent.envDetect) return false;
363
+ return agent.envDetect.some((envVar) => !!process.env[envVar]);
364
+ }
365
+ function detectCurrentAgent() {
366
+ for (const [id, config] of Object.entries(agents)) if (detectAgentByEnv(config)) return {
367
+ id,
368
+ config,
369
+ detected: agentConfigExists(config) ? "both" : "env"
370
+ };
371
+ }
372
+ function detectInstalledAgents() {
373
+ const detected = [];
374
+ for (const [id, config] of Object.entries(agents)) {
375
+ const envDetected = detectAgentByEnv(config);
376
+ const configExists = agentConfigExists(config);
377
+ if (envDetected || configExists) detected.push({
378
+ id,
379
+ config,
380
+ detected: envDetected && configExists ? "both" : envDetected ? "env" : "config"
381
+ });
382
+ }
383
+ return detected;
384
+ }
385
+ function isRunningInAgent(agentId) {
386
+ const config = getAgentConfig(agentId);
387
+ if (!config) return false;
388
+ return detectAgentByEnv(config);
389
+ }
390
+
391
+ //#endregion
392
+ export { agentConfigExists as a, getAgentSkillsDir as c, isCI as d, isTTY as f, getAllAgents as g, getAgentIds as h, isRunningInAgent as i, getXDGPaths as l, getAgentConfig as m, detectCurrentAgent as n, getAgentConfigDir as o, agents as p, detectInstalledAgents as r, getAgentRulesPath as s, detectAgentByEnv as t, hasTTY as u };
@@ -0,0 +1,2 @@
1
+ import { a as getGitStatus, c as hasUncommittedChanges, d as CloneResult, f as GitCloneError, g as isTempDir, h as cloneToTemp, i as getCurrentBranch, l as pull, m as cloneRepo, n as checkout, o as getLatestCommitHash, p as cleanupTempDir, r as fetch, s as getRemoteUrl, t as GitStatus, u as CloneOptions } from "../index-DwU61LUW.js";
2
+ export { CloneOptions, CloneResult, GitCloneError, GitStatus, checkout, cleanupTempDir, cloneRepo, cloneToTemp, fetch, getCurrentBranch, getGitStatus, getLatestCommitHash, getRemoteUrl, hasUncommittedChanges, isTempDir, pull };
@@ -0,0 +1,3 @@
1
+ import { a as getLatestCommitHash, c as pull, d as cloneRepo, f as cloneToTemp, i as getGitStatus, l as GitCloneError, n as fetch, o as getRemoteUrl, p as isTempDir, r as getCurrentBranch, s as hasUncommittedChanges, t as checkout, u as cleanupTempDir } from "../git-D4ZclaF6.js";
2
+
3
+ export { GitCloneError, checkout, cleanupTempDir, cloneRepo, cloneToTemp, fetch, getCurrentBranch, getGitStatus, getLatestCommitHash, getRemoteUrl, hasUncommittedChanges, isTempDir, pull };
@@ -0,0 +1,132 @@
1
+ import { existsSync, mkdirSync, rmSync } from "node:fs";
2
+ import { tmpdir } from "node:os";
3
+ import { join } from "pathe";
4
+ import { simpleGit } from "simple-git";
5
+
6
+ //#region src/git/clone.ts
7
+ var GitCloneError = class extends Error {
8
+ url;
9
+ cause;
10
+ constructor(message, url, cause) {
11
+ super(message);
12
+ this.name = "GitCloneError";
13
+ this.url = url;
14
+ this.cause = cause;
15
+ }
16
+ };
17
+ async function cloneRepo(url, dest, options = {}) {
18
+ const { depth = 1, branch, timeout = 6e4 } = options;
19
+ try {
20
+ const git = simpleGit({ timeout: { block: timeout } });
21
+ const cloneOptions = [];
22
+ if (depth > 0) cloneOptions.push("--depth", String(depth));
23
+ if (branch) cloneOptions.push("--branch", branch);
24
+ const destDir = join(dest, "..");
25
+ if (!existsSync(destDir)) mkdirSync(destDir, { recursive: true });
26
+ await git.clone(url, dest, cloneOptions);
27
+ return {
28
+ success: true,
29
+ path: dest
30
+ };
31
+ } catch (error) {
32
+ return {
33
+ success: false,
34
+ path: dest,
35
+ error: error instanceof Error ? error.message : "Unknown error"
36
+ };
37
+ }
38
+ }
39
+ async function cloneToTemp(url, options = {}) {
40
+ const { tempDir = tmpdir() } = options;
41
+ return cloneRepo(url, join(tempDir, `unagent-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`), options);
42
+ }
43
+ function cleanupTempDir(path) {
44
+ const temp = tmpdir();
45
+ if (!path.startsWith(temp)) return false;
46
+ try {
47
+ if (existsSync(path)) rmSync(path, {
48
+ recursive: true,
49
+ force: true
50
+ });
51
+ return true;
52
+ } catch {
53
+ return false;
54
+ }
55
+ }
56
+ function isTempDir(path) {
57
+ return path.startsWith(tmpdir());
58
+ }
59
+
60
+ //#endregion
61
+ //#region src/git/operations.ts
62
+ async function getGitStatus(dir) {
63
+ if (!existsSync(dir)) return void 0;
64
+ try {
65
+ const git = simpleGit(dir);
66
+ if (!await git.checkIsRepo()) return void 0;
67
+ const status = await git.status();
68
+ return {
69
+ isRepo: true,
70
+ branch: status.current || "HEAD",
71
+ ahead: status.ahead,
72
+ behind: status.behind,
73
+ staged: status.staged,
74
+ modified: status.modified,
75
+ untracked: status.not_added,
76
+ hasChanges: !status.isClean()
77
+ };
78
+ } catch {
79
+ return;
80
+ }
81
+ }
82
+ async function getCurrentBranch(dir) {
83
+ try {
84
+ return (await simpleGit(dir).revparse(["--abbrev-ref", "HEAD"])).trim();
85
+ } catch {
86
+ return;
87
+ }
88
+ }
89
+ async function checkout(dir, ref) {
90
+ try {
91
+ await simpleGit(dir).checkout(ref);
92
+ return true;
93
+ } catch {
94
+ return false;
95
+ }
96
+ }
97
+ async function pull(dir) {
98
+ try {
99
+ await simpleGit(dir).pull();
100
+ return true;
101
+ } catch {
102
+ return false;
103
+ }
104
+ }
105
+ async function fetch(dir, remote = "origin") {
106
+ try {
107
+ await simpleGit(dir).fetch(remote);
108
+ return true;
109
+ } catch {
110
+ return false;
111
+ }
112
+ }
113
+ async function getRemoteUrl(dir, remote = "origin") {
114
+ try {
115
+ return (await simpleGit(dir).getRemotes(true)).find((r) => r.name === remote)?.refs.fetch;
116
+ } catch {
117
+ return;
118
+ }
119
+ }
120
+ async function getLatestCommitHash(dir) {
121
+ try {
122
+ return (await simpleGit(dir).log({ maxCount: 1 })).latest?.hash;
123
+ } catch {
124
+ return;
125
+ }
126
+ }
127
+ async function hasUncommittedChanges(dir) {
128
+ return (await getGitStatus(dir))?.hasChanges ?? false;
129
+ }
130
+
131
+ //#endregion
132
+ export { getLatestCommitHash as a, pull as c, cloneRepo as d, cloneToTemp as f, getGitStatus as i, GitCloneError as l, fetch as n, getRemoteUrl as o, isTempDir as p, getCurrentBranch as r, hasUncommittedChanges as s, checkout as t, cleanupTempDir as u };
@@ -0,0 +1,43 @@
1
+ import { hasTTY, isCI } from "std-env";
2
+
3
+ //#region src/env/agents.d.ts
4
+ interface AgentConfig {
5
+ name: string;
6
+ configDir: string;
7
+ rulesFile?: string;
8
+ skillsDir?: string;
9
+ envDetect?: string[];
10
+ description?: string;
11
+ }
12
+ declare const agents: Record<string, AgentConfig>;
13
+ declare function getAgentConfig(agentId: string): AgentConfig | undefined;
14
+ declare function getAgentIds(): string[];
15
+ declare function getAllAgents(): AgentConfig[];
16
+ //#endregion
17
+ //#region src/env/detect.d.ts
18
+ interface DetectedAgent {
19
+ id: string;
20
+ config: AgentConfig;
21
+ detected: "env" | "config" | "both";
22
+ }
23
+ declare function detectAgentByEnv(agent: AgentConfig): boolean;
24
+ declare function detectCurrentAgent(): DetectedAgent | undefined;
25
+ declare function detectInstalledAgents(): DetectedAgent[];
26
+ declare function isRunningInAgent(agentId: string): boolean;
27
+ //#endregion
28
+ //#region src/env/paths.d.ts
29
+ interface XDGPaths {
30
+ data: string;
31
+ config: string;
32
+ cache: string;
33
+ state: string;
34
+ }
35
+ declare function getXDGPaths(): XDGPaths;
36
+ declare function getAgentConfigDir(agent: AgentConfig): string;
37
+ declare function getAgentRulesPath(agent: AgentConfig): string | undefined;
38
+ declare function getAgentSkillsDir(agent: AgentConfig): string | undefined;
39
+ declare function agentConfigExists(agent: AgentConfig): boolean;
40
+ /** @deprecated Use `hasTTY` from std-env instead */
41
+ declare const isTTY: boolean;
42
+ //#endregion
43
+ export { getAgentConfig as _, getAgentSkillsDir as a, isCI as c, detectAgentByEnv as d, detectCurrentAgent as f, agents as g, AgentConfig as h, getAgentRulesPath as i, isTTY as l, isRunningInAgent as m, agentConfigExists as n, getXDGPaths as o, detectInstalledAgents as p, getAgentConfigDir as r, hasTTY as s, XDGPaths as t, DetectedAgent as u, getAgentIds as v, getAllAgents as y };
@@ -0,0 +1,40 @@
1
+ //#region src/link/copy.d.ts
2
+ interface CopyOptions {
3
+ force?: boolean;
4
+ exclude?: string[];
5
+ preserveTimestamps?: boolean;
6
+ }
7
+ interface CopyResult {
8
+ success: boolean;
9
+ src: string;
10
+ dest: string;
11
+ filesCopied?: number;
12
+ error?: string;
13
+ }
14
+ declare function copyDirectory(src: string, dest: string, options?: CopyOptions): CopyResult;
15
+ declare function copyFile(src: string, dest: string, options?: {
16
+ force?: boolean;
17
+ }): boolean;
18
+ declare function getDirectorySize(dir: string): number;
19
+ //#endregion
20
+ //#region src/link/sanitize.d.ts
21
+ declare function sanitizeName(name: string): string;
22
+ declare function isPathSafe(targetPath: string, baseDir: string): boolean;
23
+ declare function validateSymlinkTarget(target: string): boolean;
24
+ //#endregion
25
+ //#region src/link/symlink.d.ts
26
+ interface SymlinkOptions {
27
+ force?: boolean;
28
+ relative?: boolean;
29
+ }
30
+ interface SymlinkResult {
31
+ success: boolean;
32
+ path: string;
33
+ target: string;
34
+ error?: string;
35
+ }
36
+ declare function createSymlink(target: string, linkPath: string, options?: SymlinkOptions): SymlinkResult;
37
+ declare function isSymlink(path: string): boolean;
38
+ declare function removeSymlink(linkPath: string): boolean;
39
+ //#endregion
40
+ export { removeSymlink as a, validateSymlinkTarget as c, copyDirectory as d, copyFile as f, isSymlink as i, CopyOptions as l, SymlinkResult as n, isPathSafe as o, getDirectorySize as p, createSymlink as r, sanitizeName as s, SymlinkOptions as t, CopyResult as u };
@@ -0,0 +1,34 @@
1
+ //#region src/utils/ansi.d.ts
2
+ declare const ANSI: {
3
+ readonly reset: "\x1B[0m";
4
+ readonly bold: "\x1B[1m";
5
+ readonly dim: "\x1B[2m";
6
+ readonly red: "\x1B[31m";
7
+ readonly green: "\x1B[32m";
8
+ readonly yellow: "\x1B[33m";
9
+ readonly blue: "\x1B[34m";
10
+ readonly magenta: "\x1B[35m";
11
+ readonly cyan: "\x1B[36m";
12
+ readonly white: "\x1B[37m";
13
+ readonly gray: "\x1B[90m";
14
+ };
15
+ declare function stripAnsi(str: string): string;
16
+ declare function bold(str: string): string;
17
+ declare function dim(str: string): string;
18
+ declare function red(str: string): string;
19
+ declare function green(str: string): string;
20
+ declare function yellow(str: string): string;
21
+ declare function blue(str: string): string;
22
+ declare function cyan(str: string): string;
23
+ declare function gray(str: string): string;
24
+ //#endregion
25
+ //#region src/utils/format.d.ts
26
+ declare function formatList(items: string[], maxShow?: number): string;
27
+ declare function pluralize(count: number, singular: string, plural?: string): string;
28
+ declare function truncate(str: string, maxLength: number, suffix?: string): string;
29
+ //#endregion
30
+ //#region src/utils/path.d.ts
31
+ declare function shortenPath(filepath: string, cwd?: string): string;
32
+ declare function expandPath(filepath: string): string;
33
+ //#endregion
34
+ export { truncate as a, bold as c, gray as d, green as f, yellow as h, pluralize as i, cyan as l, stripAnsi as m, shortenPath as n, ANSI as o, red as p, formatList as r, blue as s, expandPath as t, dim as u };