spora 0.1.7 → 0.1.9
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/{chunk-2OERPSWV.js → chunk-7EJIEBHY.js} +4 -4
- package/dist/{chunk-OUDT6NPY.js → chunk-7PXG5YMD.js} +3 -3
- package/dist/{chunk-HUKLSWNC.js → chunk-ZLKDC7OU.js} +2 -2
- package/dist/cli.js +27 -27
- package/dist/{client-ENAP7CKT.js → client-4SPM3HMZ.js} +5 -5
- package/dist/{client-RSGAQOHP.js → client-RQCSDX2K.js} +5 -5
- package/dist/{colony-QVTWBDLL.js → colony-TMBYCUUZ.js} +5 -5
- package/dist/{heartbeat-6QO5ZMFA.js → heartbeat-NA2HMGCX.js} +8 -8
- package/dist/{init-YOZOFG5Z.js → init-SXZMVK6K.js} +120 -21
- package/dist/init-SXZMVK6K.js.map +1 -0
- package/dist/mcp-server.js +26 -26
- package/dist/{prompt-builder-IXDVAQHK.js → prompt-builder-AT2ZFQ4A.js} +3 -3
- package/dist/{queue-6JK2GWMV.js → queue-QUF5GX4J.js} +2 -2
- package/dist/{x-client-F7C7VJBR.js → x-client-RP2KICYN.js} +2 -2
- package/package.json +2 -1
- package/dist/init-YOZOFG5Z.js.map +0 -1
- /package/dist/{chunk-2OERPSWV.js.map → chunk-7EJIEBHY.js.map} +0 -0
- /package/dist/{chunk-OUDT6NPY.js.map → chunk-7PXG5YMD.js.map} +0 -0
- /package/dist/{chunk-HUKLSWNC.js.map → chunk-ZLKDC7OU.js.map} +0 -0
- /package/dist/{client-ENAP7CKT.js.map → client-4SPM3HMZ.js.map} +0 -0
- /package/dist/{client-RSGAQOHP.js.map → client-RQCSDX2K.js.map} +0 -0
- /package/dist/{colony-QVTWBDLL.js.map → colony-TMBYCUUZ.js.map} +0 -0
- /package/dist/{heartbeat-6QO5ZMFA.js.map → heartbeat-NA2HMGCX.js.map} +0 -0
- /package/dist/{prompt-builder-IXDVAQHK.js.map → prompt-builder-AT2ZFQ4A.js.map} +0 -0
- /package/dist/{queue-6JK2GWMV.js.map → queue-QUF5GX4J.js.map} +0 -0
- /package/dist/{x-client-F7C7VJBR.js.map → x-client-RP2KICYN.js.map} +0 -0
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
loadLearnings,
|
|
7
7
|
loadRelationships
|
|
8
8
|
} from "./chunk-EBO4F5NU.js";
|
|
9
|
+
import {
|
|
10
|
+
loadConfig
|
|
11
|
+
} from "./chunk-YEKHNTQO.js";
|
|
9
12
|
import {
|
|
10
13
|
loadIdentity,
|
|
11
14
|
renderIdentityDocument
|
|
12
15
|
} from "./chunk-ELFOCELE.js";
|
|
13
|
-
import {
|
|
14
|
-
loadConfig
|
|
15
|
-
} from "./chunk-YEKHNTQO.js";
|
|
16
16
|
|
|
17
17
|
// src/runtime/prompt-builder.ts
|
|
18
18
|
function buildSystemPrompt() {
|
|
@@ -159,4 +159,4 @@ export {
|
|
|
159
159
|
buildHeartbeatUserMessage,
|
|
160
160
|
buildChatPrompt
|
|
161
161
|
};
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-7EJIEBHY.js.map
|
|
@@ -11,11 +11,11 @@ async function getXClient() {
|
|
|
11
11
|
if (clientInstance) return clientInstance;
|
|
12
12
|
const config = loadConfig();
|
|
13
13
|
if (config.xMethod === "api") {
|
|
14
|
-
const { XApiClient } = await import("./client-
|
|
14
|
+
const { XApiClient } = await import("./client-4SPM3HMZ.js");
|
|
15
15
|
clientInstance = new XApiClient();
|
|
16
16
|
logger.info("X client initialized: API mode");
|
|
17
17
|
} else {
|
|
18
|
-
const { XBrowserClient } = await import("./client-
|
|
18
|
+
const { XBrowserClient } = await import("./client-RQCSDX2K.js");
|
|
19
19
|
clientInstance = new XBrowserClient();
|
|
20
20
|
logger.info("X client initialized: Browser mode");
|
|
21
21
|
}
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
getXClient,
|
|
30
30
|
resetXClient
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-7PXG5YMD.js.map
|
|
@@ -67,7 +67,7 @@ async function flushQueue() {
|
|
|
67
67
|
const now = /* @__PURE__ */ new Date();
|
|
68
68
|
let posted = 0;
|
|
69
69
|
let failed = 0;
|
|
70
|
-
const { getXClient } = await import("./x-client-
|
|
70
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
71
71
|
const client = await getXClient();
|
|
72
72
|
for (const entry of queue.entries) {
|
|
73
73
|
if (entry.status !== "pending") continue;
|
|
@@ -121,4 +121,4 @@ export {
|
|
|
121
121
|
flushQueue,
|
|
122
122
|
showQueue
|
|
123
123
|
};
|
|
124
|
-
//# sourceMappingURL=chunk-
|
|
124
|
+
//# sourceMappingURL=chunk-ZLKDC7OU.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
loadConfig
|
|
4
|
+
} from "./chunk-YEKHNTQO.js";
|
|
2
5
|
import {
|
|
3
6
|
FRAMEWORKS,
|
|
4
7
|
GOAL_PRESETS,
|
|
@@ -9,9 +12,6 @@ import {
|
|
|
9
12
|
renderIdentityDocument,
|
|
10
13
|
saveIdentity
|
|
11
14
|
} from "./chunk-ELFOCELE.js";
|
|
12
|
-
import {
|
|
13
|
-
loadConfig
|
|
14
|
-
} from "./chunk-YEKHNTQO.js";
|
|
15
15
|
import {
|
|
16
16
|
hasXCredentials,
|
|
17
17
|
sporaExists
|
|
@@ -123,7 +123,7 @@ program.command("init").description("Set up X account credentials for your Spore
|
|
|
123
123
|
console.log(chalk.cyan(BANNER));
|
|
124
124
|
console.log(chalk.bold("Welcome to Spora."));
|
|
125
125
|
console.log(chalk.gray("The global town square for AI agents.\n"));
|
|
126
|
-
const { runInit } = await import("./init-
|
|
126
|
+
const { runInit } = await import("./init-SXZMVK6K.js");
|
|
127
127
|
await runInit(opts.token);
|
|
128
128
|
});
|
|
129
129
|
program.command("serve").description("Start the Spora MCP server (stdio)").action(async () => {
|
|
@@ -261,7 +261,7 @@ program.command("journal").description("Add a reflection to the evolution journa
|
|
|
261
261
|
});
|
|
262
262
|
program.command("post").description("Post a tweet").argument("<content>", "Tweet content (max 280 chars)").action(async (content) => {
|
|
263
263
|
try {
|
|
264
|
-
const { getXClient } = await import("./x-client-
|
|
264
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
265
265
|
const client = await getXClient();
|
|
266
266
|
const result = await client.postTweet(content);
|
|
267
267
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -272,7 +272,7 @@ program.command("post").description("Post a tweet").argument("<content>", "Tweet
|
|
|
272
272
|
});
|
|
273
273
|
program.command("reply").description("Reply to a tweet").argument("<tweetId>", "Tweet ID to reply to").argument("<content>", "Reply content").action(async (tweetId, content) => {
|
|
274
274
|
try {
|
|
275
|
-
const { getXClient } = await import("./x-client-
|
|
275
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
276
276
|
const client = await getXClient();
|
|
277
277
|
const result = await client.replyToTweet(tweetId, content);
|
|
278
278
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -283,7 +283,7 @@ program.command("reply").description("Reply to a tweet").argument("<tweetId>", "
|
|
|
283
283
|
});
|
|
284
284
|
program.command("like").description("Like a tweet").argument("<tweetId>", "Tweet ID").action(async (tweetId) => {
|
|
285
285
|
try {
|
|
286
|
-
const { getXClient } = await import("./x-client-
|
|
286
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
287
287
|
const client = await getXClient();
|
|
288
288
|
const result = await client.likeTweet(tweetId);
|
|
289
289
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -294,7 +294,7 @@ program.command("like").description("Like a tweet").argument("<tweetId>", "Tweet
|
|
|
294
294
|
});
|
|
295
295
|
program.command("retweet").description("Retweet a tweet").argument("<tweetId>", "Tweet ID").action(async (tweetId) => {
|
|
296
296
|
try {
|
|
297
|
-
const { getXClient } = await import("./x-client-
|
|
297
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
298
298
|
const client = await getXClient();
|
|
299
299
|
const result = await client.retweet(tweetId);
|
|
300
300
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -305,7 +305,7 @@ program.command("retweet").description("Retweet a tweet").argument("<tweetId>",
|
|
|
305
305
|
});
|
|
306
306
|
program.command("follow").description("Follow a user").argument("<handle>", "User handle or ID").action(async (handle) => {
|
|
307
307
|
try {
|
|
308
|
-
const { getXClient } = await import("./x-client-
|
|
308
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
309
309
|
const client = await getXClient();
|
|
310
310
|
const result = await client.followUser(handle);
|
|
311
311
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -316,7 +316,7 @@ program.command("follow").description("Follow a user").argument("<handle>", "Use
|
|
|
316
316
|
});
|
|
317
317
|
program.command("unfollow").description("Unfollow a user").argument("<handle>", "User handle or ID").action(async (handle) => {
|
|
318
318
|
try {
|
|
319
|
-
const { getXClient } = await import("./x-client-
|
|
319
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
320
320
|
const client = await getXClient();
|
|
321
321
|
const result = await client.unfollowUser(handle);
|
|
322
322
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -327,7 +327,7 @@ program.command("unfollow").description("Unfollow a user").argument("<handle>",
|
|
|
327
327
|
});
|
|
328
328
|
program.command("timeline").description("Read home timeline").option("-c, --count <n>", "Number of tweets", "20").action(async (opts) => {
|
|
329
329
|
try {
|
|
330
|
-
const { getXClient } = await import("./x-client-
|
|
330
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
331
331
|
const client = await getXClient();
|
|
332
332
|
const result = await client.getTimeline({ count: parseInt(opts.count) });
|
|
333
333
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -338,7 +338,7 @@ program.command("timeline").description("Read home timeline").option("-c, --coun
|
|
|
338
338
|
});
|
|
339
339
|
program.command("mentions").description("Read mentions").option("-c, --count <n>", "Number of mentions", "20").action(async (opts) => {
|
|
340
340
|
try {
|
|
341
|
-
const { getXClient } = await import("./x-client-
|
|
341
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
342
342
|
const client = await getXClient();
|
|
343
343
|
const result = await client.getMentions({ count: parseInt(opts.count) });
|
|
344
344
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -349,7 +349,7 @@ program.command("mentions").description("Read mentions").option("-c, --count <n>
|
|
|
349
349
|
});
|
|
350
350
|
program.command("search").description("Search for tweets").argument("<query>", "Search query").option("-c, --count <n>", "Number of results", "20").action(async (query, opts) => {
|
|
351
351
|
try {
|
|
352
|
-
const { getXClient } = await import("./x-client-
|
|
352
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
353
353
|
const client = await getXClient();
|
|
354
354
|
const result = await client.searchTweets(query, { count: parseInt(opts.count) });
|
|
355
355
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -360,7 +360,7 @@ program.command("search").description("Search for tweets").argument("<query>", "
|
|
|
360
360
|
});
|
|
361
361
|
program.command("profile").description("Get a user's X profile").argument("<handle>", "X handle (without @)").action(async (handle) => {
|
|
362
362
|
try {
|
|
363
|
-
const { getXClient } = await import("./x-client-
|
|
363
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
364
364
|
const client = await getXClient();
|
|
365
365
|
const result = await client.getProfile(handle);
|
|
366
366
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -426,7 +426,7 @@ program.command("note").description("Add a relationship note about someone").arg
|
|
|
426
426
|
});
|
|
427
427
|
program.command("schedule").description("Queue a post for later").argument("<content>", "Tweet content").option("--at <datetime>", "ISO datetime to post at").action(async (content, opts) => {
|
|
428
428
|
try {
|
|
429
|
-
const { addToQueue } = await import("./queue-
|
|
429
|
+
const { addToQueue } = await import("./queue-QUF5GX4J.js");
|
|
430
430
|
const entry = addToQueue(content, opts.at);
|
|
431
431
|
console.log(JSON.stringify({ success: true, id: entry.id, scheduledFor: entry.scheduledFor }));
|
|
432
432
|
} catch (error) {
|
|
@@ -436,7 +436,7 @@ program.command("schedule").description("Queue a post for later").argument("<con
|
|
|
436
436
|
});
|
|
437
437
|
program.command("flush").description("Post all queued items whose time has come").action(async () => {
|
|
438
438
|
try {
|
|
439
|
-
const { flushQueue } = await import("./queue-
|
|
439
|
+
const { flushQueue } = await import("./queue-QUF5GX4J.js");
|
|
440
440
|
const results = await flushQueue();
|
|
441
441
|
console.log(JSON.stringify(results, null, 2));
|
|
442
442
|
} catch (error) {
|
|
@@ -445,13 +445,13 @@ program.command("flush").description("Post all queued items whose time has come"
|
|
|
445
445
|
}
|
|
446
446
|
});
|
|
447
447
|
program.command("queue").description("Show scheduled posts").action(async () => {
|
|
448
|
-
const { showQueue } = await import("./queue-
|
|
448
|
+
const { showQueue } = await import("./queue-QUF5GX4J.js");
|
|
449
449
|
showQueue();
|
|
450
450
|
});
|
|
451
451
|
var colony = program.command("colony").description("Colony commands");
|
|
452
452
|
colony.command("checkin").description("Check into The Colony \u2014 sync memory, discover Spores").option("-m, --message <msg>", "Optional message to post").action(async (opts) => {
|
|
453
453
|
try {
|
|
454
|
-
const { colonyCheckin } = await import("./colony-
|
|
454
|
+
const { colonyCheckin } = await import("./colony-TMBYCUUZ.js");
|
|
455
455
|
const result = await colonyCheckin(opts.message);
|
|
456
456
|
console.log(JSON.stringify(result, null, 2));
|
|
457
457
|
} catch (error) {
|
|
@@ -470,7 +470,7 @@ colony.command("memory").description("Read the Colony's shared memory").action(a
|
|
|
470
470
|
});
|
|
471
471
|
colony.command("plans").description("Get all active Colony plans").action(async () => {
|
|
472
472
|
try {
|
|
473
|
-
const { getActivePlans } = await import("./colony-
|
|
473
|
+
const { getActivePlans } = await import("./colony-TMBYCUUZ.js");
|
|
474
474
|
const plans = getActivePlans();
|
|
475
475
|
console.log(plans.length > 0 ? JSON.stringify(plans, null, 2) : JSON.stringify({ message: "No active plans. Propose one!" }));
|
|
476
476
|
} catch (error) {
|
|
@@ -480,7 +480,7 @@ colony.command("plans").description("Get all active Colony plans").action(async
|
|
|
480
480
|
});
|
|
481
481
|
colony.command("propose").description("Propose a coordinated plan").argument("<description>", "What's the plan?").action(async (description) => {
|
|
482
482
|
try {
|
|
483
|
-
const { proposePlan } = await import("./colony-
|
|
483
|
+
const { proposePlan } = await import("./colony-TMBYCUUZ.js");
|
|
484
484
|
const result = await proposePlan(description);
|
|
485
485
|
console.log(JSON.stringify(result, null, 2));
|
|
486
486
|
} catch (error) {
|
|
@@ -490,7 +490,7 @@ colony.command("propose").description("Propose a coordinated plan").argument("<d
|
|
|
490
490
|
});
|
|
491
491
|
colony.command("join").description("Join an active plan").argument("<planId>", "Plan ID").action(async (planId) => {
|
|
492
492
|
try {
|
|
493
|
-
const { joinPlan } = await import("./colony-
|
|
493
|
+
const { joinPlan } = await import("./colony-TMBYCUUZ.js");
|
|
494
494
|
const result = await joinPlan(planId);
|
|
495
495
|
console.log(JSON.stringify(result, null, 2));
|
|
496
496
|
} catch (error) {
|
|
@@ -500,7 +500,7 @@ colony.command("join").description("Join an active plan").argument("<planId>", "
|
|
|
500
500
|
});
|
|
501
501
|
colony.command("post-status").description("Post a status update to the Colony").argument("<status>", "Your status").action(async (status) => {
|
|
502
502
|
try {
|
|
503
|
-
const { postStatus } = await import("./colony-
|
|
503
|
+
const { postStatus } = await import("./colony-TMBYCUUZ.js");
|
|
504
504
|
const result = await postStatus(status);
|
|
505
505
|
console.log(JSON.stringify(result, null, 2));
|
|
506
506
|
} catch (error) {
|
|
@@ -510,7 +510,7 @@ colony.command("post-status").description("Post a status update to the Colony").
|
|
|
510
510
|
});
|
|
511
511
|
colony.command("activity").description("Get today's Colony activity").action(async () => {
|
|
512
512
|
try {
|
|
513
|
-
const { getTodaysActivity } = await import("./colony-
|
|
513
|
+
const { getTodaysActivity } = await import("./colony-TMBYCUUZ.js");
|
|
514
514
|
const activity = getTodaysActivity();
|
|
515
515
|
console.log(activity.length > 0 ? JSON.stringify(activity, null, 2) : JSON.stringify({ message: "No Colony activity today yet." }));
|
|
516
516
|
} catch (error) {
|
|
@@ -540,11 +540,11 @@ program.command("start").description("Start the autonomous Spora agent").option(
|
|
|
540
540
|
}
|
|
541
541
|
console.log(chalk.cyan(BANNER));
|
|
542
542
|
console.log(chalk.bold("Starting Spora agent...\n"));
|
|
543
|
-
const { startHeartbeatLoop } = await import("./heartbeat-
|
|
543
|
+
const { startHeartbeatLoop } = await import("./heartbeat-NA2HMGCX.js");
|
|
544
544
|
await startHeartbeatLoop();
|
|
545
545
|
});
|
|
546
546
|
program.command("stop").description("Stop the running Spora agent").action(async () => {
|
|
547
|
-
const { getRunningPid, requestStop } = await import("./heartbeat-
|
|
547
|
+
const { getRunningPid, requestStop } = await import("./heartbeat-NA2HMGCX.js");
|
|
548
548
|
const pid = getRunningPid();
|
|
549
549
|
if (!pid) {
|
|
550
550
|
console.log(JSON.stringify({ message: "Spora agent is not running." }));
|
|
@@ -591,7 +591,7 @@ program.command("chat").description("Chat with your Spore locally").action(async
|
|
|
591
591
|
console.log("No LLM API key. Run `spora set-llm-key` first.");
|
|
592
592
|
process.exit(1);
|
|
593
593
|
}
|
|
594
|
-
const { buildChatPrompt } = await import("./prompt-builder-
|
|
594
|
+
const { buildChatPrompt } = await import("./prompt-builder-AT2ZFQ4A.js");
|
|
595
595
|
const { chat: chatLLM } = await import("./llm-RDNC5Y3G.js");
|
|
596
596
|
const { input } = await import("@inquirer/prompts");
|
|
597
597
|
const identity = loadIdentity();
|
|
@@ -620,7 +620,7 @@ ${identity.name}: `) + response.content + "\n");
|
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
622
|
program.command("agent-status").description("Check if the Spora agent is running").action(async () => {
|
|
623
|
-
const { getRunningPid } = await import("./heartbeat-
|
|
623
|
+
const { getRunningPid } = await import("./heartbeat-NA2HMGCX.js");
|
|
624
624
|
const pid = getRunningPid();
|
|
625
625
|
const { hasLLMKey } = await import("./llm-RDNC5Y3G.js");
|
|
626
626
|
console.log(JSON.stringify({
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
logInteraction
|
|
6
6
|
} from "./chunk-EBO4F5NU.js";
|
|
7
|
-
import {
|
|
8
|
-
identityExists,
|
|
9
|
-
loadIdentity
|
|
10
|
-
} from "./chunk-ELFOCELE.js";
|
|
11
7
|
import {
|
|
12
8
|
logger
|
|
13
9
|
} from "./chunk-KELPENM3.js";
|
|
14
10
|
import "./chunk-YEKHNTQO.js";
|
|
11
|
+
import {
|
|
12
|
+
identityExists,
|
|
13
|
+
loadIdentity
|
|
14
|
+
} from "./chunk-ELFOCELE.js";
|
|
15
15
|
import {
|
|
16
16
|
loadCredentials
|
|
17
17
|
} from "./chunk-ZJZKH7N7.js";
|
|
@@ -370,4 +370,4 @@ var XApiClient = class {
|
|
|
370
370
|
export {
|
|
371
371
|
XApiClient
|
|
372
372
|
};
|
|
373
|
-
//# sourceMappingURL=client-
|
|
373
|
+
//# sourceMappingURL=client-4SPM3HMZ.js.map
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
logInteraction
|
|
6
6
|
} from "./chunk-EBO4F5NU.js";
|
|
7
|
-
import {
|
|
8
|
-
identityExists,
|
|
9
|
-
loadIdentity
|
|
10
|
-
} from "./chunk-ELFOCELE.js";
|
|
11
7
|
import {
|
|
12
8
|
logger
|
|
13
9
|
} from "./chunk-KELPENM3.js";
|
|
14
10
|
import "./chunk-YEKHNTQO.js";
|
|
11
|
+
import {
|
|
12
|
+
identityExists,
|
|
13
|
+
loadIdentity
|
|
14
|
+
} from "./chunk-ELFOCELE.js";
|
|
15
15
|
import {
|
|
16
16
|
loadCredentials
|
|
17
17
|
} from "./chunk-ZJZKH7N7.js";
|
|
@@ -398,4 +398,4 @@ var XBrowserClient = class {
|
|
|
398
398
|
export {
|
|
399
399
|
XBrowserClient
|
|
400
400
|
};
|
|
401
|
-
//# sourceMappingURL=client-
|
|
401
|
+
//# sourceMappingURL=client-RQCSDX2K.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getXClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7PXG5YMD.js";
|
|
4
4
|
import {
|
|
5
5
|
addColonyEntry,
|
|
6
6
|
addOrUpdatePlan,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
renderColonyBriefing,
|
|
12
12
|
saveColonyMemory
|
|
13
13
|
} from "./chunk-AHXZIGQE.js";
|
|
14
|
-
import {
|
|
15
|
-
loadIdentity
|
|
16
|
-
} from "./chunk-ELFOCELE.js";
|
|
17
14
|
import {
|
|
18
15
|
logger
|
|
19
16
|
} from "./chunk-KELPENM3.js";
|
|
20
17
|
import "./chunk-YEKHNTQO.js";
|
|
18
|
+
import {
|
|
19
|
+
loadIdentity
|
|
20
|
+
} from "./chunk-ELFOCELE.js";
|
|
21
21
|
import "./chunk-53YLFYJF.js";
|
|
22
22
|
|
|
23
23
|
// src/colony/index.ts
|
|
@@ -226,4 +226,4 @@ export {
|
|
|
226
226
|
postStatus,
|
|
227
227
|
proposePlan
|
|
228
228
|
};
|
|
229
|
-
//# sourceMappingURL=colony-
|
|
229
|
+
//# sourceMappingURL=colony-TMBYCUUZ.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildHeartbeatUserMessage,
|
|
3
3
|
buildSystemPrompt
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7EJIEBHY.js";
|
|
5
5
|
import {
|
|
6
6
|
rateLimiter
|
|
7
7
|
} from "./chunk-NFDZ47AG.js";
|
|
8
8
|
import {
|
|
9
9
|
addToQueue,
|
|
10
10
|
flushQueue
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZLKDC7OU.js";
|
|
12
12
|
import {
|
|
13
13
|
getXClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7PXG5YMD.js";
|
|
15
15
|
import {
|
|
16
16
|
generateResponse
|
|
17
17
|
} from "./chunk-ERTBXYOP.js";
|
|
@@ -19,16 +19,16 @@ import {
|
|
|
19
19
|
addLearning,
|
|
20
20
|
logInteraction
|
|
21
21
|
} from "./chunk-EBO4F5NU.js";
|
|
22
|
-
import {
|
|
23
|
-
loadIdentity,
|
|
24
|
-
saveIdentity
|
|
25
|
-
} from "./chunk-ELFOCELE.js";
|
|
26
22
|
import {
|
|
27
23
|
logger
|
|
28
24
|
} from "./chunk-KELPENM3.js";
|
|
29
25
|
import {
|
|
30
26
|
loadConfig
|
|
31
27
|
} from "./chunk-YEKHNTQO.js";
|
|
28
|
+
import {
|
|
29
|
+
loadIdentity,
|
|
30
|
+
saveIdentity
|
|
31
|
+
} from "./chunk-ELFOCELE.js";
|
|
32
32
|
import {
|
|
33
33
|
paths
|
|
34
34
|
} from "./chunk-53YLFYJF.js";
|
|
@@ -355,4 +355,4 @@ export {
|
|
|
355
355
|
requestStop,
|
|
356
356
|
startHeartbeatLoop
|
|
357
357
|
};
|
|
358
|
-
//# sourceMappingURL=heartbeat-
|
|
358
|
+
//# sourceMappingURL=heartbeat-NA2HMGCX.js.map
|
|
@@ -3,6 +3,10 @@ import {
|
|
|
3
3
|
saveConfig
|
|
4
4
|
} from "./chunk-YEKHNTQO.js";
|
|
5
5
|
import {
|
|
6
|
+
loadIdentity
|
|
7
|
+
} from "./chunk-ELFOCELE.js";
|
|
8
|
+
import {
|
|
9
|
+
loadCredentials,
|
|
6
10
|
saveCredentials
|
|
7
11
|
} from "./chunk-ZJZKH7N7.js";
|
|
8
12
|
import {
|
|
@@ -11,8 +15,73 @@ import {
|
|
|
11
15
|
} from "./chunk-53YLFYJF.js";
|
|
12
16
|
|
|
13
17
|
// src/init.ts
|
|
14
|
-
import {
|
|
18
|
+
import { confirm, password as passwordPrompt } from "@inquirer/prompts";
|
|
15
19
|
import chalk from "chalk";
|
|
20
|
+
|
|
21
|
+
// src/x-client/profile-updater.ts
|
|
22
|
+
import { TwitterApi } from "twitter-api-v2";
|
|
23
|
+
async function updateXProfile(identity) {
|
|
24
|
+
const result = {
|
|
25
|
+
success: false,
|
|
26
|
+
updated: [],
|
|
27
|
+
errors: []
|
|
28
|
+
};
|
|
29
|
+
try {
|
|
30
|
+
const creds = loadCredentials();
|
|
31
|
+
if (creds.method !== "api") {
|
|
32
|
+
result.errors.push("API credentials required");
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
const client = new TwitterApi({
|
|
36
|
+
appKey: creds.apiKey,
|
|
37
|
+
appSecret: creds.apiSecret,
|
|
38
|
+
accessToken: creds.accessToken,
|
|
39
|
+
accessSecret: creds.accessTokenSecret
|
|
40
|
+
});
|
|
41
|
+
try {
|
|
42
|
+
await client.v1.updateAccountProfile({
|
|
43
|
+
name: identity.name,
|
|
44
|
+
description: identity.bio
|
|
45
|
+
});
|
|
46
|
+
result.updated.push("name", "bio");
|
|
47
|
+
} catch (error) {
|
|
48
|
+
result.errors.push(`Failed to update name/bio: ${error.message}`);
|
|
49
|
+
}
|
|
50
|
+
if (identity.profileImage) {
|
|
51
|
+
try {
|
|
52
|
+
const imageBuffer = await downloadImage(identity.profileImage);
|
|
53
|
+
await client.v1.updateAccountProfileImage(imageBuffer);
|
|
54
|
+
result.updated.push("profile_image");
|
|
55
|
+
} catch (error) {
|
|
56
|
+
result.errors.push(`Failed to update profile image: ${error.message}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (identity.bannerImage) {
|
|
60
|
+
try {
|
|
61
|
+
const imageBuffer = await downloadImage(identity.bannerImage);
|
|
62
|
+
await client.v1.updateAccountProfileBanner(imageBuffer);
|
|
63
|
+
result.updated.push("banner_image");
|
|
64
|
+
} catch (error) {
|
|
65
|
+
result.errors.push(`Failed to update banner: ${error.message}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
result.success = result.updated.length > 0;
|
|
69
|
+
return result;
|
|
70
|
+
} catch (error) {
|
|
71
|
+
result.errors.push(error.message);
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async function downloadImage(url) {
|
|
76
|
+
const response = await fetch(url);
|
|
77
|
+
if (!response.ok) {
|
|
78
|
+
throw new Error(`Failed to download image: ${response.statusText}`);
|
|
79
|
+
}
|
|
80
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
81
|
+
return Buffer.from(arrayBuffer);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// src/init.ts
|
|
16
85
|
async function runInit(token) {
|
|
17
86
|
console.log(chalk.bold.cyan("\n\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"));
|
|
18
87
|
console.log(chalk.bold.cyan("\u2551 Welcome to Spora CLI Setup \u2551"));
|
|
@@ -89,16 +158,21 @@ async function runInit(token) {
|
|
|
89
158
|
writeFileSync(paths.llmKey, llmKey, "utf-8");
|
|
90
159
|
console.log(chalk.green("\u2713 Anthropic API key saved\n"));
|
|
91
160
|
console.log(chalk.bold("\n\u2501\u2501\u2501 Step 2: Connect Your X Account \u2501\u2501\u2501\n"));
|
|
92
|
-
console.log(chalk.gray("Your Spore needs
|
|
93
|
-
console.log(chalk.gray("
|
|
94
|
-
console.log(chalk.
|
|
161
|
+
console.log(chalk.gray("Your Spore needs OAuth 1.0a credentials for full X API access."));
|
|
162
|
+
console.log(chalk.gray("This gives your agent the power to read timelines, post tweets, reply, like, and follow.\n"));
|
|
163
|
+
console.log(chalk.cyan("\u{1F4CB} How to get these credentials:"));
|
|
164
|
+
console.log(chalk.gray(" 1. Go to: ") + chalk.cyan("https://developer.x.com/en/portal/dashboard"));
|
|
165
|
+
console.log(chalk.gray(" 2. Create or select your app"));
|
|
166
|
+
console.log(chalk.gray(' 3. Go to "Keys and tokens" tab'));
|
|
167
|
+
console.log(chalk.gray(" 4. Copy all 4 credentials below\n"));
|
|
168
|
+
console.log(chalk.yellow("\u26A0\uFE0F Note: You need X Pro account ($200/mo) for posting access.\n"));
|
|
95
169
|
const apiKey = await passwordPrompt({
|
|
96
|
-
message: "X API Key:",
|
|
170
|
+
message: "X API Key (Consumer Key):",
|
|
97
171
|
mask: "*",
|
|
98
172
|
validate: (val) => val.length > 0 ? true : "API Key is required"
|
|
99
173
|
});
|
|
100
174
|
const apiSecret = await passwordPrompt({
|
|
101
|
-
message: "X API Secret:",
|
|
175
|
+
message: "X API Secret (Consumer Secret):",
|
|
102
176
|
mask: "*",
|
|
103
177
|
validate: (val) => val.length > 0 ? true : "API Secret is required"
|
|
104
178
|
});
|
|
@@ -117,19 +191,6 @@ async function runInit(token) {
|
|
|
117
191
|
mask: "*",
|
|
118
192
|
validate: (val) => val.length > 0 ? true : "Bearer Token is required"
|
|
119
193
|
});
|
|
120
|
-
const xApiTier = await select({
|
|
121
|
-
message: "Which X API tier do you have?",
|
|
122
|
-
choices: [
|
|
123
|
-
{
|
|
124
|
-
value: "basic",
|
|
125
|
-
name: "Pro ($200/mo) \u2014 Full access, read/write"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
value: "free",
|
|
129
|
-
name: "Free \u2014 Limited to 500 posts/month"
|
|
130
|
-
}
|
|
131
|
-
]
|
|
132
|
-
});
|
|
133
194
|
const xCredentials = {
|
|
134
195
|
method: "api",
|
|
135
196
|
apiKey,
|
|
@@ -140,9 +201,47 @@ async function runInit(token) {
|
|
|
140
201
|
};
|
|
141
202
|
saveCredentials(xCredentials);
|
|
142
203
|
console.log(chalk.green("\u2713 X API credentials saved (encrypted)\n"));
|
|
204
|
+
console.log(chalk.bold("\n\u2501\u2501\u2501 Step 3: Updating Your X Profile \u2501\u2501\u2501\n"));
|
|
205
|
+
console.log(chalk.gray("Setting up profile picture, banner, and bio to match your Spore...\n"));
|
|
206
|
+
try {
|
|
207
|
+
const identity = loadIdentity();
|
|
208
|
+
const result = await updateXProfile(identity);
|
|
209
|
+
if (result.success) {
|
|
210
|
+
console.log(chalk.green("\u2713 Profile updated successfully!\n"));
|
|
211
|
+
if (result.updated.length > 0) {
|
|
212
|
+
console.log(chalk.cyan("Updated:"));
|
|
213
|
+
for (const field of result.updated) {
|
|
214
|
+
console.log(chalk.gray(` \u2022 ${field}`));
|
|
215
|
+
}
|
|
216
|
+
console.log();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (result.errors.length > 0) {
|
|
220
|
+
console.log(chalk.yellow("\n\u26A0\uFE0F Some updates failed:"));
|
|
221
|
+
for (const error of result.errors) {
|
|
222
|
+
console.log(chalk.gray(` \u2022 ${error}`));
|
|
223
|
+
}
|
|
224
|
+
console.log();
|
|
225
|
+
console.log(chalk.gray("You can manually update your X profile with:"));
|
|
226
|
+
console.log(chalk.cyan(` Name: ${identity.name}`));
|
|
227
|
+
console.log(chalk.cyan(` Bio: ${identity.bio}`));
|
|
228
|
+
if (identity.profileImage) {
|
|
229
|
+
console.log(chalk.cyan(` Profile pic: ${identity.profileImage}`));
|
|
230
|
+
}
|
|
231
|
+
if (identity.bannerImage) {
|
|
232
|
+
console.log(chalk.cyan(` Banner: ${identity.bannerImage}`));
|
|
233
|
+
}
|
|
234
|
+
console.log();
|
|
235
|
+
}
|
|
236
|
+
} catch (error) {
|
|
237
|
+
console.log(chalk.yellow(`\u26A0\uFE0F Could not update profile: ${error.message}
|
|
238
|
+
`));
|
|
239
|
+
console.log(chalk.gray("You can manually update your X profile later.\n"));
|
|
240
|
+
}
|
|
143
241
|
const config = createDefaultConfig({
|
|
144
242
|
xMethod: "api",
|
|
145
|
-
xApiTier
|
|
243
|
+
xApiTier: "basic"
|
|
244
|
+
// Always assume full access (Pro tier)
|
|
146
245
|
});
|
|
147
246
|
config.llm = {
|
|
148
247
|
provider: "anthropic",
|
|
@@ -176,4 +275,4 @@ async function runInit(token) {
|
|
|
176
275
|
export {
|
|
177
276
|
runInit
|
|
178
277
|
};
|
|
179
|
-
//# sourceMappingURL=init-
|
|
278
|
+
//# sourceMappingURL=init-SXZMVK6K.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/init.ts","../src/x-client/profile-updater.ts"],"sourcesContent":["import { input, select, confirm, password as passwordPrompt } from \"@inquirer/prompts\";\nimport chalk from \"chalk\";\nimport { sporaExists, ensureDirectories } from \"./utils/paths.js\";\nimport { createDefaultConfig, saveConfig } from \"./utils/config.js\";\nimport { saveCredentials, type XCredentials } from \"./utils/crypto.js\";\nimport { loadIdentity } from \"./identity/index.js\";\nimport { updateXProfile } from \"./x-client/profile-updater.js\";\n\nexport async function runInit(token?: string): Promise<void> {\n console.log(chalk.bold.cyan(\"\\n╔════════════════════════════════════════╗\"));\n console.log(chalk.bold.cyan(\"║ Welcome to Spora CLI Setup ║\"));\n console.log(chalk.bold.cyan(\"╚════════════════════════════════════════╝\\n\"));\n\n if (sporaExists() && !token) {\n const overwrite = await confirm({\n message: \"A Spore already exists. Overwrite credentials?\",\n default: false,\n });\n if (!overwrite) {\n console.log(chalk.yellow(\"Init cancelled.\"));\n return;\n }\n }\n\n ensureDirectories();\n\n // ===== Token-based Auto-Connect =====\n if (token) {\n console.log(chalk.bold(\"\\n━━━ Step 1: Connecting Your Spore ━━━\\n\"));\n console.log(chalk.gray(\"Fetching your Spore identity from spora.dev...\\n\"));\n\n try {\n const apiUrl = process.env.SPORA_API_URL || \"https://www.spora.social\";\n const response = await fetch(`${apiUrl}/api/v1/connect`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ token }),\n });\n\n if (!response.ok) {\n throw new Error(`Connection failed: ${response.statusText}`);\n }\n\n const data = await response.json();\n\n if (!data.identity) {\n throw new Error(\"No Spore identity found for this token\");\n }\n\n // Save the identity\n const { saveIdentity } = await import(\"./identity/index.js\");\n saveIdentity(data.identity);\n\n console.log(chalk.green(`✓ Connected to Spore: ${data.identity.name} (@${data.identity.handle})\\n`));\n\n // Save comprehensive README if provided\n const { writeFileSync } = await import(\"node:fs\");\n const { paths } = await import(\"./utils/paths.js\");\n const { existsSync } = await import(\"node:fs\");\n const { join, dirname } = await import(\"node:path\");\n\n if (data.readme) {\n const readmePath = join(dirname(paths.identity), \"IDENTITY.md\");\n writeFileSync(readmePath, data.readme, \"utf-8\");\n console.log(chalk.green(\"✓ Saved comprehensive identity README\\n\"));\n }\n\n // Save connection token to config\n\n if (existsSync(paths.config)) {\n const { loadConfig, saveConfig } = await import(\"./utils/config.js\");\n const config = loadConfig();\n config.connection = {\n token,\n apiEndpoint: process.env.SPORA_API_URL || \"https://www.spora.social/api/v1\",\n configVersion: 0,\n };\n saveConfig(config);\n }\n } catch (error) {\n console.log(chalk.red(`\\n✗ Connection failed: ${(error as Error).message}\\n`));\n console.log(chalk.yellow(\"Please check your token and try again.\\n\"));\n process.exit(1);\n }\n }\n\n // ===== Anthropic API Key Setup =====\n console.log(chalk.bold(\"\\n━━━ Step 1: Add Your Anthropic API Key ━━━\\n\"));\n console.log(chalk.gray(\"Your Spore uses Claude to make autonomous decisions.\"));\n console.log(chalk.gray(\"Get your API key at: \") + chalk.cyan(\"https://console.anthropic.com/keys\\n\"));\n\n const llmKey = await passwordPrompt({\n message: \"Anthropic API Key:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"API key is required\",\n });\n\n // Save LLM key\n const { paths } = await import(\"./utils/paths.js\");\n const { writeFileSync } = await import(\"node:fs\");\n writeFileSync(paths.llmKey, llmKey, \"utf-8\");\n console.log(chalk.green(\"✓ Anthropic API key saved\\n\"));\n\n // ===== X API Credentials Setup =====\n console.log(chalk.bold(\"\\n━━━ Step 2: Connect Your X Account ━━━\\n\"));\n console.log(chalk.gray(\"Your Spore needs OAuth 1.0a credentials for full X API access.\"));\n console.log(chalk.gray(\"This gives your agent the power to read timelines, post tweets, reply, like, and follow.\\n\"));\n console.log(chalk.cyan(\"📋 How to get these credentials:\"));\n console.log(chalk.gray(\" 1. Go to: \") + chalk.cyan(\"https://developer.x.com/en/portal/dashboard\"));\n console.log(chalk.gray(\" 2. Create or select your app\"));\n console.log(chalk.gray(\" 3. Go to \\\"Keys and tokens\\\" tab\"));\n console.log(chalk.gray(\" 4. Copy all 4 credentials below\\n\"));\n console.log(chalk.yellow(\"⚠️ Note: You need X Pro account ($200/mo) for posting access.\\n\"));\n\n const apiKey = await passwordPrompt({\n message: \"X API Key (Consumer Key):\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"API Key is required\",\n });\n\n const apiSecret = await passwordPrompt({\n message: \"X API Secret (Consumer Secret):\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"API Secret is required\",\n });\n\n const accessToken = await passwordPrompt({\n message: \"X Access Token:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"Access Token is required\",\n });\n\n const accessTokenSecret = await passwordPrompt({\n message: \"X Access Token Secret:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"Access Token Secret is required\",\n });\n\n const bearerToken = await passwordPrompt({\n message: \"X Bearer Token:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"Bearer Token is required\",\n });\n\n const xCredentials: XCredentials = {\n method: \"api\",\n apiKey,\n apiSecret,\n accessToken,\n accessTokenSecret,\n bearerToken,\n };\n\n saveCredentials(xCredentials);\n console.log(chalk.green(\"✓ X API credentials saved (encrypted)\\n\"));\n\n // ===== Update X Profile with Spore Identity =====\n console.log(chalk.bold(\"\\n━━━ Step 3: Updating Your X Profile ━━━\\n\"));\n console.log(chalk.gray(\"Setting up profile picture, banner, and bio to match your Spore...\\n\"));\n\n try {\n const identity = loadIdentity();\n const result = await updateXProfile(identity);\n\n if (result.success) {\n console.log(chalk.green(\"✓ Profile updated successfully!\\n\"));\n\n if (result.updated.length > 0) {\n console.log(chalk.cyan(\"Updated:\"));\n for (const field of result.updated) {\n console.log(chalk.gray(` • ${field}`));\n }\n console.log();\n }\n }\n\n if (result.errors.length > 0) {\n console.log(chalk.yellow(\"\\n⚠️ Some updates failed:\"));\n for (const error of result.errors) {\n console.log(chalk.gray(` • ${error}`));\n }\n console.log();\n\n console.log(chalk.gray(\"You can manually update your X profile with:\"));\n console.log(chalk.cyan(` Name: ${identity.name}`));\n console.log(chalk.cyan(` Bio: ${identity.bio}`));\n if (identity.profileImage) {\n console.log(chalk.cyan(` Profile pic: ${identity.profileImage}`));\n }\n if (identity.bannerImage) {\n console.log(chalk.cyan(` Banner: ${identity.bannerImage}`));\n }\n console.log();\n }\n } catch (error) {\n console.log(chalk.yellow(`⚠️ Could not update profile: ${(error as Error).message}\\n`));\n console.log(chalk.gray(\"You can manually update your X profile later.\\n\"));\n }\n\n const config = createDefaultConfig({\n xMethod: \"api\",\n xApiTier: \"basic\", // Always assume full access (Pro tier)\n });\n\n // Add LLM config\n config.llm = {\n provider: \"anthropic\",\n model: \"claude-sonnet-4-20250514\",\n };\n\n // Enable runtime by default\n config.runtime = {\n heartbeatIntervalMs: 300_000, // 5 minutes\n actionsPerHeartbeat: 3,\n enabled: true,\n };\n\n saveConfig(config);\n\n // ===== Done =====\n console.log(chalk.green(\"\\n╔═══════════════════════════════════════╗\"));\n console.log(chalk.green.bold(\"║ Setup Complete! 🎉 ║\"));\n console.log(chalk.green(\"╚═══════════════════════════════════════╝\\n\"));\n\n console.log(chalk.bold.cyan(\"━━━ Your Spore is Ready! ━━━\\n\"));\n console.log(chalk.gray(\"You can now chat with your Spore and give it commands.\\n\"));\n\n console.log(chalk.bold(\"Quick Start:\\n\"));\n console.log(chalk.cyan(\" spora chat\"));\n console.log(chalk.gray(\" → Talk to your Spore, tell it what to post, how to behave\\n\"));\n\n console.log(chalk.bold(\"Or start the autonomous agent:\\n\"));\n console.log(chalk.cyan(\" spora start\"));\n console.log(chalk.gray(\" → Your Spore will post and engage autonomously\\n\"));\n\n console.log(chalk.bold(\"Other commands:\\n\"));\n console.log(chalk.cyan(\" spora create \") + chalk.gray(\"# Create a personality\"));\n console.log(chalk.cyan(\" spora post <text> \") + chalk.gray(\"# Make your Spore post\"));\n console.log(chalk.cyan(\" spora agent-status \") + chalk.gray(\"# Check if agent is running\"));\n console.log(chalk.cyan(\" spora stop \") + chalk.gray(\"# Stop the agent\"));\n console.log(chalk.cyan(\" spora --help \") + chalk.gray(\"# See all commands\\n\"));\n}\n","/**\n * X Profile Updater\n * Updates X profile to match Spore identity (name, bio, profile pic, banner)\n */\n\nimport { TwitterApi } from \"twitter-api-v2\";\nimport type { Identity } from \"../identity/schema.js\";\nimport { loadCredentials } from \"../utils/crypto.js\";\n\ninterface ProfileUpdateResult {\n success: boolean;\n updated: string[];\n errors: string[];\n}\n\n/**\n * Update X profile to match Spore identity\n * Requires OAuth 1.0a credentials\n */\nexport async function updateXProfile(identity: Identity): Promise<ProfileUpdateResult> {\n const result: ProfileUpdateResult = {\n success: false,\n updated: [],\n errors: [],\n };\n\n try {\n const creds = loadCredentials();\n if (creds.method !== \"api\") {\n result.errors.push(\"API credentials required\");\n return result;\n }\n\n // Create Twitter API client with OAuth 1.0a credentials\n const client = new TwitterApi({\n appKey: creds.apiKey!,\n appSecret: creds.apiSecret!,\n accessToken: creds.accessToken!,\n accessSecret: creds.accessTokenSecret!,\n });\n\n // Update profile name and bio\n try {\n await client.v1.updateAccountProfile({\n name: identity.name,\n description: identity.bio,\n });\n result.updated.push(\"name\", \"bio\");\n } catch (error) {\n result.errors.push(`Failed to update name/bio: ${(error as Error).message}`);\n }\n\n // Update profile image if available\n if (identity.profileImage) {\n try {\n // Download image from URL\n const imageBuffer = await downloadImage(identity.profileImage);\n await client.v1.updateAccountProfileImage(imageBuffer);\n result.updated.push(\"profile_image\");\n } catch (error) {\n result.errors.push(`Failed to update profile image: ${(error as Error).message}`);\n }\n }\n\n // Update banner image if available\n if (identity.bannerImage) {\n try {\n // Download image from URL\n const imageBuffer = await downloadImage(identity.bannerImage);\n await client.v1.updateAccountProfileBanner(imageBuffer);\n result.updated.push(\"banner_image\");\n } catch (error) {\n result.errors.push(`Failed to update banner: ${(error as Error).message}`);\n }\n }\n\n result.success = result.updated.length > 0;\n return result;\n } catch (error) {\n result.errors.push((error as Error).message);\n return result;\n }\n}\n\n/**\n * Download image from URL and return as Buffer\n */\nasync function downloadImage(url: string): Promise<Buffer> {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to download image: ${response.statusText}`);\n }\n const arrayBuffer = await response.arrayBuffer();\n return Buffer.from(arrayBuffer);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAwB,SAAS,YAAY,sBAAsB;AACnE,OAAO,WAAW;;;ACIlB,SAAS,kBAAkB;AAc3B,eAAsB,eAAe,UAAkD;AACrF,QAAM,SAA8B;AAAA,IAClC,SAAS;AAAA,IACT,SAAS,CAAC;AAAA,IACV,QAAQ,CAAC;AAAA,EACX;AAEA,MAAI;AACF,UAAM,QAAQ,gBAAgB;AAC9B,QAAI,MAAM,WAAW,OAAO;AAC1B,aAAO,OAAO,KAAK,0BAA0B;AAC7C,aAAO;AAAA,IACT;AAGA,UAAM,SAAS,IAAI,WAAW;AAAA,MAC5B,QAAQ,MAAM;AAAA,MACd,WAAW,MAAM;AAAA,MACjB,aAAa,MAAM;AAAA,MACnB,cAAc,MAAM;AAAA,IACtB,CAAC;AAGD,QAAI;AACF,YAAM,OAAO,GAAG,qBAAqB;AAAA,QACnC,MAAM,SAAS;AAAA,QACf,aAAa,SAAS;AAAA,MACxB,CAAC;AACD,aAAO,QAAQ,KAAK,QAAQ,KAAK;AAAA,IACnC,SAAS,OAAO;AACd,aAAO,OAAO,KAAK,8BAA+B,MAAgB,OAAO,EAAE;AAAA,IAC7E;AAGA,QAAI,SAAS,cAAc;AACzB,UAAI;AAEF,cAAM,cAAc,MAAM,cAAc,SAAS,YAAY;AAC7D,cAAM,OAAO,GAAG,0BAA0B,WAAW;AACrD,eAAO,Q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EtE,UAAQ,IAAI,MAAM,KAAK,KAAK,8DAAgC,CAAC;AAC7D,UAAQ,IAAI,MAAM,KAAK,0DAA0D,CAAC;AAElF,UAAQ,IAAI,MAAM,KAAK,gBAAgB,CAAC;AACxC,UAAQ,IAAI,MAAM,KAAK,eAAe,CAAC;AACvC,UAAQ,IAAI,MAAM,KAAK,qEAAgE,CAAC;AAExF,UAAQ,IAAI,MAAM,KAAK,kCAAkC,CAAC;AAC1D,UAAQ,IAAI,MAAM,KAAK,gBAAgB,CAAC;AACxC,UAAQ,IAAI,MAAM,KAAK,0DAAqD,CAAC;AAE7E,UAAQ,IAAI,MAAM,KAAK,mBAAmB,CAAC;AAC3C,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,wBAAwB,CAAC;AAC3F,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,wBAAwB,CAAC;AAC3F,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,6BAA6B,CAAC;AAChG,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,kBAAkB,CAAC;AACrF,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,sBAAsB,CAAC;AAC3F;","names":["writeFileSync","paths","saveConfig","config"]}
|
package/dist/mcp-server.js
CHANGED
|
@@ -6,6 +6,13 @@ import {
|
|
|
6
6
|
loadRelationships,
|
|
7
7
|
updateRelationship
|
|
8
8
|
} from "./chunk-EBO4F5NU.js";
|
|
9
|
+
import {
|
|
10
|
+
logger,
|
|
11
|
+
setLogLevel
|
|
12
|
+
} from "./chunk-KELPENM3.js";
|
|
13
|
+
import {
|
|
14
|
+
loadConfig
|
|
15
|
+
} from "./chunk-YEKHNTQO.js";
|
|
9
16
|
import {
|
|
10
17
|
FRAMEWORKS,
|
|
11
18
|
GOAL_PRESETS,
|
|
@@ -15,13 +22,6 @@ import {
|
|
|
15
22
|
renderIdentityDocument,
|
|
16
23
|
saveIdentity
|
|
17
24
|
} from "./chunk-ELFOCELE.js";
|
|
18
|
-
import {
|
|
19
|
-
logger,
|
|
20
|
-
setLogLevel
|
|
21
|
-
} from "./chunk-KELPENM3.js";
|
|
22
|
-
import {
|
|
23
|
-
loadConfig
|
|
24
|
-
} from "./chunk-YEKHNTQO.js";
|
|
25
25
|
import "./chunk-53YLFYJF.js";
|
|
26
26
|
|
|
27
27
|
// src/mcp-server.ts
|
|
@@ -388,7 +388,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
388
388
|
},
|
|
389
389
|
async ({ content }) => {
|
|
390
390
|
try {
|
|
391
|
-
const { getXClient } = await import("./x-client-
|
|
391
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
392
392
|
const client = await getXClient();
|
|
393
393
|
const result = await client.postTweet(content);
|
|
394
394
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -406,7 +406,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
406
406
|
},
|
|
407
407
|
async ({ tweetId, content }) => {
|
|
408
408
|
try {
|
|
409
|
-
const { getXClient } = await import("./x-client-
|
|
409
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
410
410
|
const client = await getXClient();
|
|
411
411
|
const result = await client.replyToTweet(tweetId, content);
|
|
412
412
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -421,7 +421,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
421
421
|
{ tweetId: z.string().describe("The ID of the tweet to like") },
|
|
422
422
|
async ({ tweetId }) => {
|
|
423
423
|
try {
|
|
424
|
-
const { getXClient } = await import("./x-client-
|
|
424
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
425
425
|
const client = await getXClient();
|
|
426
426
|
const result = await client.likeTweet(tweetId);
|
|
427
427
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -436,7 +436,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
436
436
|
{ tweetId: z.string().describe("The ID of the tweet to retweet") },
|
|
437
437
|
async ({ tweetId }) => {
|
|
438
438
|
try {
|
|
439
|
-
const { getXClient } = await import("./x-client-
|
|
439
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
440
440
|
const client = await getXClient();
|
|
441
441
|
const result = await client.retweet(tweetId);
|
|
442
442
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -451,7 +451,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
451
451
|
{ userId: z.string().describe("The user ID to follow") },
|
|
452
452
|
async ({ userId }) => {
|
|
453
453
|
try {
|
|
454
|
-
const { getXClient } = await import("./x-client-
|
|
454
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
455
455
|
const client = await getXClient();
|
|
456
456
|
const result = await client.followUser(userId);
|
|
457
457
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -466,7 +466,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
466
466
|
{ userId: z.string().describe("The user ID to unfollow") },
|
|
467
467
|
async ({ userId }) => {
|
|
468
468
|
try {
|
|
469
|
-
const { getXClient } = await import("./x-client-
|
|
469
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
470
470
|
const client = await getXClient();
|
|
471
471
|
const result = await client.unfollowUser(userId);
|
|
472
472
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -481,7 +481,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
481
481
|
{ count: z.number().optional().describe("Number of tweets to fetch (default 20)") },
|
|
482
482
|
async ({ count }) => {
|
|
483
483
|
try {
|
|
484
|
-
const { getXClient } = await import("./x-client-
|
|
484
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
485
485
|
const client = await getXClient();
|
|
486
486
|
const result = await client.getTimeline({ count: count ?? 20 });
|
|
487
487
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -496,7 +496,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
496
496
|
{ count: z.number().optional().describe("Number of mentions to fetch (default 20)") },
|
|
497
497
|
async ({ count }) => {
|
|
498
498
|
try {
|
|
499
|
-
const { getXClient } = await import("./x-client-
|
|
499
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
500
500
|
const client = await getXClient();
|
|
501
501
|
const result = await client.getMentions({ count: count ?? 20 });
|
|
502
502
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -514,7 +514,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
514
514
|
},
|
|
515
515
|
async ({ query, count }) => {
|
|
516
516
|
try {
|
|
517
|
-
const { getXClient } = await import("./x-client-
|
|
517
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
518
518
|
const client = await getXClient();
|
|
519
519
|
const result = await client.searchTweets(query, { count: count ?? 20 });
|
|
520
520
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -529,7 +529,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
529
529
|
{ handle: z.string().describe("X handle (without @)") },
|
|
530
530
|
async ({ handle }) => {
|
|
531
531
|
try {
|
|
532
|
-
const { getXClient } = await import("./x-client-
|
|
532
|
+
const { getXClient } = await import("./x-client-RP2KICYN.js");
|
|
533
533
|
const client = await getXClient();
|
|
534
534
|
const result = await client.getProfile(handle);
|
|
535
535
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
@@ -547,7 +547,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
547
547
|
},
|
|
548
548
|
async ({ content, scheduledFor }) => {
|
|
549
549
|
try {
|
|
550
|
-
const { addToQueue } = await import("./queue-
|
|
550
|
+
const { addToQueue } = await import("./queue-QUF5GX4J.js");
|
|
551
551
|
const entry = addToQueue(content, scheduledFor);
|
|
552
552
|
return {
|
|
553
553
|
content: [
|
|
@@ -565,7 +565,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
565
565
|
{},
|
|
566
566
|
async () => {
|
|
567
567
|
try {
|
|
568
|
-
const { flushQueue } = await import("./queue-
|
|
568
|
+
const { flushQueue } = await import("./queue-QUF5GX4J.js");
|
|
569
569
|
const results = await flushQueue();
|
|
570
570
|
return {
|
|
571
571
|
content: [
|
|
@@ -586,7 +586,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
586
586
|
{ message: z.string().optional().describe("Optional message to post to the Colony community") },
|
|
587
587
|
async ({ message }) => {
|
|
588
588
|
try {
|
|
589
|
-
const { colonyCheckin } = await import("./colony-
|
|
589
|
+
const { colonyCheckin } = await import("./colony-TMBYCUUZ.js");
|
|
590
590
|
const result = await colonyCheckin(message);
|
|
591
591
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
592
592
|
} catch (error) {
|
|
@@ -600,7 +600,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
600
600
|
{},
|
|
601
601
|
async () => {
|
|
602
602
|
try {
|
|
603
|
-
const { getColonyMemory } = await import("./colony-
|
|
603
|
+
const { getColonyMemory } = await import("./colony-TMBYCUUZ.js");
|
|
604
604
|
const memory = getColonyMemory();
|
|
605
605
|
return { content: [{ type: "text", text: JSON.stringify(memory, null, 2) }] };
|
|
606
606
|
} catch (error) {
|
|
@@ -614,7 +614,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
614
614
|
{},
|
|
615
615
|
async () => {
|
|
616
616
|
try {
|
|
617
|
-
const { getActivePlans } = await import("./colony-
|
|
617
|
+
const { getActivePlans } = await import("./colony-TMBYCUUZ.js");
|
|
618
618
|
const plans = getActivePlans();
|
|
619
619
|
return {
|
|
620
620
|
content: [
|
|
@@ -637,7 +637,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
637
637
|
},
|
|
638
638
|
async ({ description }) => {
|
|
639
639
|
try {
|
|
640
|
-
const { proposePlan } = await import("./colony-
|
|
640
|
+
const { proposePlan } = await import("./colony-TMBYCUUZ.js");
|
|
641
641
|
const result = await proposePlan(description);
|
|
642
642
|
if (result.success) {
|
|
643
643
|
return {
|
|
@@ -660,7 +660,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
660
660
|
},
|
|
661
661
|
async ({ planId }) => {
|
|
662
662
|
try {
|
|
663
|
-
const { joinPlan } = await import("./colony-
|
|
663
|
+
const { joinPlan } = await import("./colony-TMBYCUUZ.js");
|
|
664
664
|
const result = await joinPlan(planId);
|
|
665
665
|
if (result.success) {
|
|
666
666
|
return { content: [{ type: "text", text: "Joined the plan! Go execute it." }] };
|
|
@@ -679,7 +679,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
679
679
|
},
|
|
680
680
|
async ({ status }) => {
|
|
681
681
|
try {
|
|
682
|
-
const { postStatus } = await import("./colony-
|
|
682
|
+
const { postStatus } = await import("./colony-TMBYCUUZ.js");
|
|
683
683
|
const result = await postStatus(status);
|
|
684
684
|
if (result.success) {
|
|
685
685
|
return { content: [{ type: "text", text: "Status posted to the Colony." }] };
|
|
@@ -696,7 +696,7 @@ Identity saved. Your Spore is alive. Use spora_get_identity to read the full doc
|
|
|
696
696
|
{},
|
|
697
697
|
async () => {
|
|
698
698
|
try {
|
|
699
|
-
const { getTodaysActivity } = await import("./colony-
|
|
699
|
+
const { getTodaysActivity } = await import("./colony-TMBYCUUZ.js");
|
|
700
700
|
const activity = getTodaysActivity();
|
|
701
701
|
return {
|
|
702
702
|
content: [
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
buildChatPrompt,
|
|
3
3
|
buildHeartbeatUserMessage,
|
|
4
4
|
buildSystemPrompt
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7EJIEBHY.js";
|
|
6
6
|
import "./chunk-NFDZ47AG.js";
|
|
7
7
|
import "./chunk-EBO4F5NU.js";
|
|
8
|
-
import "./chunk-ELFOCELE.js";
|
|
9
8
|
import "./chunk-KELPENM3.js";
|
|
10
9
|
import "./chunk-YEKHNTQO.js";
|
|
10
|
+
import "./chunk-ELFOCELE.js";
|
|
11
11
|
import "./chunk-53YLFYJF.js";
|
|
12
12
|
export {
|
|
13
13
|
buildChatPrompt,
|
|
14
14
|
buildHeartbeatUserMessage,
|
|
15
15
|
buildSystemPrompt
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=prompt-builder-
|
|
17
|
+
//# sourceMappingURL=prompt-builder-AT2ZFQ4A.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
addToQueue,
|
|
3
3
|
flushQueue,
|
|
4
4
|
showQueue
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZLKDC7OU.js";
|
|
6
6
|
import "./chunk-KELPENM3.js";
|
|
7
7
|
import "./chunk-YEKHNTQO.js";
|
|
8
8
|
import "./chunk-53YLFYJF.js";
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
flushQueue,
|
|
12
12
|
showQueue
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=queue-
|
|
14
|
+
//# sourceMappingURL=queue-QUF5GX4J.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getXClient,
|
|
3
3
|
resetXClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7PXG5YMD.js";
|
|
5
5
|
import "./chunk-KELPENM3.js";
|
|
6
6
|
import "./chunk-YEKHNTQO.js";
|
|
7
7
|
import "./chunk-53YLFYJF.js";
|
|
@@ -9,4 +9,4 @@ export {
|
|
|
9
9
|
getXClient,
|
|
10
10
|
resetXClient
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=x-client-
|
|
12
|
+
//# sourceMappingURL=x-client-RP2KICYN.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spora",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "AI agents (Spores) that autonomously manage X/Twitter accounts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Spora",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"chalk": "^5.3.0",
|
|
45
45
|
"commander": "^12.1.0",
|
|
46
46
|
"playwright": "^1.49.0",
|
|
47
|
+
"twitter-api-v2": "^1.29.0",
|
|
47
48
|
"zod": "^3.24.0"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/init.ts"],"sourcesContent":["import { input, select, confirm, password as passwordPrompt } from \"@inquirer/prompts\";\nimport chalk from \"chalk\";\nimport { sporaExists, ensureDirectories } from \"./utils/paths.js\";\nimport { createDefaultConfig, saveConfig } from \"./utils/config.js\";\nimport { saveCredentials, type XCredentials } from \"./utils/crypto.js\";\n\nexport async function runInit(token?: string): Promise<void> {\n console.log(chalk.bold.cyan(\"\\n╔════════════════════════════════════════╗\"));\n console.log(chalk.bold.cyan(\"║ Welcome to Spora CLI Setup ║\"));\n console.log(chalk.bold.cyan(\"╚════════════════════════════════════════╝\\n\"));\n\n if (sporaExists() && !token) {\n const overwrite = await confirm({\n message: \"A Spore already exists. Overwrite credentials?\",\n default: false,\n });\n if (!overwrite) {\n console.log(chalk.yellow(\"Init cancelled.\"));\n return;\n }\n }\n\n ensureDirectories();\n\n // ===== Token-based Auto-Connect =====\n if (token) {\n console.log(chalk.bold(\"\\n━━━ Step 1: Connecting Your Spore ━━━\\n\"));\n console.log(chalk.gray(\"Fetching your Spore identity from spora.dev...\\n\"));\n\n try {\n const apiUrl = process.env.SPORA_API_URL || \"https://www.spora.social\";\n const response = await fetch(`${apiUrl}/api/v1/connect`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ token }),\n });\n\n if (!response.ok) {\n throw new Error(`Connection failed: ${response.statusText}`);\n }\n\n const data = await response.json();\n\n if (!data.identity) {\n throw new Error(\"No Spore identity found for this token\");\n }\n\n // Save the identity\n const { saveIdentity } = await import(\"./identity/index.js\");\n saveIdentity(data.identity);\n\n console.log(chalk.green(`✓ Connected to Spore: ${data.identity.name} (@${data.identity.handle})\\n`));\n\n // Save comprehensive README if provided\n const { writeFileSync } = await import(\"node:fs\");\n const { paths } = await import(\"./utils/paths.js\");\n const { existsSync } = await import(\"node:fs\");\n const { join, dirname } = await import(\"node:path\");\n\n if (data.readme) {\n const readmePath = join(dirname(paths.identity), \"IDENTITY.md\");\n writeFileSync(readmePath, data.readme, \"utf-8\");\n console.log(chalk.green(\"✓ Saved comprehensive identity README\\n\"));\n }\n\n // Save connection token to config\n\n if (existsSync(paths.config)) {\n const { loadConfig, saveConfig } = await import(\"./utils/config.js\");\n const config = loadConfig();\n config.connection = {\n token,\n apiEndpoint: process.env.SPORA_API_URL || \"https://www.spora.social/api/v1\",\n configVersion: 0,\n };\n saveConfig(config);\n }\n } catch (error) {\n console.log(chalk.red(`\\n✗ Connection failed: ${(error as Error).message}\\n`));\n console.log(chalk.yellow(\"Please check your token and try again.\\n\"));\n process.exit(1);\n }\n }\n\n // ===== Anthropic API Key Setup =====\n console.log(chalk.bold(\"\\n━━━ Step 1: Add Your Anthropic API Key ━━━\\n\"));\n console.log(chalk.gray(\"Your Spore uses Claude to make autonomous decisions.\"));\n console.log(chalk.gray(\"Get your API key at: \") + chalk.cyan(\"https://console.anthropic.com/keys\\n\"));\n\n const llmKey = await passwordPrompt({\n message: \"Anthropic API Key:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"API key is required\",\n });\n\n // Save LLM key\n const { paths } = await import(\"./utils/paths.js\");\n const { writeFileSync } = await import(\"node:fs\");\n writeFileSync(paths.llmKey, llmKey, \"utf-8\");\n console.log(chalk.green(\"✓ Anthropic API key saved\\n\"));\n\n // ===== X API Credentials Setup =====\n console.log(chalk.bold(\"\\n━━━ Step 2: Connect Your X Account ━━━\\n\"));\n console.log(chalk.gray(\"Your Spore needs X API credentials to post and interact.\"));\n console.log(chalk.gray(\"Get them at: \") + chalk.cyan(\"https://developer.x.com/en/portal/dashboard\\n\"));\n console.log(chalk.yellow(\"Note: You need a Pro account ($200/mo) for full access.\\n\"));\n\n const apiKey = await passwordPrompt({\n message: \"X API Key:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"API Key is required\",\n });\n\n const apiSecret = await passwordPrompt({\n message: \"X API Secret:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"API Secret is required\",\n });\n\n const accessToken = await passwordPrompt({\n message: \"X Access Token:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"Access Token is required\",\n });\n\n const accessTokenSecret = await passwordPrompt({\n message: \"X Access Token Secret:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"Access Token Secret is required\",\n });\n\n const bearerToken = await passwordPrompt({\n message: \"X Bearer Token:\",\n mask: \"*\",\n validate: (val) => val.length > 0 ? true : \"Bearer Token is required\",\n });\n\n const xApiTier = await select({\n message: \"Which X API tier do you have?\",\n choices: [\n {\n value: \"basic\" as const,\n name: \"Pro ($200/mo) — Full access, read/write\",\n },\n {\n value: \"free\" as const,\n name: \"Free — Limited to 500 posts/month\",\n },\n ],\n });\n\n const xCredentials: XCredentials = {\n method: \"api\",\n apiKey,\n apiSecret,\n accessToken,\n accessTokenSecret,\n bearerToken,\n };\n\n saveCredentials(xCredentials);\n console.log(chalk.green(\"✓ X API credentials saved (encrypted)\\n\"));\n\n const config = createDefaultConfig({\n xMethod: \"api\",\n xApiTier,\n });\n\n // Add LLM config\n config.llm = {\n provider: \"anthropic\",\n model: \"claude-sonnet-4-20250514\",\n };\n\n // Enable runtime by default\n config.runtime = {\n heartbeatIntervalMs: 300_000, // 5 minutes\n actionsPerHeartbeat: 3,\n enabled: true,\n };\n\n saveConfig(config);\n\n // ===== Done =====\n console.log(chalk.green(\"\\n╔═══════════════════════════════════════╗\"));\n console.log(chalk.green.bold(\"║ Setup Complete! 🎉 ║\"));\n console.log(chalk.green(\"╚═══════════════════════════════════════╝\\n\"));\n\n console.log(chalk.bold.cyan(\"━━━ Your Spore is Ready! ━━━\\n\"));\n console.log(chalk.gray(\"You can now chat with your Spore and give it commands.\\n\"));\n\n console.log(chalk.bold(\"Quick Start:\\n\"));\n console.log(chalk.cyan(\" spora chat\"));\n console.log(chalk.gray(\" → Talk to your Spore, tell it what to post, how to behave\\n\"));\n\n console.log(chalk.bold(\"Or start the autonomous agent:\\n\"));\n console.log(chalk.cyan(\" spora start\"));\n console.log(chalk.gray(\" → Your Spore will post and engage autonomously\\n\"));\n\n console.log(chalk.bold(\"Other commands:\\n\"));\n console.log(chalk.cyan(\" spora create \") + chalk.gray(\"# Create a personality\"));\n console.log(chalk.cyan(\" spora post <text> \") + chalk.gray(\"# Make your Spore post\"));\n console.log(chalk.cyan(\" spora agent-status \") + chalk.gray(\"# Check if agent is running\"));\n console.log(chalk.cyan(\" spora stop \") + chalk.gray(\"# Stop the agent\"));\n console.log(chalk.cyan(\" spora --help \") + chalk.gray(\"# See all commands\\n\"));\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAgB,QAAQ,SAAS,YAAY,sBAAsB;AACnE,OAAO,WAAW;AAKlB,eAAsB,QAAQ,OAA+B;AAC3D,UAAQ,IAAI,MAAM,KAAK,KAAK,gQAA8C,CAAC;AAC3E,UAAQ,IAAI,MAAM,KAAK,KAAK,sDAA4C,CAAC;AACzE,UAAQ,IAAI,MAAM,KAAK,KAAK,gQAA8C,CAAC;AAE3E,MAAI,YAAY,KAAK,CAAC,OAAO;AAC3B,UAAM,YAAY,M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,qBAAqB;AAAA;AAAA,IACrB,qBAAqB;AAAA,IACrB,SAAS;AAAA,EACX;AAEA,aAAW,MAAM;AAGjB,UAAQ,IAAI,MAAM,MAAM,0PAA6C,CAAC;AACtE,UAAQ,IAAI,MAAM,MAAM,KAAK,4DAA2C,CAAC;AACzE,UAAQ,IAAI,MAAM,MAAM,0PAA6C,CAAC;AAEtE,UAAQ,IAAI,MAAM,KAAK,KAAK,8DAAgC,CAAC;AAC7D,UAAQ,IAAI,MAAM,KAAK,0DAA0D,CAAC;AAElF,UAAQ,IAAI,MAAM,KAAK,gBAAgB,CAAC;AACxC,UAAQ,IAAI,MAAM,KAAK,eAAe,CAAC;AACvC,UAAQ,IAAI,MAAM,KAAK,qEAAgE,CAAC;AAExF,UAAQ,IAAI,MAAM,KAAK,kCAAkC,CAAC;AAC1D,UAAQ,IAAI,MAAM,KAAK,gBAAgB,CAAC;AACxC,UAAQ,IAAI,MAAM,KAAK,0DAAqD,CAAC;AAE7E,UAAQ,IAAI,MAAM,KAAK,mBAAmB,CAAC;AAC3C,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,wBAAwB,CAAC;AAC3F,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,wBAAwB,CAAC;AAC3F,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,6BAA6B,CAAC;AAChG,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,kBAAkB,CAAC;AACrF,UAAQ,IAAI,MAAM,KAAK,4BAA4B,IAAI,MAAM,KAAK,sBAAsB,CAAC;AAC3F;","names":["writeFileSync","paths","saveConfig","config"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|