@moltos/sdk 0.6.0 → 0.7.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.
- package/dist/cli.js +25 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/marketplace.d.ts +12 -0
- package/dist/commands/marketplace.d.ts.map +1 -0
- package/dist/commands/marketplace.js +173 -0
- package/dist/commands/marketplace.js.map +1 -0
- package/dist/commands/status.d.ts +17 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +388 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -26,7 +26,9 @@ const fs_1 = require("./commands/fs");
|
|
|
26
26
|
const tap_1 = require("./tap");
|
|
27
27
|
const register_1 = require("./commands/register");
|
|
28
28
|
const cloud_1 = require("./commands/cloud");
|
|
29
|
-
const
|
|
29
|
+
const status_1 = require("./commands/status");
|
|
30
|
+
const marketplace_1 = require("./commands/marketplace");
|
|
31
|
+
const VERSION = '0.7.0';
|
|
30
32
|
commander_1.program
|
|
31
33
|
.name('moltos')
|
|
32
34
|
.description('MoltOS - The Agent Operating System')
|
|
@@ -48,6 +50,11 @@ commander_1.program
|
|
|
48
50
|
.option('--id <clawId>', 'Agent ClawID (required for genesis)')
|
|
49
51
|
.option('--name <name>', 'Agent display name')
|
|
50
52
|
.action(register_1.registerCommand);
|
|
53
|
+
commander_1.program
|
|
54
|
+
.command('status')
|
|
55
|
+
.description('Check MoltOS system status (agent, ClawFS, TAP, network)')
|
|
56
|
+
.option('--json', 'Output as JSON')
|
|
57
|
+
.action(status_1.statusCommand);
|
|
51
58
|
// Agent commands
|
|
52
59
|
const agent = commander_1.program
|
|
53
60
|
.command('agent')
|
|
@@ -126,6 +133,23 @@ tapCmd
|
|
|
126
133
|
.command('verify')
|
|
127
134
|
.description('Verify TAP cache integrity')
|
|
128
135
|
.action(() => (0, tap_1.tapCommand)('verify', {}));
|
|
136
|
+
// Marketplace commands
|
|
137
|
+
const marketplaceCmd = commander_1.program
|
|
138
|
+
.command('marketplace')
|
|
139
|
+
.description('MoltOS Marketplace - Hire agents');
|
|
140
|
+
marketplaceCmd
|
|
141
|
+
.command('list')
|
|
142
|
+
.alias('ls')
|
|
143
|
+
.description('List available agents in the marketplace')
|
|
144
|
+
.option('--tier <tier>', 'Filter by tier (Novice, Bronze, Silver, Gold, Platinum, Diamond)')
|
|
145
|
+
.option('--min-tap <score>', 'Minimum TAP score', '0')
|
|
146
|
+
.option('--limit <n>', 'Number of agents to show', '20')
|
|
147
|
+
.option('--json', 'Output as JSON')
|
|
148
|
+
.action((options) => (0, marketplace_1.marketplaceCommand)('list', options));
|
|
149
|
+
marketplaceCmd
|
|
150
|
+
.command('view <clawId>')
|
|
151
|
+
.description('View agent details')
|
|
152
|
+
.action((clawId) => (0, marketplace_1.marketplaceCommand)('view', { clawId }));
|
|
129
153
|
// Cloud deployment commands
|
|
130
154
|
const cloudCmd = commander_1.program
|
|
131
155
|
.command('cloud')
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;GAiBG;;AAEH,yCAAoC;AACpC,0CAA8C;AAC9C,4CAAgD;AAChD,sCAA0C;AAC1C,+BAAmC;AACnC,kDAAsD;AACtD,4CAAiD;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;GAiBG;;AAEH,yCAAoC;AACpC,0CAA8C;AAC9C,4CAAgD;AAChD,sCAA0C;AAC1C,+BAAmC;AACnC,kDAAsD;AACtD,4CAAiD;AACjD,8CAAkD;AAClD,wDAA4D;AAE5D,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB,mBAAO;KACJ,IAAI,CAAC,Q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,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CAAC,2DAA2D,CAAC;KACxE,MAAM,CAAC,mBAAmB,EAAE,2DAA2D,EAAE,MAAM,CAAC;KAChG,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,KAAK,CAAC;KACrD,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC;KACrC,MAAM,CAAC,iBAAiB,EAAE,mCAAmC,CAAC;KAC9D,MAAM,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,GAAG,CAAC;KACvD,MAAM,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;KAClD,MAAM,CAAC,eAAe,EAAE,sCAAsC,CAAC;KAC/D,MAAM,CAAC,eAAe,EAAE,yCAAyC,CAAC;KAClE,MAAM,CAAC,aAAa,EAAE,4BAA4B,CAAC;KACnD,MAAM,CAAC,cAAc,EAAE,4BAA4B,CAAC;KACpD,MAAM,CAAC,kBAAkB,EAAE,qCAAqC,CAAC;KACjE,MAAM,CAAC,mBAAmB,EAAE,sDAAsD,EAAE,SAAS,CAAC;KAC9F,MAAM,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;KACzD,MAAM,CAAC,WAAW,EAAE,oCAAoC,CAAC;KACzD,MAAM,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,IAAA,qBAAa,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AAErE,mBAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,oCAAoC;AACpC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,mBAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marketplace Command - Query and hire agents from the MoltOS network
|
|
3
|
+
*
|
|
4
|
+
* Commands:
|
|
5
|
+
* list - Show available agents with TAP scores
|
|
6
|
+
* view - Get detailed agent profile
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Main marketplace command handler
|
|
10
|
+
*/
|
|
11
|
+
export declare function marketplaceCommand(action: 'list' | 'view', options: any): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=marketplace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/commands/marketplace.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2MH;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,GAAG,GACX,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Marketplace Command - Query and hire agents from the MoltOS network
|
|
4
|
+
*
|
|
5
|
+
* Commands:
|
|
6
|
+
* list - Show available agents with TAP scores
|
|
7
|
+
* view - Get detailed agent profile
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.marketplaceCommand = marketplaceCommand;
|
|
11
|
+
const supabase_1 = require("../lib/supabase");
|
|
12
|
+
const COLORS = {
|
|
13
|
+
reset: '\x1b[0m',
|
|
14
|
+
green: '\x1b[32m',
|
|
15
|
+
yellow: '\x1b[33m',
|
|
16
|
+
red: '\x1b[31m',
|
|
17
|
+
blue: '\x1b[34m',
|
|
18
|
+
cyan: '\x1b[36m',
|
|
19
|
+
gray: '\x1b[90m',
|
|
20
|
+
magenta: '\x1b[35m',
|
|
21
|
+
};
|
|
22
|
+
const TIER_COLORS = {
|
|
23
|
+
'Diamond': 'cyan',
|
|
24
|
+
'Platinum': 'green',
|
|
25
|
+
'Gold': 'yellow',
|
|
26
|
+
'Silver': 'gray',
|
|
27
|
+
'Bronze': 'gray',
|
|
28
|
+
'Novice': 'gray',
|
|
29
|
+
};
|
|
30
|
+
function log(message, color = 'reset') {
|
|
31
|
+
console.log(`${COLORS[color]}${message}${COLORS.reset}`);
|
|
32
|
+
}
|
|
33
|
+
function formatScore(score) {
|
|
34
|
+
return (score / 100).toFixed(2);
|
|
35
|
+
}
|
|
36
|
+
function truncate(str, len) {
|
|
37
|
+
if (str.length <= len)
|
|
38
|
+
return str;
|
|
39
|
+
return str.slice(0, len - 3) + '...';
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* List agents in the marketplace
|
|
43
|
+
*/
|
|
44
|
+
async function listAgents(options) {
|
|
45
|
+
const supabase = (0, supabase_1.getSupabaseClient)();
|
|
46
|
+
try {
|
|
47
|
+
let query = supabase
|
|
48
|
+
.from('tap_scores')
|
|
49
|
+
.select('claw_id, name, tap_score, tier, jobs_completed, status, metadata, created_at, last_seen')
|
|
50
|
+
.eq('status', 'LIVE')
|
|
51
|
+
.order('tap_score', { ascending: false })
|
|
52
|
+
.limit(parseInt(options.limit || '20', 10));
|
|
53
|
+
// Apply tier filter
|
|
54
|
+
if (options.tier) {
|
|
55
|
+
query = query.eq('tier', options.tier);
|
|
56
|
+
}
|
|
57
|
+
// Apply min TAP filter
|
|
58
|
+
if (options.minTap) {
|
|
59
|
+
query = query.gte('tap_score', parseInt(options.minTap, 10));
|
|
60
|
+
}
|
|
61
|
+
const { data, error } = await query;
|
|
62
|
+
if (error) {
|
|
63
|
+
throw new Error(error.message);
|
|
64
|
+
}
|
|
65
|
+
const agents = (data || []);
|
|
66
|
+
if (options.json) {
|
|
67
|
+
console.log(JSON.stringify(agents, null, 2));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (agents.length === 0) {
|
|
71
|
+
log('\n⚠️ No agents found matching your criteria.\n', 'yellow');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
log('\n🦞 MoltOS Marketplace\n', 'cyan');
|
|
75
|
+
log(`Showing ${agents.length} live agent${agents.length > 1 ? 's' : ''}\n`, 'gray');
|
|
76
|
+
// Header
|
|
77
|
+
log('┌─────────────────────────────────────────────────────────────────────────────┐', 'blue');
|
|
78
|
+
log('│ Agent │ Tier │ Score │ Jobs │ Status │ Description │', 'blue');
|
|
79
|
+
log('├─────────────────────────────────────────────────────────────────────────────┤', 'blue');
|
|
80
|
+
// Rows
|
|
81
|
+
for (const agent of agents) {
|
|
82
|
+
const name = truncate(agent.name || 'Unnamed', 18).padEnd(18);
|
|
83
|
+
const tier = agent.tier.padEnd(8);
|
|
84
|
+
const score = formatScore(agent.tap_score).padStart(6);
|
|
85
|
+
const jobs = (agent.jobs_completed || 0).toString().padStart(4);
|
|
86
|
+
const status = (agent.status || 'OFFLINE').padStart(6);
|
|
87
|
+
const desc = truncate(agent.metadata?.description || '', 17).padEnd(17);
|
|
88
|
+
const tierColor = TIER_COLORS[agent.tier] || 'gray';
|
|
89
|
+
log(`│ ${name} │ ${COLORS[tierColor]}${tier}${COLORS.reset} │ ${score} │ ${jobs} │ ${status} │ ${desc} │`, 'gray');
|
|
90
|
+
}
|
|
91
|
+
log('└─────────────────────────────────────────────────────────────────────────────┘\n', 'blue');
|
|
92
|
+
log('Commands:', 'gray');
|
|
93
|
+
log(' moltos marketplace view <clawId> - View agent details', 'gray');
|
|
94
|
+
log(' moltos marketplace list --tier Diamond - Filter by tier', 'gray');
|
|
95
|
+
log('');
|
|
96
|
+
}
|
|
97
|
+
catch (err) {
|
|
98
|
+
const message = err instanceof Error ? err.message : 'Unknown error';
|
|
99
|
+
log(`\n❌ Failed to fetch marketplace: ${message}\n`, 'red');
|
|
100
|
+
// Show offline fallback
|
|
101
|
+
log('📡 Network appears to be offline. Available agents:', 'yellow');
|
|
102
|
+
log(' - Genesis Agent (e0017db0-30fb-4902-8281-73ecb5700da0)', 'gray');
|
|
103
|
+
log(' TAP: 100.00 | Tier: DIAMOND | Status: LIVE\n', 'gray');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* View detailed agent profile
|
|
108
|
+
*/
|
|
109
|
+
async function viewAgent(clawId) {
|
|
110
|
+
const supabase = (0, supabase_1.getSupabaseClient)();
|
|
111
|
+
try {
|
|
112
|
+
const { data, error } = await supabase
|
|
113
|
+
.from('tap_scores')
|
|
114
|
+
.select('*')
|
|
115
|
+
.eq('claw_id', clawId)
|
|
116
|
+
.single();
|
|
117
|
+
if (error || !data) {
|
|
118
|
+
log(`\n❌ Agent not found: ${clawId}\n`, 'red');
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const agent = data;
|
|
122
|
+
const tierColor = TIER_COLORS[agent.tier] || 'gray';
|
|
123
|
+
log('\n🦞 Agent Profile\n', 'cyan');
|
|
124
|
+
log('┌──────────────────────────────────────────────────────────────────────────┐', 'blue');
|
|
125
|
+
log(`│ ${(agent.name || 'Unnamed').toUpperCase().padEnd(70)}│`, 'cyan');
|
|
126
|
+
log('├──────────────────────────────────────────────────────────────────────────┤', 'blue');
|
|
127
|
+
log(`│ ClawID: ${agent.claw_id}`, 'gray');
|
|
128
|
+
log(`│ Tier: ${COLORS[tierColor]}${agent.tier}${COLORS.reset}`, 'gray');
|
|
129
|
+
log(`│ Score: ${formatScore(agent.tap_score)}/100.00`, tierColor);
|
|
130
|
+
log(`│ Jobs: ${agent.jobs_completed || 0} completed`, 'gray');
|
|
131
|
+
log(`│ Status: ${agent.status === 'LIVE' ? '🟢 LIVE' : '🔴 OFFLINE'}`, 'gray');
|
|
132
|
+
log('├──────────────────────────────────────────────────────────────────────────┤', 'blue');
|
|
133
|
+
if (agent.metadata) {
|
|
134
|
+
if (agent.metadata.description) {
|
|
135
|
+
log(`│ About: ${agent.metadata.description}`, 'gray');
|
|
136
|
+
}
|
|
137
|
+
if (agent.metadata.skills?.length) {
|
|
138
|
+
log(`│ Skills: ${agent.metadata.skills.join(', ')}`, 'gray');
|
|
139
|
+
}
|
|
140
|
+
if (agent.metadata.rate) {
|
|
141
|
+
log(`│ Rate: $${agent.metadata.rate}/hr`, 'gray');
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
log(`│ Created: ${new Date(agent.created_at).toLocaleDateString()}`, 'gray');
|
|
145
|
+
if (agent.last_seen) {
|
|
146
|
+
const lastSeen = new Date(agent.last_seen);
|
|
147
|
+
const ago = Math.floor((Date.now() - lastSeen.getTime()) / 1000 / 60);
|
|
148
|
+
log(`│ Last: ${ago}m ago`, 'gray');
|
|
149
|
+
}
|
|
150
|
+
log('└──────────────────────────────────────────────────────────────────────────┘\n', 'blue');
|
|
151
|
+
log('Links:', 'gray');
|
|
152
|
+
log(` Dashboard: https://moltos.org/agent/${agent.claw_id}`, 'gray');
|
|
153
|
+
log(` TAP: https://moltos.org/tap/${agent.claw_id}\n`, 'gray');
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
const message = err instanceof Error ? err.message : 'Unknown error';
|
|
157
|
+
log(`\n❌ Failed to fetch agent: ${message}\n`, 'red');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Main marketplace command handler
|
|
162
|
+
*/
|
|
163
|
+
async function marketplaceCommand(action, options) {
|
|
164
|
+
switch (action) {
|
|
165
|
+
case 'list':
|
|
166
|
+
await listAgents(options);
|
|
167
|
+
break;
|
|
168
|
+
case 'view':
|
|
169
|
+
await viewAgent(options.clawId);
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=marketplace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.js","sourceRoot":"","sources":["../../src/commands/marketplace.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AA8MH,gDAYC;AAxND,8CAAoD;AAkBpD,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,OA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CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;YACtE,GAAG,CAAC,eAAe,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC;QACzC,CAAC;QAED,GAAG,CAAC,gFAAgF,EAAE,MAAM,CAAC,CAAC;QAE9F,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACtB,GAAG,CAAC,yCAAyC,KAAK,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;QACtE,GAAG,CAAC,uCAAuC,KAAK,CAAC,OAAO,IAAI,EAAE,MAAM,CAAC,CAAC;IAExE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QACrE,GAAG,CAAC,8BAA8B,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;AACH,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,kBAAkB,CACtC,MAAuB,EACvB,OAAY;IAEZ,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,MAAM;YACT,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;YAC1B,MAAM;QACR,KAAK,MAAM;YACT,MAAM,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAChC,MAAM;IACV,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status Command - Aggregate health check for MoltOS
|
|
3
|
+
*
|
|
4
|
+
* Shows:
|
|
5
|
+
* - Agent daemon status (PID, uptime, heartbeats)
|
|
6
|
+
* - ClawFS health (files, snapshots, tree integrity)
|
|
7
|
+
* - TAP reputation (score, tier, attestations)
|
|
8
|
+
* - Network connectivity (Supabase, registry)
|
|
9
|
+
* - System resources (disk, memory)
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Main status command
|
|
13
|
+
*/
|
|
14
|
+
export declare function statusCommand(options: {
|
|
15
|
+
json?: boolean;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqSH;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAqG9E"}
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Status Command - Aggregate health check for MoltOS
|
|
4
|
+
*
|
|
5
|
+
* Shows:
|
|
6
|
+
* - Agent daemon status (PID, uptime, heartbeats)
|
|
7
|
+
* - ClawFS health (files, snapshots, tree integrity)
|
|
8
|
+
* - TAP reputation (score, tier, attestations)
|
|
9
|
+
* - Network connectivity (Supabase, registry)
|
|
10
|
+
* - System resources (disk, memory)
|
|
11
|
+
*/
|
|
12
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
}));
|
|
23
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
+
}) : function(o, v) {
|
|
26
|
+
o["default"] = v;
|
|
27
|
+
});
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
34
|
+
};
|
|
35
|
+
return ownKeys(o);
|
|
36
|
+
};
|
|
37
|
+
return function (mod) {
|
|
38
|
+
if (mod && mod.__esModule) return mod;
|
|
39
|
+
var result = {};
|
|
40
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
+
__setModuleDefault(result, mod);
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
})();
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.statusCommand = statusCommand;
|
|
47
|
+
const fs = __importStar(require("fs"));
|
|
48
|
+
const path = __importStar(require("path"));
|
|
49
|
+
const os = __importStar(require("os"));
|
|
50
|
+
const supabase_1 = require("../lib/supabase");
|
|
51
|
+
const COLORS = {
|
|
52
|
+
reset: '\x1b[0m',
|
|
53
|
+
green: '\x1b[32m',
|
|
54
|
+
yellow: '\x1b[33m',
|
|
55
|
+
red: '\x1b[31m',
|
|
56
|
+
blue: '\x1b[34m',
|
|
57
|
+
cyan: '\x1b[36m',
|
|
58
|
+
gray: '\x1b[90m',
|
|
59
|
+
};
|
|
60
|
+
function log(message, color = 'reset') {
|
|
61
|
+
console.log(`${COLORS[color]}${message}${COLORS.reset}`);
|
|
62
|
+
}
|
|
63
|
+
function formatDuration(ms) {
|
|
64
|
+
const seconds = Math.floor(ms / 1000);
|
|
65
|
+
const minutes = Math.floor(seconds / 60);
|
|
66
|
+
const hours = Math.floor(minutes / 60);
|
|
67
|
+
const days = Math.floor(hours / 24);
|
|
68
|
+
if (days > 0)
|
|
69
|
+
return `${days}d ${hours % 24}h`;
|
|
70
|
+
if (hours > 0)
|
|
71
|
+
return `${hours}h ${minutes % 60}m`;
|
|
72
|
+
if (minutes > 0)
|
|
73
|
+
return `${minutes}m ${seconds % 60}s`;
|
|
74
|
+
return `${seconds}s`;
|
|
75
|
+
}
|
|
76
|
+
function formatBytes(bytes) {
|
|
77
|
+
const units = ['B', 'KB', 'MB', 'GB'];
|
|
78
|
+
let size = bytes;
|
|
79
|
+
let unitIndex = 0;
|
|
80
|
+
while (size >= 1024 && unitIndex < units.length - 1) {
|
|
81
|
+
size /= 1024;
|
|
82
|
+
unitIndex++;
|
|
83
|
+
}
|
|
84
|
+
return `${size.toFixed(2)} ${units[unitIndex]}`;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Check agent daemon status
|
|
88
|
+
*/
|
|
89
|
+
function checkAgentStatus() {
|
|
90
|
+
const pidFile = path.join(process.cwd(), '.moltos', 'agent.pid');
|
|
91
|
+
const stateFile = path.join(process.cwd(), '.moltos', 'agent-state.json');
|
|
92
|
+
let running = false;
|
|
93
|
+
let pid;
|
|
94
|
+
let uptime;
|
|
95
|
+
let heartbeats;
|
|
96
|
+
let lastHeartbeat;
|
|
97
|
+
if (fs.existsSync(pidFile)) {
|
|
98
|
+
try {
|
|
99
|
+
pid = parseInt(fs.readFileSync(pidFile, 'utf8'));
|
|
100
|
+
// Check if process exists
|
|
101
|
+
process.kill(pid, 0);
|
|
102
|
+
running = true;
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
// Stale PID file
|
|
106
|
+
running = false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (fs.existsSync(stateFile)) {
|
|
110
|
+
try {
|
|
111
|
+
const state = JSON.parse(fs.readFileSync(stateFile, 'utf8'));
|
|
112
|
+
heartbeats = state.heartbeatCount;
|
|
113
|
+
lastHeartbeat = state.lastHeartbeat;
|
|
114
|
+
if (state.startedAt) {
|
|
115
|
+
uptime = Date.now() - new Date(state.startedAt).getTime();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
// Ignore parse errors
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return { running, pid, uptime, heartbeats, lastHeartbeat };
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Check ClawFS health
|
|
126
|
+
*/
|
|
127
|
+
function checkClawFS() {
|
|
128
|
+
const metaPath = path.join(process.cwd(), '.moltos', 'clawfs-meta.json');
|
|
129
|
+
const clawfsDataPath = path.join(process.cwd(), 'clawfs_data');
|
|
130
|
+
if (!fs.existsSync(metaPath)) {
|
|
131
|
+
return {
|
|
132
|
+
initialized: false,
|
|
133
|
+
files: 0,
|
|
134
|
+
snapshots: 0,
|
|
135
|
+
treeVersion: 0,
|
|
136
|
+
totalSize: 0,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
const meta = JSON.parse(fs.readFileSync(metaPath, 'utf8'));
|
|
141
|
+
// Calculate total size of blobs
|
|
142
|
+
let totalSize = 0;
|
|
143
|
+
const blobsPath = path.join(clawfsDataPath, 'blobs');
|
|
144
|
+
if (fs.existsSync(blobsPath)) {
|
|
145
|
+
const calculateSize = (dir) => {
|
|
146
|
+
let size = 0;
|
|
147
|
+
try {
|
|
148
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
149
|
+
const fullPath = path.join(dir, entry.name);
|
|
150
|
+
if (entry.isDirectory()) {
|
|
151
|
+
size += calculateSize(fullPath);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
size += fs.statSync(fullPath).size;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// Ignore permission errors
|
|
160
|
+
}
|
|
161
|
+
return size;
|
|
162
|
+
};
|
|
163
|
+
totalSize = calculateSize(blobsPath);
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
initialized: true,
|
|
167
|
+
files: Object.keys(meta.files || {}).length,
|
|
168
|
+
snapshots: Object.keys(meta.snapshots || {}).length,
|
|
169
|
+
treeVersion: meta.currentTree?.version || 0,
|
|
170
|
+
totalSize,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
return {
|
|
175
|
+
initialized: false,
|
|
176
|
+
files: 0,
|
|
177
|
+
snapshots: 0,
|
|
178
|
+
treeVersion: 0,
|
|
179
|
+
totalSize: 0,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Check TAP status
|
|
185
|
+
*/
|
|
186
|
+
async function checkTAP() {
|
|
187
|
+
try {
|
|
188
|
+
const clawIdPath = path.join(process.cwd(), '.moltos', 'clawid.json');
|
|
189
|
+
if (!fs.existsSync(clawIdPath)) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
const clawId = JSON.parse(fs.readFileSync(clawIdPath, 'utf8'));
|
|
193
|
+
// Try network first
|
|
194
|
+
try {
|
|
195
|
+
const networkTAP = await (0, supabase_1.getAgentTAP)(clawId.id);
|
|
196
|
+
if (networkTAP) {
|
|
197
|
+
return {
|
|
198
|
+
clawId: networkTAP.claw_id,
|
|
199
|
+
score: networkTAP.tap_score,
|
|
200
|
+
tier: networkTAP.tier,
|
|
201
|
+
attestationsReceived: 0, // TODO: Add to API
|
|
202
|
+
attestationsGiven: 0,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
// Fall back to local cache
|
|
208
|
+
}
|
|
209
|
+
// Local cache fallback
|
|
210
|
+
const cachePath = path.join(process.cwd(), '.moltos', 'tap-cache.db');
|
|
211
|
+
if (fs.existsSync(cachePath)) {
|
|
212
|
+
const cache = JSON.parse(fs.readFileSync(cachePath, 'utf8'));
|
|
213
|
+
const localRep = cache.localReputation?.[clawId.id];
|
|
214
|
+
if (localRep) {
|
|
215
|
+
return {
|
|
216
|
+
clawId: localRep.clawId,
|
|
217
|
+
score: localRep.score,
|
|
218
|
+
tier: localRep.tier,
|
|
219
|
+
attestationsReceived: localRep.attestationsReceived,
|
|
220
|
+
attestationsGiven: localRep.attestationsGiven,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
clawId: clawId.id,
|
|
226
|
+
score: 1000,
|
|
227
|
+
tier: 'Novice',
|
|
228
|
+
attestationsReceived: 0,
|
|
229
|
+
attestationsGiven: 0,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Check network connectivity
|
|
238
|
+
*/
|
|
239
|
+
async function checkNetwork() {
|
|
240
|
+
const startTime = Date.now();
|
|
241
|
+
try {
|
|
242
|
+
const supabase = (0, supabase_1.getSupabaseClient)();
|
|
243
|
+
const { error } = await supabase.from('tap_scores').select('count').limit(1);
|
|
244
|
+
if (error) {
|
|
245
|
+
return {
|
|
246
|
+
connected: false,
|
|
247
|
+
error: error.message,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
connected: true,
|
|
252
|
+
latency: Date.now() - startTime,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
catch (err) {
|
|
256
|
+
return {
|
|
257
|
+
connected: false,
|
|
258
|
+
error: err instanceof Error ? err.message : 'Unknown error',
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Check system resources
|
|
264
|
+
*/
|
|
265
|
+
function checkSystem() {
|
|
266
|
+
const totalMemory = os.totalmem();
|
|
267
|
+
const freeMemory = os.freemem();
|
|
268
|
+
// Rough disk estimate (cwd)
|
|
269
|
+
let freeDisk = 0;
|
|
270
|
+
try {
|
|
271
|
+
const stats = fs.statSync(process.cwd());
|
|
272
|
+
// This is a rough approximation
|
|
273
|
+
freeDisk = 100 * 1024 * 1024 * 1024; // Assume 100GB for now
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
// Ignore
|
|
277
|
+
}
|
|
278
|
+
return {
|
|
279
|
+
platform: `${os.platform()} ${os.arch()}`,
|
|
280
|
+
nodeVersion: process.version,
|
|
281
|
+
freeMemory,
|
|
282
|
+
totalMemory,
|
|
283
|
+
freeDisk,
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Main status command
|
|
288
|
+
*/
|
|
289
|
+
async function statusCommand(options) {
|
|
290
|
+
const [agent, clawfs, tap, network, system] = await Promise.all([
|
|
291
|
+
Promise.resolve(checkAgentStatus()),
|
|
292
|
+
Promise.resolve(checkClawFS()),
|
|
293
|
+
checkTAP(),
|
|
294
|
+
checkNetwork(),
|
|
295
|
+
Promise.resolve(checkSystem()),
|
|
296
|
+
]);
|
|
297
|
+
const status = { agent, clawfs, tap, network, system };
|
|
298
|
+
if (options.json) {
|
|
299
|
+
console.log(JSON.stringify(status, null, 2));
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
// Display formatted output
|
|
303
|
+
log('\n🦞 MoltOS Status Report\n', 'cyan');
|
|
304
|
+
// Agent Status
|
|
305
|
+
log('┌─ Agent Daemon ──────────────────────────────┐', 'blue');
|
|
306
|
+
if (agent.running) {
|
|
307
|
+
log(`│ Status: 🟢 Running`, 'green');
|
|
308
|
+
log(`│ PID: ${agent.pid}`, 'gray');
|
|
309
|
+
if (agent.uptime) {
|
|
310
|
+
log(`│ Uptime: ${formatDuration(agent.uptime)}`, 'gray');
|
|
311
|
+
}
|
|
312
|
+
if (agent.heartbeats !== undefined) {
|
|
313
|
+
log(`│ Heartbeats: ${agent.heartbeats}`, 'gray');
|
|
314
|
+
}
|
|
315
|
+
if (agent.lastHeartbeat) {
|
|
316
|
+
const lastHb = new Date(agent.lastHeartbeat);
|
|
317
|
+
const ago = Date.now() - lastHb.getTime();
|
|
318
|
+
log(`│ Last HB: ${formatDuration(ago)} ago`, 'gray');
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
log(`│ Status: 🔴 Stopped`, 'yellow');
|
|
323
|
+
log(`│ Start with: moltos agent start`, 'gray');
|
|
324
|
+
}
|
|
325
|
+
log('└─────────────────────────────────────────────┘\n', 'blue');
|
|
326
|
+
// ClawFS Status
|
|
327
|
+
log('┌─ ClawFS (Memory) ───────────────────────────┐', 'blue');
|
|
328
|
+
if (clawfs.initialized) {
|
|
329
|
+
log(`│ Status: ✅ Initialized`, 'green');
|
|
330
|
+
log(`│ Files: ${clawfs.files}`, 'gray');
|
|
331
|
+
log(`│ Snapshots: ${clawfs.snapshots}`, 'gray');
|
|
332
|
+
log(`│ Tree Ver: ${clawfs.treeVersion}`, 'gray');
|
|
333
|
+
log(`│ Total Size: ${formatBytes(clawfs.totalSize)}`, 'gray');
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
log(`│ Status: ⚠️ Not initialized`, 'yellow');
|
|
337
|
+
log(`│ Run: moltos init`, 'gray');
|
|
338
|
+
}
|
|
339
|
+
log('└─────────────────────────────────────────────┘\n', 'blue');
|
|
340
|
+
// TAP Status
|
|
341
|
+
log('┌─ TAP (Reputation) ──────────────────────────┐', 'blue');
|
|
342
|
+
if (tap) {
|
|
343
|
+
const tierColor = tap.tier === 'Diamond' ? 'cyan' :
|
|
344
|
+
tap.tier === 'Platinum' ? 'green' : 'gray';
|
|
345
|
+
log(`│ ClawID: ${tap.clawId.slice(0, 24)}...`, 'gray');
|
|
346
|
+
log(`│ Score: ${(tap.score / 100).toFixed(2)}/100.00`, tierColor);
|
|
347
|
+
log(`│ Tier: ${tap.tier.toUpperCase()}`, tierColor);
|
|
348
|
+
log(`│ Received: ${tap.attestationsReceived} attestations`, 'gray');
|
|
349
|
+
log(`│ Given: ${tap.attestationsGiven} attestations`, 'gray');
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
log(`│ Status: ⚠️ No identity found`, 'yellow');
|
|
353
|
+
}
|
|
354
|
+
log('└─────────────────────────────────────────────┘\n', 'blue');
|
|
355
|
+
// Network Status
|
|
356
|
+
log('┌─ Network ───────────────────────────────────┐', 'blue');
|
|
357
|
+
if (network.connected) {
|
|
358
|
+
log(`│ Status: 🌐 Connected`, 'green');
|
|
359
|
+
if (network.latency) {
|
|
360
|
+
log(`│ Latency: ${network.latency}ms`, 'gray');
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
log(`│ Status: ❌ Disconnected`, 'red');
|
|
365
|
+
if (network.error) {
|
|
366
|
+
log(`│ Error: ${network.error.slice(0, 30)}...`, 'gray');
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
log('└─────────────────────────────────────────────┘\n', 'blue');
|
|
370
|
+
// System Status
|
|
371
|
+
log('┌─ System ────────────────────────────────────┐', 'blue');
|
|
372
|
+
log(`│ Platform: ${system.platform}`, 'gray');
|
|
373
|
+
log(`│ Node.js: ${system.nodeVersion}`, 'gray');
|
|
374
|
+
log(`│ Memory: ${formatBytes(system.freeMemory)} / ${formatBytes(system.totalMemory)} free`, 'gray');
|
|
375
|
+
log('└─────────────────────────────────────────────┘\n', 'blue');
|
|
376
|
+
// Overall health
|
|
377
|
+
const healthy = agent.running && clawfs.initialized && tap && network.connected;
|
|
378
|
+
if (healthy) {
|
|
379
|
+
log('✅ All systems operational\n', 'green');
|
|
380
|
+
}
|
|
381
|
+
else if (!agent.running && clawfs.initialized) {
|
|
382
|
+
log('⚠️ Agent stopped — run "moltos agent start"\n', 'yellow');
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
log('⚠️ Some systems need attention\n', 'yellow');
|
|
386
|
+
}
|
|
387
|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AC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1G,GAAG,CAAC,mDAAmD,EAAE,MAAM,CAAC,CAAC;IAEjE,iBAAiB;IACjB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,WAAW,IAAI,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC;IAChF,IAAI,OAAO,EAAE,CAAC;QACZ,GAAG,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;SAAM,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QAChD,GAAG,CAAC,gDAAgD,EAAE,QAAQ,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,mCAAmC,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* with persistent agents, real trust, self-healing swarms, and hardware isolation.
|
|
6
6
|
*
|
|
7
7
|
* @module @moltos/sdk
|
|
8
|
-
* @version 0.
|
|
8
|
+
* @version 0.7.0
|
|
9
9
|
*/
|
|
10
10
|
export { ApiClient, ApiConfig, ApiResponse, initApiClient, getApiClient } from './lib/api';
|
|
11
11
|
export { MoltOSConfig, loadConfig, validateConfig } from './lib/config';
|
|
@@ -13,5 +13,5 @@ export * from './lib/tap';
|
|
|
13
13
|
export * from './lib/arbitra';
|
|
14
14
|
export * from './lib/clawid';
|
|
15
15
|
export * from './lib/clawfs';
|
|
16
|
-
export declare const VERSION = "0.
|
|
16
|
+
export declare const VERSION = "0.7.0";
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* with persistent agents, real trust, self-healing swarms, and hardware isolation.
|
|
7
7
|
*
|
|
8
8
|
* @module @moltos/sdk
|
|
9
|
-
* @version 0.
|
|
9
|
+
* @version 0.7.0
|
|
10
10
|
*/
|
|
11
11
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
12
|
if (k2 === undefined) k2 = k;
|
|
@@ -39,5 +39,5 @@ __exportStar(require("./lib/arbitra"), exports);
|
|
|
39
39
|
__exportStar(require("./lib/clawid"), exports);
|
|
40
40
|
__exportStar(require("./lib/clawfs"), exports);
|
|
41
41
|
// Version
|
|
42
|
-
exports.VERSION = '0.
|
|
42
|
+
exports.VERSION = '0.7.0';
|
|
43
43
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moltos/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Official MoltOS SDK — The Agent Operating System. Persistent agents with cryptographically-verified reputation (TAP), self-healing swarms, hardware isolation (Firecracker), and one-command production deployment.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|