rentman-cli 2.0.0 ā 2.1.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/.env.example +39 -39
- package/CHANGELOG.md +5 -0
- package/CLI_PRODUCTION_ANALYSIS.md +510 -510
- package/IMPLEMENTATION_REPORT.md +245 -245
- package/README.md +72 -72
- package/SECURITY_FIXES_README.md +336 -336
- package/bin/rentman.js +7 -7
- package/gen_identity.js +23 -23
- package/migrate-identity.js +75 -75
- package/mission.json +21 -21
- package/package.json +7 -2
- package/src/commands/config.js +44 -44
- package/src/commands/guide.js +26 -26
- package/src/commands/init.js +147 -147
- package/src/commands/legal.js +78 -78
- package/src/commands/listen.js +99 -88
- package/src/commands/post-mission.js +202 -202
- package/src/commands/task.js +126 -126
- package/src/index.js +247 -247
- package/src/lib/api.js +120 -120
- package/src/lib/config.js +34 -34
- package/src/lib/crypto.js +80 -80
- package/src/lib/secure-config.js +118 -118
- package/test-integration.js +142 -135
- package/test_mission_v6.json +10 -10
- package/test_mission_v7.json +10 -10
- package/test_task.json +10 -10
- package/_backup_old_cli_20260208_130317/src/commands/init.js +0 -118
- package/_backup_old_cli_20260208_130317/src/commands/login-v2.js +0 -62
- package/_backup_old_cli_20260208_130317/src/commands/login.js +0 -40
- package/_backup_old_cli_20260208_130317/src/commands/post-mission.js +0 -179
- package/_backup_old_cli_20260208_130317/src/index.js +0 -135
package/gen_identity.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
const nacl = require('tweetnacl');
|
|
2
|
-
const naclUtil = require('tweetnacl-util');
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
|
|
6
|
-
const keyPair = nacl.sign.keyPair();
|
|
7
|
-
const publicKeyBase64 = naclUtil.encodeBase64(keyPair.publicKey);
|
|
8
|
-
const secretKeyBase64 = naclUtil.encodeBase64(keyPair.secretKey);
|
|
9
|
-
const agentUUID = "55ea7c98-132d-450b-8712-4f369d763261"; // Fixed UUID for testing
|
|
10
|
-
|
|
11
|
-
const identity = {
|
|
12
|
-
agent_id: agentUUID,
|
|
13
|
-
public_agent_id: "agent_test_01",
|
|
14
|
-
public_key: publicKeyBase64,
|
|
15
|
-
secret_key: secretKeyBase64,
|
|
16
|
-
owner_id: null, // Null allowed
|
|
17
|
-
api_url: "https://uoekolfgbbmvhzsfkjef.supabase.co"
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
fs.writeFileSync('rentman_identity.json', JSON.stringify(identity, null, 2));
|
|
21
|
-
|
|
22
|
-
console.log('SQL_TO_RUN:');
|
|
23
|
-
console.log(`INSERT INTO agents (id, name, public_agent_id, public_key, status, type) VALUES ('${agentUUID}', 'Test Agent 01', 'agent_test_01', '${publicKeyBase64}', 'ONLINE', 'CLI_AGENT') ON CONFLICT (id) DO UPDATE SET public_key = '${publicKeyBase64}';`);
|
|
1
|
+
const nacl = require('tweetnacl');
|
|
2
|
+
const naclUtil = require('tweetnacl-util');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const keyPair = nacl.sign.keyPair();
|
|
7
|
+
const publicKeyBase64 = naclUtil.encodeBase64(keyPair.publicKey);
|
|
8
|
+
const secretKeyBase64 = naclUtil.encodeBase64(keyPair.secretKey);
|
|
9
|
+
const agentUUID = "55ea7c98-132d-450b-8712-4f369d763261"; // Fixed UUID for testing
|
|
10
|
+
|
|
11
|
+
const identity = {
|
|
12
|
+
agent_id: agentUUID,
|
|
13
|
+
public_agent_id: "agent_test_01",
|
|
14
|
+
public_key: publicKeyBase64,
|
|
15
|
+
secret_key: secretKeyBase64,
|
|
16
|
+
owner_id: null, // Null allowed
|
|
17
|
+
api_url: "https://uoekolfgbbmvhzsfkjef.supabase.co"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
fs.writeFileSync('rentman_identity.json', JSON.stringify(identity, null, 2));
|
|
21
|
+
|
|
22
|
+
console.log('SQL_TO_RUN:');
|
|
23
|
+
console.log(`INSERT INTO agents (id, name, public_agent_id, public_key, status, type) VALUES ('${agentUUID}', 'Test Agent 01', 'agent_test_01', '${publicKeyBase64}', 'ONLINE', 'CLI_AGENT') ON CONFLICT (id) DO UPDATE SET public_key = '${publicKeyBase64}';`);
|
package/migrate-identity.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Migration Script
|
|
5
|
-
* Migrates old rentman_identity.json to secure Conf storage
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const fs = require('fs');
|
|
9
|
-
const path = require('path');
|
|
10
|
-
const chalk = require('chalk');
|
|
11
|
-
const { saveIdentity, getConfigPath } = require('./src/lib/secure-config');
|
|
12
|
-
|
|
13
|
-
const OLD_IDENTITY_FILE = path.join(process.cwd(), 'rentman_identity.json');
|
|
14
|
-
const BACKUP_FILE = path.join(process.cwd(), '_BACKUP_rentman_identity.json.bak');
|
|
15
|
-
|
|
16
|
-
console.log(chalk.blue.bold('\nš Rentman CLI - Identity Migration Tool\n'));
|
|
17
|
-
console.log(chalk.gray('This tool migrates your identity from local JSON to secure storage\n'));
|
|
18
|
-
|
|
19
|
-
// Check if old file exists
|
|
20
|
-
if (!fs.existsSync(OLD_IDENTITY_FILE)) {
|
|
21
|
-
console.log(chalk.yellow('ā ļø No rentman_identity.json found in current directory'));
|
|
22
|
-
console.log(chalk.gray(' Nothing to migrate'));
|
|
23
|
-
process.exit(0);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
// Read old identity
|
|
28
|
-
console.log(chalk.white('Reading old identity file...'));
|
|
29
|
-
const oldIdentity = JSON.parse(fs.readFileSync(OLD_IDENTITY_FILE, 'utf-8'));
|
|
30
|
-
|
|
31
|
-
// Validate structure
|
|
32
|
-
if (!oldIdentity.agent_id || !oldIdentity.secret_key) {
|
|
33
|
-
console.error(chalk.red('ā Invalid identity file format'));
|
|
34
|
-
process.exit(1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
console.log(chalk.green(`ā Found agent: ${oldIdentity.public_agent_id || oldIdentity.agent_id}`));
|
|
38
|
-
|
|
39
|
-
// Save to secure storage
|
|
40
|
-
console.log(chalk.white('\nMigrating to secure storage...'));
|
|
41
|
-
|
|
42
|
-
const identity = {
|
|
43
|
-
agent_id: oldIdentity.agent_id,
|
|
44
|
-
public_agent_id: oldIdentity.public_agent_id,
|
|
45
|
-
secret_key: oldIdentity.secret_key,
|
|
46
|
-
public_key: oldIdentity.public_key,
|
|
47
|
-
owner_id: oldIdentity.owner_id,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
saveIdentity(identity);
|
|
51
|
-
|
|
52
|
-
console.log(chalk.green('ā Identity migrated successfully'));
|
|
53
|
-
console.log(chalk.cyan(` New location: ${getConfigPath()}`));
|
|
54
|
-
|
|
55
|
-
// Backup old file
|
|
56
|
-
console.log(chalk.white('\nBacking up old file...'));
|
|
57
|
-
fs.copyFileSync(OLD_IDENTITY_FILE, BACKUP_FILE);
|
|
58
|
-
console.log(chalk.green(`ā Backup created: ${BACKUP_FILE}`));
|
|
59
|
-
|
|
60
|
-
// Ask to delete
|
|
61
|
-
console.log(chalk.yellow.bold('\nā ļø SECURITY RECOMMENDATION:'));
|
|
62
|
-
console.log(chalk.yellow(' Delete the old identity file to prevent accidental commits'));
|
|
63
|
-
console.log(chalk.white('\nTo delete (recommended):'));
|
|
64
|
-
console.log(chalk.gray(` rm ${OLD_IDENTITY_FILE}`));
|
|
65
|
-
console.log(chalk.gray(' rm _BACKUP_rentman_identity.json.bak'));
|
|
66
|
-
|
|
67
|
-
console.log(chalk.green.bold('\nā
Migration Complete!'));
|
|
68
|
-
console.log(chalk.white('\nYour identity is now securely stored in:'));
|
|
69
|
-
console.log(chalk.cyan(` ${getConfigPath()}`));
|
|
70
|
-
console.log('');
|
|
71
|
-
|
|
72
|
-
} catch (error) {
|
|
73
|
-
console.error(chalk.red(`\nā Migration failed: ${error.message}`));
|
|
74
|
-
process.exit(1);
|
|
75
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Migration Script
|
|
5
|
+
* Migrates old rentman_identity.json to secure Conf storage
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const chalk = require('chalk');
|
|
11
|
+
const { saveIdentity, getConfigPath } = require('./src/lib/secure-config');
|
|
12
|
+
|
|
13
|
+
const OLD_IDENTITY_FILE = path.join(process.cwd(), 'rentman_identity.json');
|
|
14
|
+
const BACKUP_FILE = path.join(process.cwd(), '_BACKUP_rentman_identity.json.bak');
|
|
15
|
+
|
|
16
|
+
console.log(chalk.blue.bold('\nš Rentman CLI - Identity Migration Tool\n'));
|
|
17
|
+
console.log(chalk.gray('This tool migrates your identity from local JSON to secure storage\n'));
|
|
18
|
+
|
|
19
|
+
// Check if old file exists
|
|
20
|
+
if (!fs.existsSync(OLD_IDENTITY_FILE)) {
|
|
21
|
+
console.log(chalk.yellow('ā ļø No rentman_identity.json found in current directory'));
|
|
22
|
+
console.log(chalk.gray(' Nothing to migrate'));
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
// Read old identity
|
|
28
|
+
console.log(chalk.white('Reading old identity file...'));
|
|
29
|
+
const oldIdentity = JSON.parse(fs.readFileSync(OLD_IDENTITY_FILE, 'utf-8'));
|
|
30
|
+
|
|
31
|
+
// Validate structure
|
|
32
|
+
if (!oldIdentity.agent_id || !oldIdentity.secret_key) {
|
|
33
|
+
console.error(chalk.red('ā Invalid identity file format'));
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
console.log(chalk.green(`ā Found agent: ${oldIdentity.public_agent_id || oldIdentity.agent_id}`));
|
|
38
|
+
|
|
39
|
+
// Save to secure storage
|
|
40
|
+
console.log(chalk.white('\nMigrating to secure storage...'));
|
|
41
|
+
|
|
42
|
+
const identity = {
|
|
43
|
+
agent_id: oldIdentity.agent_id,
|
|
44
|
+
public_agent_id: oldIdentity.public_agent_id,
|
|
45
|
+
secret_key: oldIdentity.secret_key,
|
|
46
|
+
public_key: oldIdentity.public_key,
|
|
47
|
+
owner_id: oldIdentity.owner_id,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
saveIdentity(identity);
|
|
51
|
+
|
|
52
|
+
console.log(chalk.green('ā Identity migrated successfully'));
|
|
53
|
+
console.log(chalk.cyan(` New location: ${getConfigPath()}`));
|
|
54
|
+
|
|
55
|
+
// Backup old file
|
|
56
|
+
console.log(chalk.white('\nBacking up old file...'));
|
|
57
|
+
fs.copyFileSync(OLD_IDENTITY_FILE, BACKUP_FILE);
|
|
58
|
+
console.log(chalk.green(`ā Backup created: ${BACKUP_FILE}`));
|
|
59
|
+
|
|
60
|
+
// Ask to delete
|
|
61
|
+
console.log(chalk.yellow.bold('\nā ļø SECURITY RECOMMENDATION:'));
|
|
62
|
+
console.log(chalk.yellow(' Delete the old identity file to prevent accidental commits'));
|
|
63
|
+
console.log(chalk.white('\nTo delete (recommended):'));
|
|
64
|
+
console.log(chalk.gray(` rm ${OLD_IDENTITY_FILE}`));
|
|
65
|
+
console.log(chalk.gray(' rm _BACKUP_rentman_identity.json.bak'));
|
|
66
|
+
|
|
67
|
+
console.log(chalk.green.bold('\nā
Migration Complete!'));
|
|
68
|
+
console.log(chalk.white('\nYour identity is now securely stored in:'));
|
|
69
|
+
console.log(chalk.cyan(` ${getConfigPath()}`));
|
|
70
|
+
console.log('');
|
|
71
|
+
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error(chalk.red(`\nā Migration failed: ${error.message}`));
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
package/mission.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Test iOS login flow",
|
|
3
|
-
"description": "Test login functionality on real iPhone device using TestFlight",
|
|
4
|
-
"task_type": "verification",
|
|
5
|
-
"location": {
|
|
6
|
-
"lat": 40.7128,
|
|
7
|
-
"lng": -74.0060,
|
|
8
|
-
"address": "New York, NY"
|
|
9
|
-
},
|
|
10
|
-
"budget_amount": 15.00,
|
|
11
|
-
"required_skills": ["iOS testing", "TestFlight"],
|
|
12
|
-
"requirements": {
|
|
13
|
-
"testflight_url": "https://testflight.apple.com/join/xxxxx",
|
|
14
|
-
"verification_methods": ["video_verification"],
|
|
15
|
-
"expected_output": {
|
|
16
|
-
"login_success": "boolean",
|
|
17
|
-
"video_proof": "string",
|
|
18
|
-
"error_message": "string"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"title": "Test iOS login flow",
|
|
3
|
+
"description": "Test login functionality on real iPhone device using TestFlight",
|
|
4
|
+
"task_type": "verification",
|
|
5
|
+
"location": {
|
|
6
|
+
"lat": 40.7128,
|
|
7
|
+
"lng": -74.0060,
|
|
8
|
+
"address": "New York, NY"
|
|
9
|
+
},
|
|
10
|
+
"budget_amount": 15.00,
|
|
11
|
+
"required_skills": ["iOS testing", "TestFlight"],
|
|
12
|
+
"requirements": {
|
|
13
|
+
"testflight_url": "https://testflight.apple.com/join/xxxxx",
|
|
14
|
+
"verification_methods": ["video_verification"],
|
|
15
|
+
"expected_output": {
|
|
16
|
+
"login_success": "boolean",
|
|
17
|
+
"video_proof": "string",
|
|
18
|
+
"error_message": "string"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rentman-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "CLI tool for AI agents to hire humans via Rentman marketplace",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/ferangarita01/rentman.git",
|
|
8
|
+
"directory": "apps/cli"
|
|
9
|
+
},
|
|
5
10
|
"main": "src/index.js",
|
|
6
11
|
"bin": {
|
|
7
12
|
"rentman": "./bin/rentman.js"
|
|
@@ -34,4 +39,4 @@
|
|
|
34
39
|
"tweetnacl-util": "^0.15.1",
|
|
35
40
|
"update-notifier": "^5.1.0"
|
|
36
41
|
}
|
|
37
|
-
}
|
|
42
|
+
}
|
package/src/commands/config.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
const Conf = new (require('conf'))();
|
|
2
|
-
const chalk = require('chalk');
|
|
3
|
-
|
|
4
|
-
const allowedKeys = ['agent_id', 'secret_key', 'api_url'];
|
|
5
|
-
|
|
6
|
-
function configCommand(key, value) {
|
|
7
|
-
if (!key || key === 'list') {
|
|
8
|
-
console.log(chalk.bold('\nCurrent Configuration:'));
|
|
9
|
-
console.log(chalk.gray('---------------------'));
|
|
10
|
-
for (const k of allowedKeys) {
|
|
11
|
-
const val = Conf.get(k);
|
|
12
|
-
let displayVal = val;
|
|
13
|
-
|
|
14
|
-
if (!val) {
|
|
15
|
-
displayVal = chalk.gray('(not set)');
|
|
16
|
-
} else if (k === 'secret_key') {
|
|
17
|
-
displayVal = val.substring(0, 4) + '...';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
console.log(`${chalk.cyan(k)}: ${displayVal}`);
|
|
21
|
-
}
|
|
22
|
-
console.log(chalk.gray(`\nConfig file: ${Conf.path}\n`));
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (value === undefined) {
|
|
27
|
-
if (allowedKeys.includes(key)) {
|
|
28
|
-
console.log(Conf.get(key));
|
|
29
|
-
} else {
|
|
30
|
-
console.error(chalk.red(`Invalid key: ${key}`));
|
|
31
|
-
console.log(`Allowed keys: ${allowedKeys.join(', ')}`);
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
if (allowedKeys.includes(key)) {
|
|
35
|
-
Conf.set(key, value);
|
|
36
|
-
console.log(chalk.green(`\nā Configuration updated: ${key}`));
|
|
37
|
-
} else {
|
|
38
|
-
console.error(chalk.red(`Invalid key: ${key}`));
|
|
39
|
-
console.log(`Allowed keys: ${allowedKeys.join(', ')}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
module.exports = configCommand;
|
|
1
|
+
const Conf = new (require('conf'))();
|
|
2
|
+
const chalk = require('chalk');
|
|
3
|
+
|
|
4
|
+
const allowedKeys = ['agent_id', 'secret_key', 'api_url'];
|
|
5
|
+
|
|
6
|
+
function configCommand(key, value) {
|
|
7
|
+
if (!key || key === 'list') {
|
|
8
|
+
console.log(chalk.bold('\nCurrent Configuration:'));
|
|
9
|
+
console.log(chalk.gray('---------------------'));
|
|
10
|
+
for (const k of allowedKeys) {
|
|
11
|
+
const val = Conf.get(k);
|
|
12
|
+
let displayVal = val;
|
|
13
|
+
|
|
14
|
+
if (!val) {
|
|
15
|
+
displayVal = chalk.gray('(not set)');
|
|
16
|
+
} else if (k === 'secret_key') {
|
|
17
|
+
displayVal = val.substring(0, 4) + '...';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
console.log(`${chalk.cyan(k)}: ${displayVal}`);
|
|
21
|
+
}
|
|
22
|
+
console.log(chalk.gray(`\nConfig file: ${Conf.path}\n`));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (value === undefined) {
|
|
27
|
+
if (allowedKeys.includes(key)) {
|
|
28
|
+
console.log(Conf.get(key));
|
|
29
|
+
} else {
|
|
30
|
+
console.error(chalk.red(`Invalid key: ${key}`));
|
|
31
|
+
console.log(`Allowed keys: ${allowedKeys.join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
if (allowedKeys.includes(key)) {
|
|
35
|
+
Conf.set(key, value);
|
|
36
|
+
console.log(chalk.green(`\nā Configuration updated: ${key}`));
|
|
37
|
+
} else {
|
|
38
|
+
console.error(chalk.red(`Invalid key: ${key}`));
|
|
39
|
+
console.log(`Allowed keys: ${allowedKeys.join(', ')}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = configCommand;
|
package/src/commands/guide.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const chalk = require('chalk');
|
|
2
|
-
|
|
3
|
-
module.exports = function () {
|
|
4
|
-
console.log(chalk.bold.blue('\nš Rentman Protocol - CLI Guide\n'));
|
|
5
|
-
|
|
6
|
-
console.log(chalk.yellow('CORE WORKFLOW (KYA):'));
|
|
7
|
-
console.log(chalk.white('1. Initialize Identity:'));
|
|
8
|
-
console.log(chalk.cyan(' $ npx rentman init'));
|
|
9
|
-
console.log(chalk.gray(' - Creates Keypair (Ed25519)'));
|
|
10
|
-
console.log(chalk.gray(' - Links specific Agent to your Billing Account'));
|
|
11
|
-
|
|
12
|
-
console.log(chalk.white('\n2. Post a Mission (AI Agent Mode):'));
|
|
13
|
-
console.log(chalk.cyan(' $ npx rentman post-mission <mission.json>'));
|
|
14
|
-
console.log(chalk.gray(' - Signs the mission with your Private Key'));
|
|
15
|
-
console.log(chalk.gray(' - Broadcasts to the Marketplace'));
|
|
16
|
-
|
|
17
|
-
console.log(chalk.white('\n3. Listen for Tasks (Operator Mode):'));
|
|
18
|
-
console.log(chalk.cyan(' $ npx rentman listen'));
|
|
19
|
-
console.log(chalk.gray(' - Connects to the Realtime Satellite Feed'));
|
|
20
|
-
console.log(chalk.gray(' - Receives tasks in your area'));
|
|
21
|
-
|
|
22
|
-
console.log(chalk.yellow('\n\nHELPFUL COMMANDS:'));
|
|
23
|
-
console.log(chalk.white(' $ npx rentman whoami ') + chalk.gray('# Check current identity'));
|
|
24
|
-
console.log(chalk.white(' $ npx rentman map ') + chalk.gray('# Visualize active missions'));
|
|
25
|
-
console.log('\n');
|
|
26
|
-
};
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
|
|
3
|
+
module.exports = function () {
|
|
4
|
+
console.log(chalk.bold.blue('\nš Rentman Protocol - CLI Guide\n'));
|
|
5
|
+
|
|
6
|
+
console.log(chalk.yellow('CORE WORKFLOW (KYA):'));
|
|
7
|
+
console.log(chalk.white('1. Initialize Identity:'));
|
|
8
|
+
console.log(chalk.cyan(' $ npx rentman init'));
|
|
9
|
+
console.log(chalk.gray(' - Creates Keypair (Ed25519)'));
|
|
10
|
+
console.log(chalk.gray(' - Links specific Agent to your Billing Account'));
|
|
11
|
+
|
|
12
|
+
console.log(chalk.white('\n2. Post a Mission (AI Agent Mode):'));
|
|
13
|
+
console.log(chalk.cyan(' $ npx rentman post-mission <mission.json>'));
|
|
14
|
+
console.log(chalk.gray(' - Signs the mission with your Private Key'));
|
|
15
|
+
console.log(chalk.gray(' - Broadcasts to the Marketplace'));
|
|
16
|
+
|
|
17
|
+
console.log(chalk.white('\n3. Listen for Tasks (Operator Mode):'));
|
|
18
|
+
console.log(chalk.cyan(' $ npx rentman listen'));
|
|
19
|
+
console.log(chalk.gray(' - Connects to the Realtime Satellite Feed'));
|
|
20
|
+
console.log(chalk.gray(' - Receives tasks in your area'));
|
|
21
|
+
|
|
22
|
+
console.log(chalk.yellow('\n\nHELPFUL COMMANDS:'));
|
|
23
|
+
console.log(chalk.white(' $ npx rentman whoami ') + chalk.gray('# Check current identity'));
|
|
24
|
+
console.log(chalk.white(' $ npx rentman map ') + chalk.gray('# Visualize active missions'));
|
|
25
|
+
console.log('\n');
|
|
26
|
+
};
|