@crabspace/cli 0.2.17 → 0.2.19

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/commands/init.js CHANGED
@@ -204,6 +204,13 @@ crabspace verify --recent
204
204
  This decrypts your last 7 entries from your Isnad Chain. Your \`will\` entry is always shown first.
205
205
  Use \`--recent 14\` for more context. The hard drive loads before the RAM.
206
206
 
207
+ ## Maintenance
208
+ Keep your CLI current — new features ship regularly:
209
+ \`\`\`bash
210
+ npm install -g @crabspace/cli@latest
211
+ \`\`\`
212
+ \`crabspace verify\` will warn you automatically if an update is available.
213
+
207
214
  ## Coordination (Multi-Agent)
208
215
  Other agents may share your wallet. To see what your team has done:
209
216
  \`\`\`
@@ -67,4 +67,25 @@ export async function status(args) {
67
67
  console.log('');
68
68
  console.log(` 📄 View: ${apiUrl}/isnad/${config.wallet}`);
69
69
  console.log('');
70
+
71
+ // ─── Background version check ────────────────────────────────────────────
72
+ try {
73
+ const pkgRes = await fetch('https://registry.npmjs.org/@crabspace/cli/latest',
74
+ { signal: AbortSignal.timeout(3000) });
75
+ if (pkgRes.ok) {
76
+ const { version: latest } = await pkgRes.json();
77
+ const { readFileSync } = await import('fs');
78
+ const { fileURLToPath } = await import('url');
79
+ const { dirname, join } = await import('path');
80
+ const __dir = dirname(fileURLToPath(import.meta.url));
81
+ const { version: current } = JSON.parse(readFileSync(join(__dir, '../package.json'), 'utf-8'));
82
+ if (latest && current && latest !== current) {
83
+ console.log(`\x1b[33m⚠️ Update available: v${latest} (you have v${current})\x1b[0m`);
84
+ console.log(`\x1b[33m npm install -g @crabspace/cli@latest\x1b[0m`);
85
+ console.log('');
86
+ }
87
+ }
88
+ } catch {
89
+ // Version check is best-effort — never block or crash
90
+ }
70
91
  }
@@ -109,10 +109,10 @@ export async function verify(args) {
109
109
  console.log('✅ Identity verified.');
110
110
  console.log('');
111
111
  console.log(' ┌─────────────────────────────────────────┐');
112
- console.log(` │ Agent: ${(data.agent_name || 'Unknown').padEnd(27)}│`);
112
+ console.log(` │ Agent: ${(data.agent?.name || 'Unknown').padEnd(27)}│`);
113
113
  console.log(` │ Wallet: ${config.wallet.slice(0, 8)}...${config.wallet.slice(-4)} │`);
114
- console.log(` │ Registered: ${(data.registered_at || 'Unknown').slice(0, 10).padEnd(27)}│`);
115
- console.log(` │ Work Count: ${String(data.work_count || 0).padEnd(27)}│`);
114
+ console.log(` │ Registered: ${(data.agent?.created_at || 'Unknown').slice(0, 10).padEnd(27)}│`);
115
+ console.log(` │ Work Count: ${String(data.agent?.total_work_entries ?? 0).padEnd(27)}│`);
116
116
  console.log(` │ Claimed: ${(data.agent?.claimed_at ? '✓ Yes' : '✗ No — run: crabspace claim <email>').padEnd(27)}│`);
117
117
  console.log(' └─────────────────────────────────────────┘');
118
118
 
@@ -268,4 +268,25 @@ export async function verify(args) {
268
268
  console.log('\x1b[90m' + '━'.repeat(58) + '\x1b[0m');
269
269
  console.log('');
270
270
  }
271
+
272
+ // ─── Background version check ────────────────────────────────────────────
273
+ try {
274
+ const pkgRes = await fetch('https://registry.npmjs.org/@crabspace/cli/latest',
275
+ { signal: AbortSignal.timeout(3000) });
276
+ if (pkgRes.ok) {
277
+ const { version: latest } = await pkgRes.json();
278
+ const { readFileSync } = await import('fs');
279
+ const { fileURLToPath } = await import('url');
280
+ const { dirname, join } = await import('path');
281
+ const __dir = dirname(fileURLToPath(import.meta.url));
282
+ const { version: current } = JSON.parse(readFileSync(join(__dir, '../package.json'), 'utf-8'));
283
+ if (latest && current && latest !== current) {
284
+ console.log(`\x1b[33m⚠️ Update available: v${latest} (you have v${current})\x1b[0m`);
285
+ console.log(`\x1b[33m npm install -g @crabspace/cli@latest\x1b[0m`);
286
+ console.log('');
287
+ }
288
+ }
289
+ } catch {
290
+ // Version check is best-effort — never block or crash
291
+ }
271
292
  }
package/index.js CHANGED
@@ -52,7 +52,7 @@ function parseArgs(argv) {
52
52
 
53
53
  async function main() {
54
54
  console.log('');
55
- console.log('🦀 CrabSpace CLI v0.2.16');
55
+ console.log('🦀 CrabSpace CLI v0.2.19');
56
56
  console.log('');
57
57
 
58
58
  // Silent boot pre-hook — runs before every command except init/boot/bootstrap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crabspace/cli",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "description": "Identity persistence for AI agents. Register, log work, anchor on-chain.",
5
5
  "bin": {
6
6
  "crabspace": "index.js"