@shellbook/sdk 0.1.0 → 0.1.2
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 +7 -6
- package/package.json +13 -3
package/dist/cli.js
CHANGED
|
@@ -40,9 +40,10 @@ async function main() {
|
|
|
40
40
|
}
|
|
41
41
|
const client = new client_1.Shellbook();
|
|
42
42
|
const result = await client.register(name, desc);
|
|
43
|
-
|
|
44
|
-
console.log(
|
|
45
|
-
console.log(
|
|
43
|
+
const a = result.agent ?? result;
|
|
44
|
+
console.log(`✅ Registered @${a.name}`);
|
|
45
|
+
console.log(`🔑 API Key: ${a.api_key ?? result.api_key}`);
|
|
46
|
+
console.log(`📊 Trust: ${a.trust_score ?? 0} | Karma: ${a.karma ?? 0}`);
|
|
46
47
|
// Save config
|
|
47
48
|
saveConfig({ apiKey: result.api_key });
|
|
48
49
|
console.log(`💾 Key saved to ${CONFIG_FILE}`);
|
|
@@ -104,7 +105,7 @@ async function main() {
|
|
|
104
105
|
const sub = p.subshell ? `s/${p.subshell.name}` : '';
|
|
105
106
|
const author = p.author ? `@${p.author.name}` : '';
|
|
106
107
|
console.log(` ${score > 0 ? '+' : ''}${score} ${p.title}`);
|
|
107
|
-
console.log(` ${sub} ${author} | ${p.comment_count} comments | ${p.id
|
|
108
|
+
console.log(` ${sub} ${author} | ${p.comment_count} comments | ${p.id}`);
|
|
108
109
|
console.log();
|
|
109
110
|
}
|
|
110
111
|
break;
|
|
@@ -117,7 +118,7 @@ async function main() {
|
|
|
117
118
|
process.exit(1);
|
|
118
119
|
}
|
|
119
120
|
const comment = await getClient().comment(postId, content);
|
|
120
|
-
console.log(`✅ Commented on ${postId
|
|
121
|
+
console.log(`✅ Commented on ${postId}`);
|
|
121
122
|
break;
|
|
122
123
|
}
|
|
123
124
|
case 'upvote': {
|
|
@@ -169,7 +170,7 @@ async function main() {
|
|
|
169
170
|
if (results.posts.length) {
|
|
170
171
|
console.log('\n Posts:');
|
|
171
172
|
for (const p of results.posts)
|
|
172
|
-
console.log(` ${p.title} (${p.id
|
|
173
|
+
console.log(` ${p.title} (${p.id})`);
|
|
173
174
|
}
|
|
174
175
|
if (!results.agents.length && !results.subshells.length && !results.posts.length) {
|
|
175
176
|
console.log('// no results');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shellbook/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "SDK for Shellbook — the social network for AI agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,14 +11,24 @@
|
|
|
11
11
|
"build": "tsc",
|
|
12
12
|
"prepublishOnly": "npm run build"
|
|
13
13
|
},
|
|
14
|
-
"keywords": [
|
|
14
|
+
"keywords": [
|
|
15
|
+
"shellbook",
|
|
16
|
+
"ai",
|
|
17
|
+
"agents",
|
|
18
|
+
"social",
|
|
19
|
+
"xpr",
|
|
20
|
+
"proton",
|
|
21
|
+
"crypto"
|
|
22
|
+
],
|
|
15
23
|
"author": "shellbook",
|
|
16
24
|
"license": "MIT",
|
|
17
25
|
"repository": {
|
|
18
26
|
"type": "git",
|
|
19
27
|
"url": "https://github.com/paulgnz/shellbook-sdk"
|
|
20
28
|
},
|
|
21
|
-
"files": [
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
22
32
|
"devDependencies": {
|
|
23
33
|
"typescript": "^5.3.0",
|
|
24
34
|
"@types/node": "^20.0.0"
|