@untitled-devs/wasla 0.1.1 → 0.1.3
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/README.md +20 -15
- package/dist/adapters/base.d.ts +0 -1
- package/dist/adapters/base.js +0 -1
- package/dist/adapters/claude.d.ts +0 -1
- package/dist/adapters/claude.js +0 -1
- package/dist/adapters/cursor.d.ts +0 -1
- package/dist/adapters/cursor.js +0 -1
- package/dist/adapters/factory.d.ts +0 -1
- package/dist/adapters/factory.js +0 -1
- package/dist/adapters/gemini.d.ts +0 -1
- package/dist/adapters/gemini.js +0 -1
- package/dist/adapters/github-copilot-cli.d.ts +0 -1
- package/dist/adapters/github-copilot-cli.js +0 -1
- package/dist/adapters/github-copilot.d.ts +0 -1
- package/dist/adapters/github-copilot.js +0 -1
- package/dist/adapters/openclaw.d.ts +0 -1
- package/dist/adapters/openclaw.js +0 -1
- package/dist/adapters/opencode.d.ts +0 -1
- package/dist/adapters/opencode.js +0 -1
- package/dist/cli/commands/config.d.ts +1 -2
- package/dist/cli/commands/config.js +38 -42
- package/dist/cli/commands/install.d.ts +0 -1
- package/dist/cli/commands/install.js +10 -6
- package/dist/cli/commands/register.d.ts +0 -1
- package/dist/cli/commands/register.js +4 -3
- package/dist/cli/commands/status.d.ts +1 -6
- package/dist/cli/commands/status.js +15 -13
- package/dist/cli/commands/sync-to.d.ts +0 -2
- package/dist/cli/commands/sync-to.js +3 -3
- package/dist/cli/commands/sync.d.ts +2 -3
- package/dist/cli/commands/sync.js +33 -11
- package/dist/cli/commands/visualizer.d.ts +0 -2
- package/dist/cli/commands/visualizer.js +2 -2
- package/dist/cli/commands/watch.d.ts +1 -6
- package/dist/cli/commands/watch.js +3 -3
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +11 -14
- package/dist/core/registry.d.ts +0 -1
- package/dist/core/registry.js +0 -1
- package/dist/core/scanner.d.ts +0 -1
- package/dist/core/scanner.js +8 -4
- package/dist/core/types.d.ts +0 -2
- package/dist/core/types.js +0 -1
- package/dist/core/visualizer-types.d.ts +0 -1
- package/dist/core/visualizer-types.js +0 -1
- package/dist/syncer/index.d.ts +0 -1
- package/dist/syncer/index.js +0 -1
- package/dist/utils/cli-output.d.ts +4 -1
- package/dist/utils/cli-output.js +60 -7
- package/dist/utils/config.d.ts +6 -0
- package/dist/utils/config.js +34 -0
- package/dist/utils/fs.d.ts +0 -1
- package/dist/utils/fs.js +13 -8
- package/dist/utils/paths.d.ts +0 -1
- package/dist/utils/paths.js +0 -1
- package/package.json +50 -46
- package/src/visualizer/dist/assets/{index-BRmeXR7T.js → index-C6aJB2Yl.js} +1 -1
- package/src/visualizer/dist/index.html +1 -1
- package/dist/adapters/base.d.ts.map +0 -1
- package/dist/adapters/base.js.map +0 -1
- package/dist/adapters/claude.d.ts.map +0 -1
- package/dist/adapters/claude.js.map +0 -1
- package/dist/adapters/cursor.d.ts.map +0 -1
- package/dist/adapters/cursor.js.map +0 -1
- package/dist/adapters/factory.d.ts.map +0 -1
- package/dist/adapters/factory.js.map +0 -1
- package/dist/adapters/gemini.d.ts.map +0 -1
- package/dist/adapters/gemini.js.map +0 -1
- package/dist/adapters/github-copilot-cli.d.ts.map +0 -1
- package/dist/adapters/github-copilot-cli.js.map +0 -1
- package/dist/adapters/github-copilot.d.ts.map +0 -1
- package/dist/adapters/github-copilot.js.map +0 -1
- package/dist/adapters/openclaw.d.ts.map +0 -1
- package/dist/adapters/openclaw.js.map +0 -1
- package/dist/adapters/opencode.d.ts.map +0 -1
- package/dist/adapters/opencode.js.map +0 -1
- package/dist/cli/commands/config.d.ts.map +0 -1
- package/dist/cli/commands/config.js.map +0 -1
- package/dist/cli/commands/install.d.ts.map +0 -1
- package/dist/cli/commands/install.js.map +0 -1
- package/dist/cli/commands/register.d.ts.map +0 -1
- package/dist/cli/commands/register.js.map +0 -1
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/sync-to.d.ts.map +0 -1
- package/dist/cli/commands/sync-to.js.map +0 -1
- package/dist/cli/commands/sync.d.ts.map +0 -1
- package/dist/cli/commands/sync.js.map +0 -1
- package/dist/cli/commands/visualizer.d.ts.map +0 -1
- package/dist/cli/commands/visualizer.js.map +0 -1
- package/dist/cli/commands/watch.d.ts.map +0 -1
- package/dist/cli/commands/watch.js.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/core/registry.d.ts.map +0 -1
- package/dist/core/registry.js.map +0 -1
- package/dist/core/scanner.d.ts.map +0 -1
- package/dist/core/scanner.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js.map +0 -1
- package/dist/core/visualizer-types.d.ts.map +0 -1
- package/dist/core/visualizer-types.js.map +0 -1
- package/dist/syncer/index.d.ts.map +0 -1
- package/dist/syncer/index.js.map +0 -1
- package/dist/utils/cli-output.d.ts.map +0 -1
- package/dist/utils/cli-output.js.map +0 -1
- package/dist/utils/fs.d.ts.map +0 -1
- package/dist/utils/fs.js.map +0 -1
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js.map +0 -1
package/dist/cli/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
3
4
|
import { installCommand } from './commands/install.js';
|
|
4
5
|
import { registerCommand } from './commands/register.js';
|
|
5
6
|
import { syncCommand } from './commands/sync.js';
|
|
@@ -8,52 +9,48 @@ import { statusCommand } from './commands/status.js';
|
|
|
8
9
|
import { configCommand } from './commands/config.js';
|
|
9
10
|
import { watchCommand } from './commands/watch.js';
|
|
10
11
|
import { visualizerCommand } from './commands/visualizer.js';
|
|
12
|
+
import { banner } from '../utils/cli-output.js';
|
|
11
13
|
const program = new Command();
|
|
14
|
+
const packageVersion = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf-8'));
|
|
12
15
|
program
|
|
13
16
|
.name('waslagenie')
|
|
14
17
|
.description('Universal synchronization layer for AI agent orchestrators')
|
|
15
|
-
.version(
|
|
18
|
+
.version(packageVersion.version);
|
|
16
19
|
program.addCommand(new Command('install').description('Prepare WaslaGenie CLI state').action(installCommand));
|
|
17
20
|
program.addCommand(new Command('register')
|
|
18
21
|
.option('--to <targets>', 'Target provider(s), comma-separated. Example: claude,gemini')
|
|
19
22
|
.description('Register WaslaGenie helper skills inside installed AI tools')
|
|
20
23
|
.action((options) => registerCommand(options)));
|
|
21
24
|
program.addCommand(new Command('sync')
|
|
22
|
-
.option('--scope <scope>', 'user or workspace', 'workspace')
|
|
23
25
|
.description('Scan and sync agents/MCPs across tools')
|
|
24
|
-
.action((
|
|
26
|
+
.action(() => syncCommand()));
|
|
25
27
|
program.addCommand(new Command('sync-to')
|
|
26
28
|
.option('--from <source>', 'Source tool (gemini, claude, etc.)')
|
|
27
29
|
.option('--to <targets>', 'Target tool(s), comma-separated')
|
|
28
|
-
.option('--scope <scope>', 'user or workspace', 'workspace')
|
|
29
30
|
.description('Sync agents/MCPs from one tool to specific target(s)')
|
|
30
31
|
.action((options) => syncToCommand(options)));
|
|
31
32
|
program.addCommand(new Command('status')
|
|
32
|
-
.option('--scope <scope>', 'user or workspace', 'workspace')
|
|
33
33
|
.description('Show all discovered assets and their sync state')
|
|
34
|
-
.action((
|
|
34
|
+
.action(() => statusCommand()));
|
|
35
35
|
program.addCommand(new Command('config')
|
|
36
36
|
.option('--scope <scope>', 'Set scope to user or workspace')
|
|
37
37
|
.option('--show', 'Show current config')
|
|
38
38
|
.description('Configure WaslaGenie settings')
|
|
39
|
-
.action((options) =>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.action((options) => watchCommand(options)));
|
|
39
|
+
.action(async (options) => {
|
|
40
|
+
await configCommand(options);
|
|
41
|
+
}));
|
|
42
|
+
program.addCommand(new Command('watch').description('Watch for changes and auto-sync').action(() => watchCommand()));
|
|
44
43
|
program.addCommand(new Command('visualizer')
|
|
45
|
-
.option('--scope <scope>', 'user or workspace', 'workspace')
|
|
46
44
|
.option('--host <host>', 'Host to bind', '127.0.0.1')
|
|
47
45
|
.option('--port <port>', 'Port to bind', '4072')
|
|
48
46
|
.option('--no-open', 'Do not open browser automatically')
|
|
49
47
|
.description('Open interactive sync visualizer with built-in backend')
|
|
50
48
|
.action((options) => visualizerCommand(options)));
|
|
51
49
|
program.addCommand(new Command('ui')
|
|
52
|
-
.option('--scope <scope>', 'user or workspace', 'workspace')
|
|
53
50
|
.option('--host <host>', 'Host to bind', '127.0.0.1')
|
|
54
51
|
.option('--port <port>', 'Port to bind', '4072')
|
|
55
52
|
.option('--no-open', 'Do not open browser automatically')
|
|
56
53
|
.description('Alias for `visualizer`')
|
|
57
54
|
.action((options) => visualizerCommand(options)));
|
|
55
|
+
banner();
|
|
58
56
|
program.parse(process.argv);
|
|
59
|
-
//# sourceMappingURL=index.js.map
|
package/dist/core/registry.d.ts
CHANGED
package/dist/core/registry.js
CHANGED
package/dist/core/scanner.d.ts
CHANGED
package/dist/core/scanner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileExists, isDirectory, readJSON } from '../utils/fs.js';
|
|
2
|
-
import { join, relative
|
|
2
|
+
import { join, relative } from 'path';
|
|
3
3
|
import { getToolMarkers, getRegistryPath } from '../utils/paths.js';
|
|
4
4
|
import { stat, readdir } from 'fs/promises';
|
|
5
5
|
import { getAdapter } from '../adapters/factory.js';
|
|
@@ -203,13 +203,18 @@ export class Scanner {
|
|
|
203
203
|
extractAssetName(relativePathOrFileName) {
|
|
204
204
|
// For nested paths: waslagenie/SKILL.md -> waslagenie
|
|
205
205
|
// For flat files: researcher.md -> researcher
|
|
206
|
-
const parts = relativePathOrFileName.split(
|
|
206
|
+
const parts = relativePathOrFileName.split(/[/\\]/);
|
|
207
207
|
if (parts.length > 1) {
|
|
208
208
|
// Nested: return first directory
|
|
209
209
|
return parts[0];
|
|
210
210
|
}
|
|
211
211
|
// Flat: remove extension
|
|
212
|
-
|
|
212
|
+
const fileName = parts[0];
|
|
213
|
+
const dotIndex = fileName.lastIndexOf('.');
|
|
214
|
+
if (dotIndex <= 0) {
|
|
215
|
+
return fileName;
|
|
216
|
+
}
|
|
217
|
+
return fileName.substring(0, dotIndex);
|
|
213
218
|
}
|
|
214
219
|
readNestedRecord(config, keyPath) {
|
|
215
220
|
let value = config;
|
|
@@ -224,4 +229,3 @@ export class Scanner {
|
|
|
224
229
|
: {};
|
|
225
230
|
}
|
|
226
231
|
}
|
|
227
|
-
//# sourceMappingURL=scanner.js.map
|
package/dist/core/types.d.ts
CHANGED
|
@@ -68,11 +68,9 @@ export interface DiscoveredFile {
|
|
|
68
68
|
content?: string;
|
|
69
69
|
}
|
|
70
70
|
export interface SyncOptions {
|
|
71
|
-
scope?: 'user' | 'workspace';
|
|
72
71
|
interactive?: boolean;
|
|
73
72
|
}
|
|
74
73
|
export interface ConfigOptions {
|
|
75
74
|
scope?: 'user' | 'workspace';
|
|
76
75
|
show?: boolean;
|
|
77
76
|
}
|
|
78
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/core/types.js
CHANGED
package/dist/syncer/index.d.ts
CHANGED
package/dist/syncer/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { Asset } from '../core/types.js';
|
|
2
|
+
export declare function banner(): void;
|
|
1
3
|
export declare function success(message: string): void;
|
|
2
4
|
export declare function error(message: string): void;
|
|
3
5
|
export declare function info(message: string): void;
|
|
4
6
|
export declare function warning(message: string): void;
|
|
5
7
|
export declare function highlight(message: string): void;
|
|
8
|
+
export declare function metric(label: string, value: string | number): void;
|
|
9
|
+
export declare function assetList(assets: Asset[], includeModifiedAt?: boolean, activeProviders?: string[]): void;
|
|
6
10
|
export declare function step(title: string): void;
|
|
7
11
|
export declare function section(title: string): void;
|
|
8
12
|
export declare function table(rows: string[][], columnWidths?: number[]): void;
|
|
9
13
|
export declare function spacer(): void;
|
|
10
14
|
export declare function bulletPoint(text: string, indent?: number): void;
|
|
11
15
|
export declare function code(text: string): string;
|
|
12
|
-
//# sourceMappingURL=cli-output.d.ts.map
|
package/dist/utils/cli-output.js
CHANGED
|
@@ -1,23 +1,77 @@
|
|
|
1
|
+
const ansi = {
|
|
2
|
+
reset: '\u001b[0m',
|
|
3
|
+
bold: '\u001b[1m',
|
|
4
|
+
cyan: '\u001b[36m',
|
|
5
|
+
blue: '\u001b[34m',
|
|
6
|
+
green: '\u001b[32m',
|
|
7
|
+
red: '\u001b[31m',
|
|
8
|
+
yellow: '\u001b[33m',
|
|
9
|
+
magenta: '\u001b[35m',
|
|
10
|
+
};
|
|
11
|
+
function color(text, ...codes) {
|
|
12
|
+
return `${codes.join('')}${text}${ansi.reset}`;
|
|
13
|
+
}
|
|
14
|
+
export function banner() {
|
|
15
|
+
console.log(color(`
|
|
16
|
+
__ __ _ ____ _
|
|
17
|
+
\\ \\ / /_ _ ___| | __ _ / ___| ___ _ __ (_) ___
|
|
18
|
+
\\ \\ /\\ / / _\` / __| |/ _\` | | _ / _ \\ '_ \\| |/ _ \\
|
|
19
|
+
\\ V V / (_| \\__ \\ | (_| | |_| | __/ | | | | __/
|
|
20
|
+
\\_/\\_/ \\__,_|___/_|\\__,_|\\____|\\___|_| |_|_|\\___|
|
|
21
|
+
`, ansi.bold, ansi.cyan));
|
|
22
|
+
}
|
|
1
23
|
export function success(message) {
|
|
2
|
-
console.log(`✔ ${message}
|
|
24
|
+
console.log(color(`✔ ${message}`, ansi.green));
|
|
3
25
|
}
|
|
4
26
|
export function error(message) {
|
|
5
|
-
console.error(`✗ ${message}
|
|
27
|
+
console.error(color(`✗ ${message}`, ansi.red));
|
|
6
28
|
}
|
|
7
29
|
export function info(message) {
|
|
8
|
-
console.log(`ℹ ${message}
|
|
30
|
+
console.log(color(`ℹ ${message}`, ansi.blue));
|
|
9
31
|
}
|
|
10
32
|
export function warning(message) {
|
|
11
|
-
console.log(`⚠ ${message}
|
|
33
|
+
console.log(color(`⚠ ${message}`, ansi.yellow));
|
|
12
34
|
}
|
|
13
35
|
export function highlight(message) {
|
|
14
|
-
console.log(`✨ ${message}
|
|
36
|
+
console.log(color(`✨ ${message}`, ansi.magenta, ansi.bold));
|
|
37
|
+
}
|
|
38
|
+
export function metric(label, value) {
|
|
39
|
+
console.log(` ${color(label.padEnd(20), ansi.blue)} ${color(String(value), ansi.bold)}`);
|
|
40
|
+
}
|
|
41
|
+
export function assetList(assets, includeModifiedAt = false, activeProviders) {
|
|
42
|
+
const assetTypes = ['agent', 'skill', 'mcp', 'context'];
|
|
43
|
+
const headings = {
|
|
44
|
+
agent: 'AGENTS',
|
|
45
|
+
skill: 'SKILLS',
|
|
46
|
+
mcp: 'MCP SERVERS',
|
|
47
|
+
context: 'CONTEXT FILES',
|
|
48
|
+
};
|
|
49
|
+
const activeProviderSet = activeProviders ? new Set(activeProviders) : null;
|
|
50
|
+
for (const type of assetTypes) {
|
|
51
|
+
const typedAssets = assets
|
|
52
|
+
.filter((asset) => asset.type === type)
|
|
53
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
54
|
+
if (typedAssets.length === 0)
|
|
55
|
+
continue;
|
|
56
|
+
console.log(color(` ${headings[type]} (${typedAssets.length})`, ansi.cyan, ansi.bold));
|
|
57
|
+
for (const asset of typedAssets) {
|
|
58
|
+
const providers = [...new Set(asset.stubs.map((stub) => stub.tool))]
|
|
59
|
+
.sort()
|
|
60
|
+
.filter((provider) => !activeProviderSet || activeProviderSet.has(provider));
|
|
61
|
+
console.log(` ${color('•', ansi.green)} ${color(asset.name, ansi.bold)}`);
|
|
62
|
+
console.log(` ${color('Mirrors:', ansi.blue)} ${providers.join(', ') || 'none'}`);
|
|
63
|
+
if (includeModifiedAt) {
|
|
64
|
+
console.log(` ${color('Updated:', ansi.blue)} ${new Date(asset.last_modified_at).toLocaleString()}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
spacer();
|
|
68
|
+
}
|
|
15
69
|
}
|
|
16
70
|
export function step(title) {
|
|
17
71
|
console.log(`\n${title}`);
|
|
18
72
|
}
|
|
19
73
|
export function section(title) {
|
|
20
|
-
console.log(`\n🔍 ${title}
|
|
74
|
+
console.log(color(`\n🔍 ${title}`, ansi.blue, ansi.bold));
|
|
21
75
|
}
|
|
22
76
|
export function table(rows, columnWidths) {
|
|
23
77
|
if (rows.length === 0)
|
|
@@ -42,4 +96,3 @@ export function bulletPoint(text, indent = 0) {
|
|
|
42
96
|
export function code(text) {
|
|
43
97
|
return `\`${text}\``;
|
|
44
98
|
}
|
|
45
|
-
//# sourceMappingURL=cli-output.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type WaslaScope = 'user' | 'workspace';
|
|
2
|
+
export declare function getConfigPath(): string;
|
|
3
|
+
export declare function readConfiguredScope(): Promise<WaslaScope | null>;
|
|
4
|
+
export declare function requireConfiguredScope(): Promise<WaslaScope>;
|
|
5
|
+
export declare function writeConfiguredScope(scope: WaslaScope): Promise<void>;
|
|
6
|
+
export declare function getConfiguredRegistryPath(scope: WaslaScope): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { dirname, join } from 'path';
|
|
2
|
+
import { ensureDir, fileExists, readJSON, writeJSON } from './fs.js';
|
|
3
|
+
import { getRegistryDir, getRegistryPath } from './paths.js';
|
|
4
|
+
export function getConfigPath() {
|
|
5
|
+
return join(getRegistryDir('user'), 'config.json');
|
|
6
|
+
}
|
|
7
|
+
export async function readConfiguredScope() {
|
|
8
|
+
const configPath = getConfigPath();
|
|
9
|
+
if (!(await fileExists(configPath)))
|
|
10
|
+
return null;
|
|
11
|
+
const config = await readJSON(configPath);
|
|
12
|
+
if (typeof config !== 'object' || config === null || typeof config.scope !== 'string') {
|
|
13
|
+
throw new Error(`Invalid scope in ${configPath}. Run: waslagenie config --scope <scope>`);
|
|
14
|
+
}
|
|
15
|
+
if (config.scope !== 'user' && config.scope !== 'workspace') {
|
|
16
|
+
throw new Error(`Invalid scope in ${configPath}. Run: waslagenie config --scope <scope>`);
|
|
17
|
+
}
|
|
18
|
+
return config.scope;
|
|
19
|
+
}
|
|
20
|
+
export async function requireConfiguredScope() {
|
|
21
|
+
const scope = await readConfiguredScope();
|
|
22
|
+
if (!scope) {
|
|
23
|
+
throw new Error('Scope is not configured. Run: waslagenie config --scope <user|workspace>');
|
|
24
|
+
}
|
|
25
|
+
return scope;
|
|
26
|
+
}
|
|
27
|
+
export async function writeConfiguredScope(scope) {
|
|
28
|
+
const configPath = getConfigPath();
|
|
29
|
+
await ensureDir(dirname(configPath));
|
|
30
|
+
await writeJSON(configPath, { scope });
|
|
31
|
+
}
|
|
32
|
+
export function getConfiguredRegistryPath(scope) {
|
|
33
|
+
return getRegistryPath(scope);
|
|
34
|
+
}
|
package/dist/utils/fs.d.ts
CHANGED
|
@@ -11,4 +11,3 @@ export declare function listDirs(dir: string): Promise<string[]>;
|
|
|
11
11
|
export declare function getFileName(path: string): string;
|
|
12
12
|
export declare function getFileNameWithoutExt(path: string): string;
|
|
13
13
|
export declare function getFileExtension(path: string): string;
|
|
14
|
-
//# sourceMappingURL=fs.d.ts.map
|
package/dist/utils/fs.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { readdir, readFile, writeFile, stat, mkdir, rm } from 'fs/promises';
|
|
2
|
-
import { basename, extname } from 'path';
|
|
3
2
|
export async function fileExists(path) {
|
|
4
3
|
try {
|
|
5
4
|
await stat(path);
|
|
@@ -60,15 +59,21 @@ export async function listDirs(dir) {
|
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
export function getFileName(path) {
|
|
63
|
-
return
|
|
62
|
+
return path.split(/[/\\]/).filter(Boolean).pop() || '';
|
|
64
63
|
}
|
|
65
64
|
export function getFileNameWithoutExt(path) {
|
|
66
|
-
const fileName =
|
|
67
|
-
const
|
|
68
|
-
|
|
65
|
+
const fileName = getFileName(path);
|
|
66
|
+
const dotIndex = fileName.lastIndexOf('.');
|
|
67
|
+
if (dotIndex <= 0) {
|
|
68
|
+
return fileName;
|
|
69
|
+
}
|
|
70
|
+
return fileName.substring(0, dotIndex);
|
|
69
71
|
}
|
|
70
72
|
export function getFileExtension(path) {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
+
const fileName = getFileName(path);
|
|
74
|
+
const dotIndex = fileName.lastIndexOf('.');
|
|
75
|
+
if (dotIndex <= 0) {
|
|
76
|
+
return '';
|
|
77
|
+
}
|
|
78
|
+
return fileName.substring(dotIndex + 1);
|
|
73
79
|
}
|
|
74
|
-
//# sourceMappingURL=fs.js.map
|
package/dist/utils/paths.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ export declare function getRegistryDir(scope: 'user' | 'workspace'): string;
|
|
|
4
4
|
export declare function getToolMarkers(scope?: 'user' | 'workspace'): Record<string, string>;
|
|
5
5
|
export declare function getToolName(toolPath: string): string | null;
|
|
6
6
|
export declare function getToolDisplayName(toolName: string): string;
|
|
7
|
-
//# sourceMappingURL=paths.d.ts.map
|
package/dist/utils/paths.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@untitled-devs/wasla",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Universal synchronization layer for AI agent orchestrators",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cli/index.js",
|
|
@@ -14,52 +14,53 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"prepublishOnly": "npm run visualizer:build && npm run build",
|
|
16
16
|
"build": "npm run check && node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\" && tsc",
|
|
17
|
+
"postbuild": "node -e \"require('fs').chmodSync('dist/cli/index.js', 0o755)\"",
|
|
17
18
|
"dev": "tsc --watch",
|
|
18
19
|
"start": "node dist/cli/index.js",
|
|
19
|
-
"sync": "npm run build && node dist/cli/index.js sync
|
|
20
|
-
"watch": "npm run build && node dist/cli/index.js watch
|
|
21
|
-
"sync:claude:gemini": "npm run build && node dist/cli/index.js sync-to --from claude --to gemini
|
|
22
|
-
"sync:claude:openclaw": "npm run build && node dist/cli/index.js sync-to --from claude --to openclaw
|
|
23
|
-
"sync:claude:opencode": "npm run build && node dist/cli/index.js sync-to --from claude --to opencode
|
|
24
|
-
"sync:claude:cursor": "npm run build && node dist/cli/index.js sync-to --from claude --to cursor
|
|
25
|
-
"sync:claude:github-copilot": "npm run build && node dist/cli/index.js sync-to --from claude --to github-copilot
|
|
26
|
-
"sync:claude:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from claude --to github-copilot-cli
|
|
27
|
-
"sync:gemini:claude": "npm run build && node dist/cli/index.js sync-to --from gemini --to claude
|
|
28
|
-
"sync:gemini:openclaw": "npm run build && node dist/cli/index.js sync-to --from gemini --to openclaw
|
|
29
|
-
"sync:gemini:opencode": "npm run build && node dist/cli/index.js sync-to --from gemini --to opencode
|
|
30
|
-
"sync:gemini:cursor": "npm run build && node dist/cli/index.js sync-to --from gemini --to cursor
|
|
31
|
-
"sync:gemini:github-copilot": "npm run build && node dist/cli/index.js sync-to --from gemini --to github-copilot
|
|
32
|
-
"sync:gemini:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from gemini --to github-copilot-cli
|
|
33
|
-
"sync:openclaw:claude": "npm run build && node dist/cli/index.js sync-to --from openclaw --to claude
|
|
34
|
-
"sync:openclaw:gemini": "npm run build && node dist/cli/index.js sync-to --from openclaw --to gemini
|
|
35
|
-
"sync:openclaw:opencode": "npm run build && node dist/cli/index.js sync-to --from openclaw --to opencode
|
|
36
|
-
"sync:openclaw:cursor": "npm run build && node dist/cli/index.js sync-to --from openclaw --to cursor
|
|
37
|
-
"sync:openclaw:github-copilot": "npm run build && node dist/cli/index.js sync-to --from openclaw --to github-copilot
|
|
38
|
-
"sync:openclaw:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from openclaw --to github-copilot-cli
|
|
39
|
-
"sync:opencode:claude": "npm run build && node dist/cli/index.js sync-to --from opencode --to claude
|
|
40
|
-
"sync:opencode:gemini": "npm run build && node dist/cli/index.js sync-to --from opencode --to gemini
|
|
41
|
-
"sync:opencode:openclaw": "npm run build && node dist/cli/index.js sync-to --from opencode --to openclaw
|
|
42
|
-
"sync:opencode:cursor": "npm run build && node dist/cli/index.js sync-to --from opencode --to cursor
|
|
43
|
-
"sync:opencode:github-copilot": "npm run build && node dist/cli/index.js sync-to --from opencode --to github-copilot
|
|
44
|
-
"sync:opencode:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from opencode --to github-copilot-cli
|
|
45
|
-
"sync:cursor:claude": "npm run build && node dist/cli/index.js sync-to --from cursor --to claude
|
|
46
|
-
"sync:cursor:gemini": "npm run build && node dist/cli/index.js sync-to --from cursor --to gemini
|
|
47
|
-
"sync:cursor:openclaw": "npm run build && node dist/cli/index.js sync-to --from cursor --to openclaw
|
|
48
|
-
"sync:cursor:opencode": "npm run build && node dist/cli/index.js sync-to --from cursor --to opencode
|
|
49
|
-
"sync:cursor:github-copilot": "npm run build && node dist/cli/index.js sync-to --from cursor --to github-copilot
|
|
50
|
-
"sync:cursor:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from cursor --to github-copilot-cli
|
|
51
|
-
"sync:github-copilot:claude": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to claude
|
|
52
|
-
"sync:github-copilot:gemini": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to gemini
|
|
53
|
-
"sync:github-copilot:openclaw": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to openclaw
|
|
54
|
-
"sync:github-copilot:opencode": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to opencode
|
|
55
|
-
"sync:github-copilot:cursor": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to cursor
|
|
56
|
-
"sync:github-copilot:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to github-copilot-cli
|
|
57
|
-
"sync:github-copilot-cli:claude": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to claude
|
|
58
|
-
"sync:github-copilot-cli:gemini": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to gemini
|
|
59
|
-
"sync:github-copilot-cli:openclaw": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to openclaw
|
|
60
|
-
"sync:github-copilot-cli:opencode": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to opencode
|
|
61
|
-
"sync:github-copilot-cli:cursor": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to cursor
|
|
62
|
-
"sync:github-copilot-cli:github-copilot": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to github-copilot
|
|
20
|
+
"sync": "npm run build && node dist/cli/index.js sync",
|
|
21
|
+
"watch": "npm run build && node dist/cli/index.js watch",
|
|
22
|
+
"sync:claude:gemini": "npm run build && node dist/cli/index.js sync-to --from claude --to gemini",
|
|
23
|
+
"sync:claude:openclaw": "npm run build && node dist/cli/index.js sync-to --from claude --to openclaw",
|
|
24
|
+
"sync:claude:opencode": "npm run build && node dist/cli/index.js sync-to --from claude --to opencode",
|
|
25
|
+
"sync:claude:cursor": "npm run build && node dist/cli/index.js sync-to --from claude --to cursor",
|
|
26
|
+
"sync:claude:github-copilot": "npm run build && node dist/cli/index.js sync-to --from claude --to github-copilot",
|
|
27
|
+
"sync:claude:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from claude --to github-copilot-cli",
|
|
28
|
+
"sync:gemini:claude": "npm run build && node dist/cli/index.js sync-to --from gemini --to claude",
|
|
29
|
+
"sync:gemini:openclaw": "npm run build && node dist/cli/index.js sync-to --from gemini --to openclaw",
|
|
30
|
+
"sync:gemini:opencode": "npm run build && node dist/cli/index.js sync-to --from gemini --to opencode",
|
|
31
|
+
"sync:gemini:cursor": "npm run build && node dist/cli/index.js sync-to --from gemini --to cursor",
|
|
32
|
+
"sync:gemini:github-copilot": "npm run build && node dist/cli/index.js sync-to --from gemini --to github-copilot",
|
|
33
|
+
"sync:gemini:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from gemini --to github-copilot-cli",
|
|
34
|
+
"sync:openclaw:claude": "npm run build && node dist/cli/index.js sync-to --from openclaw --to claude",
|
|
35
|
+
"sync:openclaw:gemini": "npm run build && node dist/cli/index.js sync-to --from openclaw --to gemini",
|
|
36
|
+
"sync:openclaw:opencode": "npm run build && node dist/cli/index.js sync-to --from openclaw --to opencode",
|
|
37
|
+
"sync:openclaw:cursor": "npm run build && node dist/cli/index.js sync-to --from openclaw --to cursor",
|
|
38
|
+
"sync:openclaw:github-copilot": "npm run build && node dist/cli/index.js sync-to --from openclaw --to github-copilot",
|
|
39
|
+
"sync:openclaw:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from openclaw --to github-copilot-cli",
|
|
40
|
+
"sync:opencode:claude": "npm run build && node dist/cli/index.js sync-to --from opencode --to claude",
|
|
41
|
+
"sync:opencode:gemini": "npm run build && node dist/cli/index.js sync-to --from opencode --to gemini",
|
|
42
|
+
"sync:opencode:openclaw": "npm run build && node dist/cli/index.js sync-to --from opencode --to openclaw",
|
|
43
|
+
"sync:opencode:cursor": "npm run build && node dist/cli/index.js sync-to --from opencode --to cursor",
|
|
44
|
+
"sync:opencode:github-copilot": "npm run build && node dist/cli/index.js sync-to --from opencode --to github-copilot",
|
|
45
|
+
"sync:opencode:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from opencode --to github-copilot-cli",
|
|
46
|
+
"sync:cursor:claude": "npm run build && node dist/cli/index.js sync-to --from cursor --to claude",
|
|
47
|
+
"sync:cursor:gemini": "npm run build && node dist/cli/index.js sync-to --from cursor --to gemini",
|
|
48
|
+
"sync:cursor:openclaw": "npm run build && node dist/cli/index.js sync-to --from cursor --to openclaw",
|
|
49
|
+
"sync:cursor:opencode": "npm run build && node dist/cli/index.js sync-to --from cursor --to opencode",
|
|
50
|
+
"sync:cursor:github-copilot": "npm run build && node dist/cli/index.js sync-to --from cursor --to github-copilot",
|
|
51
|
+
"sync:cursor:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from cursor --to github-copilot-cli",
|
|
52
|
+
"sync:github-copilot:claude": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to claude",
|
|
53
|
+
"sync:github-copilot:gemini": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to gemini",
|
|
54
|
+
"sync:github-copilot:openclaw": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to openclaw",
|
|
55
|
+
"sync:github-copilot:opencode": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to opencode",
|
|
56
|
+
"sync:github-copilot:cursor": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to cursor",
|
|
57
|
+
"sync:github-copilot:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to github-copilot-cli",
|
|
58
|
+
"sync:github-copilot-cli:claude": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to claude",
|
|
59
|
+
"sync:github-copilot-cli:gemini": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to gemini",
|
|
60
|
+
"sync:github-copilot-cli:openclaw": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to openclaw",
|
|
61
|
+
"sync:github-copilot-cli:opencode": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to opencode",
|
|
62
|
+
"sync:github-copilot-cli:cursor": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to cursor",
|
|
63
|
+
"sync:github-copilot-cli:github-copilot": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to github-copilot",
|
|
63
64
|
"test": "vitest",
|
|
64
65
|
"test:run": "vitest run",
|
|
65
66
|
"test:watch": "vitest --watch",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"docs": "cd docs && npm run start",
|
|
72
73
|
"docs:install": "npm --prefix docs install",
|
|
73
74
|
"docs:build": "cd docs && npm run build",
|
|
74
|
-
"visualizer": "npm run visualizer:install && npm run visualizer:build && npm run build && node dist/cli/index.js visualizer
|
|
75
|
+
"visualizer": "npm run visualizer:install && npm run visualizer:build && npm run build && node dist/cli/index.js visualizer",
|
|
75
76
|
"ui": "npm run visualizer",
|
|
76
77
|
"visualizer:install": "npm --prefix src/visualizer install",
|
|
77
78
|
"visualizer:dev": "npm --prefix src/visualizer run dev",
|
|
@@ -86,6 +87,8 @@
|
|
|
86
87
|
"type:fix": "tsc --noEmit && prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
87
88
|
"check": "npm run type:check && npm run format:check",
|
|
88
89
|
"fix": "npm run format && npm run lint:fix",
|
|
90
|
+
"changelog": "node scripts/release.mjs changelog",
|
|
91
|
+
"release": "node scripts/release.mjs release",
|
|
89
92
|
"clean": "node -e \"['dist', '.nyc_output', 'output', 'coverage'].forEach(p => require('fs').rmSync(p, { recursive: true, force: true }))\"",
|
|
90
93
|
"all": "npm run clean && npm run build && npm run check && npm test"
|
|
91
94
|
},
|
|
@@ -109,6 +112,7 @@
|
|
|
109
112
|
"devDependencies": {
|
|
110
113
|
"@ai-hero/sandcastle": "^0.6.6",
|
|
111
114
|
"@types/node": "^20.10.6",
|
|
115
|
+
"@types/prompts": "^2.4.9",
|
|
112
116
|
"@types/ws": "^8.18.1",
|
|
113
117
|
"@vitest/coverage-v8": "^1.6.1",
|
|
114
118
|
"@vitest/ui": "^1.0.0",
|