@untitled-devs/wasla 0.1.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +34 -30
  2. package/dist/{utils → apps/cli/src}/cli-output.d.ts +4 -0
  3. package/dist/apps/cli/src/cli-output.js +98 -0
  4. package/dist/{cli → apps/cli/src}/commands/config.d.ts +1 -1
  5. package/dist/apps/cli/src/commands/config.js +62 -0
  6. package/dist/{cli → apps/cli/src}/commands/install.js +11 -6
  7. package/dist/{cli → apps/cli/src}/commands/register.js +8 -6
  8. package/dist/apps/cli/src/commands/status.d.ts +1 -0
  9. package/dist/apps/cli/src/commands/status.js +39 -0
  10. package/dist/{cli → apps/cli/src}/commands/sync-to.d.ts +0 -1
  11. package/dist/{cli → apps/cli/src}/commands/sync-to.js +7 -6
  12. package/dist/apps/cli/src/commands/sync.d.ts +5 -0
  13. package/dist/apps/cli/src/commands/sync.js +49 -0
  14. package/dist/apps/cli/src/commands/watch.d.ts +1 -0
  15. package/dist/{cli → apps/cli/src}/commands/watch.js +8 -7
  16. package/dist/{cli → apps/cli/src}/index.js +26 -16
  17. package/dist/{cli/commands/visualizer.d.ts → apps/cli/src/server/visualizer-server.d.ts} +0 -2
  18. package/dist/{cli/commands/visualizer.js → apps/cli/src/server/visualizer-server.js} +86 -31
  19. package/dist/{adapters → packages/adapters/src}/base.d.ts +1 -1
  20. package/dist/{adapters → packages/adapters/src}/claude.d.ts +1 -1
  21. package/dist/{adapters → packages/adapters/src}/claude.js +2 -2
  22. package/dist/{adapters → packages/adapters/src}/cursor.d.ts +1 -1
  23. package/dist/{adapters → packages/adapters/src}/cursor.js +2 -2
  24. package/dist/{adapters → packages/adapters/src}/factory.d.ts +1 -1
  25. package/dist/{adapters → packages/adapters/src}/gemini.d.ts +1 -1
  26. package/dist/{adapters → packages/adapters/src}/gemini.js +2 -2
  27. package/dist/{adapters → packages/adapters/src}/github-copilot-cli.d.ts +1 -1
  28. package/dist/{adapters → packages/adapters/src}/github-copilot-cli.js +2 -2
  29. package/dist/{adapters → packages/adapters/src}/github-copilot.d.ts +1 -1
  30. package/dist/{adapters → packages/adapters/src}/github-copilot.js +2 -2
  31. package/dist/{adapters → packages/adapters/src}/openclaw.d.ts +1 -1
  32. package/dist/{adapters → packages/adapters/src}/openclaw.js +2 -2
  33. package/dist/{adapters → packages/adapters/src}/opencode.d.ts +1 -1
  34. package/dist/{adapters → packages/adapters/src}/opencode.js +2 -2
  35. package/dist/{core → packages/core/src}/registry.d.ts +1 -1
  36. package/dist/{core → packages/core/src}/registry.js +2 -2
  37. package/dist/{core → packages/core/src}/types.d.ts +0 -1
  38. package/dist/{core → packages/core/src}/visualizer-types.d.ts +8 -0
  39. package/dist/packages/shared/src/config.d.ts +6 -0
  40. package/dist/packages/shared/src/config.js +34 -0
  41. package/dist/{utils → packages/shared/src}/fs.js +13 -7
  42. package/dist/{syncer → packages/sync/src}/index.d.ts +3 -3
  43. package/dist/{syncer → packages/sync/src}/index.js +4 -4
  44. package/dist/{core → packages/sync/src}/scanner.d.ts +1 -1
  45. package/dist/{core → packages/sync/src}/scanner.js +11 -6
  46. package/dist/visualizer/assets/index-cU_xphSj.js +144 -0
  47. package/{src/visualizer/dist → dist/visualizer}/index.html +1 -1
  48. package/package.json +76 -62
  49. package/dist/cli/commands/config.js +0 -65
  50. package/dist/cli/commands/status.d.ts +0 -5
  51. package/dist/cli/commands/status.js +0 -36
  52. package/dist/cli/commands/sync.d.ts +0 -5
  53. package/dist/cli/commands/sync.js +0 -26
  54. package/dist/cli/commands/watch.d.ts +0 -5
  55. package/dist/utils/cli-output.js +0 -44
  56. package/src/visualizer/dist/assets/index-C6aJB2Yl.js +0 -144
  57. /package/dist/{cli → apps/cli/src}/commands/install.d.ts +0 -0
  58. /package/dist/{cli → apps/cli/src}/commands/register.d.ts +0 -0
  59. /package/dist/{cli → apps/cli/src}/index.d.ts +0 -0
  60. /package/dist/{adapters → packages/adapters/src}/base.js +0 -0
  61. /package/dist/{adapters → packages/adapters/src}/factory.js +0 -0
  62. /package/dist/{core → packages/core/src}/types.js +0 -0
  63. /package/dist/{core → packages/core/src}/visualizer-types.js +0 -0
  64. /package/dist/{utils → packages/shared/src}/fs.d.ts +0 -0
  65. /package/dist/{utils → packages/shared/src}/paths.d.ts +0 -0
  66. /package/dist/{utils → packages/shared/src}/paths.js +0 -0
  67. /package/{src/visualizer/dist → dist/visualizer}/logo.png +0 -0
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Wasla Genie Visualizer</title>
7
- <script type="module" crossorigin src="/assets/index-C6aJB2Yl.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-cU_xphSj.js"></script>
8
8
  </head>
9
9
  <body>
10
10
  <div id="root"></div>
package/package.json CHANGED
@@ -1,66 +1,77 @@
1
1
  {
2
2
  "name": "@untitled-devs/wasla",
3
- "version": "0.1.2",
3
+ "version": "1.0.0",
4
4
  "description": "Universal synchronization layer for AI agent orchestrators",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/The-Untitled-Org/wasla-genie.git"
8
+ },
5
9
  "type": "module",
6
- "main": "dist/cli/index.js",
10
+ "main": "dist/apps/cli/src/index.js",
7
11
  "bin": {
8
- "waslagenie": "dist/cli/index.js"
12
+ "waslagenie": "dist/apps/cli/src/index.js"
13
+ },
14
+ "imports": {
15
+ "#adapters/*": "./dist/packages/adapters/src/*",
16
+ "#cli/*": "./dist/apps/cli/src/*",
17
+ "#core/*": "./dist/packages/core/src/*",
18
+ "#shared/*": "./dist/packages/shared/src/*",
19
+ "#sync/*": "./dist/packages/sync/src/*"
9
20
  },
10
21
  "files": [
11
- "dist",
12
- "src/visualizer/dist"
22
+ "dist"
13
23
  ],
14
24
  "scripts": {
15
- "prepublishOnly": "npm run visualizer:build && npm run build",
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)\"",
25
+ "prepublishOnly": "npm run build",
26
+ "build": "npm run visualizer:build && npm run build:cli",
27
+ "build:cli": "npm run check && node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\" && tsc && node -e \"require('fs').cpSync('apps/visualizer/dist', 'dist/visualizer', { recursive: true })\"",
28
+ "postbuild": "node -e \"require('fs').chmodSync('dist/apps/cli/src/index.js', 0o755)\"",
18
29
  "dev": "tsc --watch",
19
- "start": "node dist/cli/index.js",
20
- "sync": "npm run build && node dist/cli/index.js sync --scope workspace",
21
- "watch": "npm run build && node dist/cli/index.js watch --scope workspace",
22
- "sync:claude:gemini": "npm run build && node dist/cli/index.js sync-to --from claude --to gemini --scope workspace",
23
- "sync:claude:openclaw": "npm run build && node dist/cli/index.js sync-to --from claude --to openclaw --scope workspace",
24
- "sync:claude:opencode": "npm run build && node dist/cli/index.js sync-to --from claude --to opencode --scope workspace",
25
- "sync:claude:cursor": "npm run build && node dist/cli/index.js sync-to --from claude --to cursor --scope workspace",
26
- "sync:claude:github-copilot": "npm run build && node dist/cli/index.js sync-to --from claude --to github-copilot --scope workspace",
27
- "sync:claude:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from claude --to github-copilot-cli --scope workspace",
28
- "sync:gemini:claude": "npm run build && node dist/cli/index.js sync-to --from gemini --to claude --scope workspace",
29
- "sync:gemini:openclaw": "npm run build && node dist/cli/index.js sync-to --from gemini --to openclaw --scope workspace",
30
- "sync:gemini:opencode": "npm run build && node dist/cli/index.js sync-to --from gemini --to opencode --scope workspace",
31
- "sync:gemini:cursor": "npm run build && node dist/cli/index.js sync-to --from gemini --to cursor --scope workspace",
32
- "sync:gemini:github-copilot": "npm run build && node dist/cli/index.js sync-to --from gemini --to github-copilot --scope workspace",
33
- "sync:gemini:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from gemini --to github-copilot-cli --scope workspace",
34
- "sync:openclaw:claude": "npm run build && node dist/cli/index.js sync-to --from openclaw --to claude --scope workspace",
35
- "sync:openclaw:gemini": "npm run build && node dist/cli/index.js sync-to --from openclaw --to gemini --scope workspace",
36
- "sync:openclaw:opencode": "npm run build && node dist/cli/index.js sync-to --from openclaw --to opencode --scope workspace",
37
- "sync:openclaw:cursor": "npm run build && node dist/cli/index.js sync-to --from openclaw --to cursor --scope workspace",
38
- "sync:openclaw:github-copilot": "npm run build && node dist/cli/index.js sync-to --from openclaw --to github-copilot --scope workspace",
39
- "sync:openclaw:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from openclaw --to github-copilot-cli --scope workspace",
40
- "sync:opencode:claude": "npm run build && node dist/cli/index.js sync-to --from opencode --to claude --scope workspace",
41
- "sync:opencode:gemini": "npm run build && node dist/cli/index.js sync-to --from opencode --to gemini --scope workspace",
42
- "sync:opencode:openclaw": "npm run build && node dist/cli/index.js sync-to --from opencode --to openclaw --scope workspace",
43
- "sync:opencode:cursor": "npm run build && node dist/cli/index.js sync-to --from opencode --to cursor --scope workspace",
44
- "sync:opencode:github-copilot": "npm run build && node dist/cli/index.js sync-to --from opencode --to github-copilot --scope workspace",
45
- "sync:opencode:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from opencode --to github-copilot-cli --scope workspace",
46
- "sync:cursor:claude": "npm run build && node dist/cli/index.js sync-to --from cursor --to claude --scope workspace",
47
- "sync:cursor:gemini": "npm run build && node dist/cli/index.js sync-to --from cursor --to gemini --scope workspace",
48
- "sync:cursor:openclaw": "npm run build && node dist/cli/index.js sync-to --from cursor --to openclaw --scope workspace",
49
- "sync:cursor:opencode": "npm run build && node dist/cli/index.js sync-to --from cursor --to opencode --scope workspace",
50
- "sync:cursor:github-copilot": "npm run build && node dist/cli/index.js sync-to --from cursor --to github-copilot --scope workspace",
51
- "sync:cursor:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from cursor --to github-copilot-cli --scope workspace",
52
- "sync:github-copilot:claude": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to claude --scope workspace",
53
- "sync:github-copilot:gemini": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to gemini --scope workspace",
54
- "sync:github-copilot:openclaw": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to openclaw --scope workspace",
55
- "sync:github-copilot:opencode": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to opencode --scope workspace",
56
- "sync:github-copilot:cursor": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to cursor --scope workspace",
57
- "sync:github-copilot:github-copilot-cli": "npm run build && node dist/cli/index.js sync-to --from github-copilot --to github-copilot-cli --scope workspace",
58
- "sync:github-copilot-cli:claude": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to claude --scope workspace",
59
- "sync:github-copilot-cli:gemini": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to gemini --scope workspace",
60
- "sync:github-copilot-cli:openclaw": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to openclaw --scope workspace",
61
- "sync:github-copilot-cli:opencode": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to opencode --scope workspace",
62
- "sync:github-copilot-cli:cursor": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to cursor --scope workspace",
63
- "sync:github-copilot-cli:github-copilot": "npm run build && node dist/cli/index.js sync-to --from github-copilot-cli --to github-copilot --scope workspace",
30
+ "start": "node dist/apps/cli/src/index.js",
31
+ "sync": "npm run build && node dist/apps/cli/src/index.js sync",
32
+ "watch": "npm run build && node dist/apps/cli/src/index.js watch",
33
+ "sync:claude:gemini": "npm run build && node dist/apps/cli/src/index.js sync-to --from claude --to gemini",
34
+ "sync:claude:openclaw": "npm run build && node dist/apps/cli/src/index.js sync-to --from claude --to openclaw",
35
+ "sync:claude:opencode": "npm run build && node dist/apps/cli/src/index.js sync-to --from claude --to opencode",
36
+ "sync:claude:cursor": "npm run build && node dist/apps/cli/src/index.js sync-to --from claude --to cursor",
37
+ "sync:claude:github-copilot": "npm run build && node dist/apps/cli/src/index.js sync-to --from claude --to github-copilot",
38
+ "sync:claude:github-copilot-cli": "npm run build && node dist/apps/cli/src/index.js sync-to --from claude --to github-copilot-cli",
39
+ "sync:gemini:claude": "npm run build && node dist/apps/cli/src/index.js sync-to --from gemini --to claude",
40
+ "sync:gemini:openclaw": "npm run build && node dist/apps/cli/src/index.js sync-to --from gemini --to openclaw",
41
+ "sync:gemini:opencode": "npm run build && node dist/apps/cli/src/index.js sync-to --from gemini --to opencode",
42
+ "sync:gemini:cursor": "npm run build && node dist/apps/cli/src/index.js sync-to --from gemini --to cursor",
43
+ "sync:gemini:github-copilot": "npm run build && node dist/apps/cli/src/index.js sync-to --from gemini --to github-copilot",
44
+ "sync:gemini:github-copilot-cli": "npm run build && node dist/apps/cli/src/index.js sync-to --from gemini --to github-copilot-cli",
45
+ "sync:openclaw:claude": "npm run build && node dist/apps/cli/src/index.js sync-to --from openclaw --to claude",
46
+ "sync:openclaw:gemini": "npm run build && node dist/apps/cli/src/index.js sync-to --from openclaw --to gemini",
47
+ "sync:openclaw:opencode": "npm run build && node dist/apps/cli/src/index.js sync-to --from openclaw --to opencode",
48
+ "sync:openclaw:cursor": "npm run build && node dist/apps/cli/src/index.js sync-to --from openclaw --to cursor",
49
+ "sync:openclaw:github-copilot": "npm run build && node dist/apps/cli/src/index.js sync-to --from openclaw --to github-copilot",
50
+ "sync:openclaw:github-copilot-cli": "npm run build && node dist/apps/cli/src/index.js sync-to --from openclaw --to github-copilot-cli",
51
+ "sync:opencode:claude": "npm run build && node dist/apps/cli/src/index.js sync-to --from opencode --to claude",
52
+ "sync:opencode:gemini": "npm run build && node dist/apps/cli/src/index.js sync-to --from opencode --to gemini",
53
+ "sync:opencode:openclaw": "npm run build && node dist/apps/cli/src/index.js sync-to --from opencode --to openclaw",
54
+ "sync:opencode:cursor": "npm run build && node dist/apps/cli/src/index.js sync-to --from opencode --to cursor",
55
+ "sync:opencode:github-copilot": "npm run build && node dist/apps/cli/src/index.js sync-to --from opencode --to github-copilot",
56
+ "sync:opencode:github-copilot-cli": "npm run build && node dist/apps/cli/src/index.js sync-to --from opencode --to github-copilot-cli",
57
+ "sync:cursor:claude": "npm run build && node dist/apps/cli/src/index.js sync-to --from cursor --to claude",
58
+ "sync:cursor:gemini": "npm run build && node dist/apps/cli/src/index.js sync-to --from cursor --to gemini",
59
+ "sync:cursor:openclaw": "npm run build && node dist/apps/cli/src/index.js sync-to --from cursor --to openclaw",
60
+ "sync:cursor:opencode": "npm run build && node dist/apps/cli/src/index.js sync-to --from cursor --to opencode",
61
+ "sync:cursor:github-copilot": "npm run build && node dist/apps/cli/src/index.js sync-to --from cursor --to github-copilot",
62
+ "sync:cursor:github-copilot-cli": "npm run build && node dist/apps/cli/src/index.js sync-to --from cursor --to github-copilot-cli",
63
+ "sync:github-copilot:claude": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot --to claude",
64
+ "sync:github-copilot:gemini": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot --to gemini",
65
+ "sync:github-copilot:openclaw": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot --to openclaw",
66
+ "sync:github-copilot:opencode": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot --to opencode",
67
+ "sync:github-copilot:cursor": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot --to cursor",
68
+ "sync:github-copilot:github-copilot-cli": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot --to github-copilot-cli",
69
+ "sync:github-copilot-cli:claude": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot-cli --to claude",
70
+ "sync:github-copilot-cli:gemini": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot-cli --to gemini",
71
+ "sync:github-copilot-cli:openclaw": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot-cli --to openclaw",
72
+ "sync:github-copilot-cli:opencode": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot-cli --to opencode",
73
+ "sync:github-copilot-cli:cursor": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot-cli --to cursor",
74
+ "sync:github-copilot-cli:github-copilot": "npm run build && node dist/apps/cli/src/index.js sync-to --from github-copilot-cli --to github-copilot",
64
75
  "test": "vitest",
65
76
  "test:run": "vitest run",
66
77
  "test:watch": "vitest --watch",
@@ -72,21 +83,23 @@
72
83
  "docs": "cd docs && npm run start",
73
84
  "docs:install": "npm --prefix docs install",
74
85
  "docs:build": "cd docs && npm run build",
75
- "visualizer": "npm run visualizer:install && npm run visualizer:build && npm run build && node dist/cli/index.js visualizer --scope workspace",
86
+ "visualizer": "npm run visualizer:install && npm run build && node dist/apps/cli/src/index.js visualizer",
76
87
  "ui": "npm run visualizer",
77
- "visualizer:install": "npm --prefix src/visualizer install",
78
- "visualizer:dev": "npm --prefix src/visualizer run dev",
79
- "visualizer:build": "npm --prefix src/visualizer run build",
80
- "visualizer:preview": "npm --prefix src/visualizer run preview",
88
+ "visualizer:install": "npm --prefix apps/visualizer install",
89
+ "visualizer:dev": "npm --prefix apps/visualizer run dev",
90
+ "visualizer:build": "npm --prefix apps/visualizer run build",
91
+ "visualizer:preview": "npm --prefix apps/visualizer run preview",
81
92
  "lint": "tsc --noEmit",
82
93
  "lint:check": "tsc --noEmit",
83
- "lint:fix": "tsc --noEmit && prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
84
- "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" \".prettierrc\"",
85
- "format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \".prettierrc\"",
94
+ "lint:fix": "tsc --noEmit && prettier --write \"apps/cli/src/**/*.ts\" \"apps/visualizer/src/**/*.{ts,tsx}\" \"packages/**/*.ts\" \"tests/**/*.ts\"",
95
+ "format": "prettier --write \"apps/cli/src/**/*.ts\" \"apps/visualizer/src/**/*.{ts,tsx}\" \"packages/**/*.ts\" \"tests/**/*.ts\" \".prettierrc\"",
96
+ "format:check": "prettier --check \"apps/cli/src/**/*.ts\" \"apps/visualizer/src/**/*.{ts,tsx}\" \"packages/**/*.ts\" \"tests/**/*.ts\" \".prettierrc\"",
86
97
  "type:check": "tsc --noEmit",
87
- "type:fix": "tsc --noEmit && prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
98
+ "type:fix": "tsc --noEmit && prettier --write \"apps/cli/src/**/*.ts\" \"apps/visualizer/src/**/*.{ts,tsx}\" \"packages/**/*.ts\" \"tests/**/*.ts\"",
88
99
  "check": "npm run type:check && npm run format:check",
89
100
  "fix": "npm run format && npm run lint:fix",
101
+ "changelog": "node scripts/release.mjs changelog",
102
+ "release": "node scripts/release.mjs release",
90
103
  "clean": "node -e \"['dist', '.nyc_output', 'output', 'coverage'].forEach(p => require('fs').rmSync(p, { recursive: true, force: true }))\"",
91
104
  "all": "npm run clean && npm run build && npm run check && npm test"
92
105
  },
@@ -110,6 +123,7 @@
110
123
  "devDependencies": {
111
124
  "@ai-hero/sandcastle": "^0.6.6",
112
125
  "@types/node": "^20.10.6",
126
+ "@types/prompts": "^2.4.9",
113
127
  "@types/ws": "^8.18.1",
114
128
  "@vitest/coverage-v8": "^1.6.1",
115
129
  "@vitest/ui": "^1.0.0",
@@ -1,65 +0,0 @@
1
- import { RegistryManager } from '../../core/registry.js';
2
- import { section, success, error, spacer, info } from '../../utils/cli-output.js';
3
- import { getRegistryPath } from '../../utils/paths.js';
4
- import { fileExists } from '../../utils/fs.js';
5
- export async function configCommand(options) {
6
- try {
7
- // Determine current scope
8
- const userPath = getRegistryPath('user');
9
- const workspacePath = getRegistryPath('workspace');
10
- const userExists = await fileExists(userPath);
11
- const workspaceExists = await fileExists(workspacePath);
12
- let currentScope = 'user';
13
- if (workspaceExists && !userExists) {
14
- currentScope = 'workspace';
15
- }
16
- // Show current config
17
- if (options.show) {
18
- section('Current Configuration');
19
- spacer();
20
- info(`Scope: ${currentScope}`);
21
- info(`Registry: ${getRegistryPath(currentScope)}`);
22
- spacer();
23
- return;
24
- }
25
- // Change scope if requested
26
- if (options.scope) {
27
- const newScope = options.scope;
28
- if (newScope !== 'user' && newScope !== 'workspace') {
29
- error('Invalid scope. Use: user or workspace');
30
- process.exit(1);
31
- }
32
- const registry = new RegistryManager(currentScope);
33
- // Load existing registry if it exists, otherwise it will be created on first sync
34
- if ((currentScope === 'user' && userExists) ||
35
- (currentScope === 'workspace' && workspaceExists)) {
36
- await registry.load();
37
- }
38
- else {
39
- // Create empty registry
40
- await registry.load();
41
- }
42
- // Change scope and save
43
- registry.setScope(newScope);
44
- await registry.save();
45
- success(`Scope changed to: ${newScope}`);
46
- info(`Registry: ${getRegistryPath(newScope)}`);
47
- spacer();
48
- return;
49
- }
50
- // If no option provided, show current config
51
- section('Current Configuration');
52
- spacer();
53
- info(`Scope: ${currentScope}`);
54
- info(`Registry: ${getRegistryPath(currentScope)}`);
55
- spacer();
56
- console.log('Usage:');
57
- console.log(' waslagenie config --scope user # Store registry in ~/.waslagenie/');
58
- console.log(' waslagenie config --scope workspace # Store registry in .waslagenie/');
59
- console.log(' waslagenie config --show # Show current config');
60
- }
61
- catch (err) {
62
- error(`Config failed: ${err}`);
63
- process.exit(1);
64
- }
65
- }
@@ -1,5 +0,0 @@
1
- interface StatusOptions {
2
- scope?: string;
3
- }
4
- export declare function statusCommand(options: StatusOptions): Promise<void>;
5
- export {};
@@ -1,36 +0,0 @@
1
- import { RegistryManager } from '../../core/registry.js';
2
- import { section, error, spacer, table } from '../../utils/cli-output.js';
3
- import { fileExists } from '../../utils/fs.js';
4
- import { getRegistryPath } from '../../utils/paths.js';
5
- export async function statusCommand(options) {
6
- try {
7
- const scope = (options.scope || 'workspace');
8
- const registryPath = getRegistryPath(scope);
9
- if (!(await fileExists(registryPath))) {
10
- error('Registry not found. Run: waslagenie sync');
11
- process.exit(1);
12
- }
13
- const registry = new RegistryManager(scope);
14
- await registry.load();
15
- const registryData = registry.get();
16
- if (registryData.assets.length === 0) {
17
- section('No assets synced yet');
18
- spacer();
19
- return;
20
- }
21
- section('Synced Assets');
22
- spacer();
23
- const rows = registryData.assets.map((asset) => [
24
- asset.name,
25
- asset.type,
26
- asset.stubs.map((s) => s.tool).join(', ') || 'none',
27
- new Date(asset.last_modified_at).toLocaleString(),
28
- ]);
29
- table([['ASSET', 'TYPE', 'STUBS', 'LAST MODIFIED'], ...rows.map((row) => row.map(String))], [20, 8, 20, 24]);
30
- spacer();
31
- }
32
- catch (err) {
33
- error(`Status check failed: ${err}`);
34
- process.exit(1);
35
- }
36
- }
@@ -1,5 +0,0 @@
1
- interface SyncOptions {
2
- scope?: string;
3
- }
4
- export declare function syncCommand(options: SyncOptions): Promise<void>;
5
- export {};
@@ -1,26 +0,0 @@
1
- import { RegistryManager } from '../../core/registry.js';
2
- import { Scanner } from '../../core/scanner.js';
3
- import { Syncer } from '../../syncer/index.js';
4
- import { section, error, highlight, spacer } from '../../utils/cli-output.js';
5
- export async function syncCommand(options) {
6
- try {
7
- const scope = (options.scope || 'workspace');
8
- section('Scanning...');
9
- spacer();
10
- const registry = new RegistryManager(scope);
11
- await registry.load();
12
- const scanner = new Scanner(scope);
13
- const syncer = new Syncer(registry, scanner, scope);
14
- const result = await syncer.sync(true);
15
- spacer();
16
- highlight('Sync complete!');
17
- console.log(' Note: sync only mirrors assets. It does not install helper skills.');
18
- console.log(` ${result.assetsDiscovered} assets discovered`);
19
- console.log(` ${result.stubsWritten} stubs written`);
20
- console.log(` ${result.stubsDeleted} stubs deleted`);
21
- }
22
- catch (err) {
23
- error(`Sync failed: ${err}`);
24
- process.exit(1);
25
- }
26
- }
@@ -1,5 +0,0 @@
1
- interface WatchOptions {
2
- scope?: string;
3
- }
4
- export declare function watchCommand(options: WatchOptions): Promise<void>;
5
- export {};
@@ -1,44 +0,0 @@
1
- export function success(message) {
2
- console.log(`✔ ${message}`);
3
- }
4
- export function error(message) {
5
- console.error(`✗ ${message}`);
6
- }
7
- export function info(message) {
8
- console.log(`ℹ ${message}`);
9
- }
10
- export function warning(message) {
11
- console.log(`⚠ ${message}`);
12
- }
13
- export function highlight(message) {
14
- console.log(`✨ ${message}`);
15
- }
16
- export function step(title) {
17
- console.log(`\n${title}`);
18
- }
19
- export function section(title) {
20
- console.log(`\n🔍 ${title}`);
21
- }
22
- export function table(rows, columnWidths) {
23
- if (rows.length === 0)
24
- return;
25
- // Calculate column widths if not provided
26
- const widths = columnWidths ||
27
- rows[0].map((_, i) => {
28
- return Math.max(...rows.map((row) => (row[i] || '').length));
29
- });
30
- rows.forEach((row) => {
31
- const line = row.map((cell, i) => (cell || '').padEnd(widths[i] || 10)).join(' ');
32
- console.log(line);
33
- });
34
- }
35
- export function spacer() {
36
- console.log('');
37
- }
38
- export function bulletPoint(text, indent = 0) {
39
- const spaces = ' '.repeat(indent);
40
- console.log(`${spaces}• ${text}`);
41
- }
42
- export function code(text) {
43
- return `\`${text}\``;
44
- }