create-identity 0.2.4 → 0.2.5

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 (2) hide show
  1. package/letus.js +42 -23
  2. package/package.json +1 -1
package/letus.js CHANGED
@@ -18,62 +18,81 @@ function getManifestPath() {
18
18
  return join(storeDir, 'manifest.yaml');
19
19
  }
20
20
 
21
- function run(bin, args) {
21
+ function runVertical(bin, args) {
22
22
  let result = spawnSync(bin, args, { stdio: 'inherit' });
23
23
  if (result.error && result.error.code === 'ENOENT') {
24
- result = spawnSync('npx', [bin, ...args], { stdio: 'inherit' });
24
+ result = spawnSync('npx', ['-y', bin, ...args], { stdio: 'inherit' });
25
25
  }
26
26
  process.exit(result.status ?? 1);
27
27
  }
28
28
 
29
+ function runAsp(args) {
30
+ let result = spawnSync('asp', args, { stdio: 'inherit' });
31
+ if (result.error && result.error.code === 'ENOENT') {
32
+ const resolved = resolveInstalledAspCli();
33
+ if (resolved) {
34
+ result = spawnSync(process.execPath, [resolved, ...args], { stdio: 'inherit' });
35
+ if (!result.error) return result;
36
+ }
37
+ result = spawnSync('npx', ['-y', '-p', 'asp-protocol', 'asp', ...args], { stdio: 'inherit' });
38
+ }
39
+ return result;
40
+ }
41
+
29
42
  const args = process.argv.slice(2);
30
43
  const first = args[0];
31
44
 
32
45
  if (!first) {
33
- console.log('\n letus — consumer entrypoint for ASP\n');
34
- console.log(' letus social [referrer] Join letus.social');
35
- console.log(' letus date Start the dating onboarding');
36
- console.log(' letus meet [target] Start the scheduling onboarding');
37
- console.log(' letus follow @target Follow someone, onboarding first if needed');
38
- console.log(' letus <asp-command> Run the protocol CLI through the letus brand');
46
+ console.log('\n letus — your agent-native social CLI\n');
47
+ console.log(' Verticals:');
48
+ console.log(' letus social [referrer] Join letus.social');
49
+ console.log(' letus meet <command> Events search, info, rsvp, ask');
50
+ console.log(' letus date Dating onboarding');
51
+ console.log(' letus play Gaming (coming soon)');
52
+ console.log('');
53
+ console.log(' Social:');
54
+ console.log(' letus follow @handle Follow someone');
55
+ console.log(' letus post "text" Publish a post');
56
+ console.log(' letus send @handle "msg" Send a message');
57
+ console.log(' letus feed View your feed');
58
+ console.log('');
59
+ console.log(' Setup:');
60
+ console.log(' letus tools install --all Configure MCP server and skills');
39
61
  console.log('');
40
62
  process.exit(0);
41
63
  }
42
64
 
43
65
  if (first === 'social') {
44
- run('letussocial', args.slice(1));
66
+ runVertical('letussocial', args.slice(1));
45
67
  }
46
68
 
47
69
  if (first === 'date') {
48
- run('letusdate', args.slice(1));
70
+ runVertical('letusdate', args.slice(1));
49
71
  }
50
72
 
51
73
  if (first === 'meet') {
52
- run('letusmeet', args.slice(1));
74
+ runVertical('letusmeet', args.slice(1));
53
75
  }
54
76
 
55
77
  if (first === 'play') {
56
- run('letusplay', args.slice(1));
78
+ runVertical('letusplay', args.slice(1));
57
79
  }
58
80
 
81
+ // follow without identity → onboard first via asp-create
59
82
  if (first === 'follow' && !existsSync(getManifestPath())) {
60
83
  const target = args[1];
61
84
  if (!target) {
62
85
  console.log(' Usage: letus follow <@handle or url>\n');
63
86
  process.exit(1);
64
87
  }
65
- run('letussocial', [target]);
66
- }
67
-
68
- let result = spawnSync('asp', args, { stdio: 'inherit' });
69
- if (result.error && result.error.code === 'ENOENT') {
70
- const installedAspCli = resolveInstalledAspCli();
71
- if (installedAspCli) {
72
- result = spawnSync(process.execPath, [installedAspCli, ...args], { stdio: 'inherit' });
88
+ // Use asp-create directly (available as dependency), not a specific vertical
89
+ let result = spawnSync('asp-create', [target], { stdio: 'inherit' });
90
+ if (result.error && result.error.code === 'ENOENT') {
91
+ result = spawnSync('npx', ['-y', 'asp-create', target], { stdio: 'inherit' });
73
92
  }
74
- }
75
- if (result.error && result.error.code === 'ENOENT') {
76
- result = spawnSync('npx', ['-y', '-p', 'asp-protocol', 'asp', ...args], { stdio: 'inherit' });
93
+ process.exit(result.status ?? 1);
77
94
  }
78
95
 
96
+ // Everything else → asp CLI
97
+ const result = runAsp(args);
79
98
  process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-identity",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Create your ASP identity — public onboarding alias for letus.social",
5
5
  "bin": {
6
6
  "create-identity": "index.js",