spora 0.7.3 → 0.7.4
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/{autonomy-6UWPXTPD.js → autonomy-XUKCAZM3.js} +4 -4
- package/dist/{chunk-ZBP2ROAZ.js → chunk-EU4FMOKG.js} +3 -3
- package/dist/{chunk-7OOGNZBU.js → chunk-MDOFAAZB.js} +2 -2
- package/dist/{chunk-HGNMHGAF.js → chunk-PN5A6MCV.js} +2 -2
- package/dist/{chunk-VZBHRUZS.js → chunk-QWEYVDLU.js} +1 -1
- package/dist/chunk-QWEYVDLU.js.map +1 -0
- package/dist/cli.js +26 -26
- package/dist/{client-4KGOBIXE.js → client-Z5UQWPPI.js} +2 -2
- package/dist/{colony-IVYR233C.js → colony-NNX45EAV.js} +2 -2
- package/dist/{crypto-NOXNL4GP.js → crypto-B65ZH7KN.js} +2 -2
- package/dist/{heartbeat-CUL2FTFD.js → heartbeat-ZCCOIZGU.js} +4 -4
- package/dist/{init-2REECUVH.js → init-SEJPTOOB.js} +4 -4
- package/dist/mcp-server.js +19 -19
- package/dist/{queue-D3MRKABU.js → queue-2ZBKDFX3.js} +2 -2
- package/dist/web-chat/chat.html +190 -3
- package/dist/{web-chat-O24HGJVE.js → web-chat-ZZ65DUID.js} +106 -8
- package/dist/web-chat-ZZ65DUID.js.map +1 -0
- package/dist/{x-client-ASXVQ6EV.js → x-client-YG7UCCNI.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-VZBHRUZS.js.map +0 -1
- package/dist/web-chat-O24HGJVE.js.map +0 -1
- /package/dist/{autonomy-6UWPXTPD.js.map → autonomy-XUKCAZM3.js.map} +0 -0
- /package/dist/{chunk-ZBP2ROAZ.js.map → chunk-EU4FMOKG.js.map} +0 -0
- /package/dist/{chunk-7OOGNZBU.js.map → chunk-MDOFAAZB.js.map} +0 -0
- /package/dist/{chunk-HGNMHGAF.js.map → chunk-PN5A6MCV.js.map} +0 -0
- /package/dist/{client-4KGOBIXE.js.map → client-Z5UQWPPI.js.map} +0 -0
- /package/dist/{colony-IVYR233C.js.map → colony-NNX45EAV.js.map} +0 -0
- /package/dist/{crypto-NOXNL4GP.js.map → crypto-B65ZH7KN.js.map} +0 -0
- /package/dist/{heartbeat-CUL2FTFD.js.map → heartbeat-ZCCOIZGU.js.map} +0 -0
- /package/dist/{init-2REECUVH.js.map → init-SEJPTOOB.js.map} +0 -0
- /package/dist/{queue-D3MRKABU.js.map → queue-2ZBKDFX3.js.map} +0 -0
- /package/dist/{x-client-ASXVQ6EV.js.map → x-client-YG7UCCNI.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAutonomyCycle
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-EU4FMOKG.js";
|
|
4
|
+
import "./chunk-PN5A6MCV.js";
|
|
5
|
+
import "./chunk-MDOFAAZB.js";
|
|
6
6
|
import "./chunk-Q3YXJ2C6.js";
|
|
7
7
|
import "./chunk-P6KZIJYL.js";
|
|
8
8
|
import "./chunk-WN35MRMF.js";
|
|
@@ -16,4 +16,4 @@ import "./chunk-3RYCUGXE.js";
|
|
|
16
16
|
export {
|
|
17
17
|
runAutonomyCycle
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=autonomy-
|
|
19
|
+
//# sourceMappingURL=autonomy-XUKCAZM3.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getXClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PN5A6MCV.js";
|
|
4
4
|
import {
|
|
5
5
|
addToQueue
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MDOFAAZB.js";
|
|
7
7
|
import {
|
|
8
8
|
buildSystemPrompt,
|
|
9
9
|
buildToolDecisionMessage
|
|
@@ -374,4 +374,4 @@ async function runAutonomyCycle(maxActions) {
|
|
|
374
374
|
export {
|
|
375
375
|
runAutonomyCycle
|
|
376
376
|
};
|
|
377
|
-
//# sourceMappingURL=chunk-
|
|
377
|
+
//# sourceMappingURL=chunk-EU4FMOKG.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-YG7UCCNI.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-MDOFAAZB.js.map
|
|
@@ -13,7 +13,7 @@ async function getXClient() {
|
|
|
13
13
|
if (config.xMethod !== "api") {
|
|
14
14
|
throw new Error("Only X API mode is supported.");
|
|
15
15
|
}
|
|
16
|
-
const { XApiClient } = await import("./client-
|
|
16
|
+
const { XApiClient } = await import("./client-Z5UQWPPI.js");
|
|
17
17
|
clientInstance = new XApiClient();
|
|
18
18
|
logger.info("X client initialized: API mode");
|
|
19
19
|
return clientInstance;
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
getXClient,
|
|
27
27
|
resetXClient
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-PN5A6MCV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/crypto.ts"],"sourcesContent":["import { createCipheriv, createDecipheriv, randomBytes, createHash } from \"node:crypto\";\nimport { readFileSync, writeFileSync, existsSync } from \"node:fs\";\nimport { hostname } from \"node:os\";\nimport { paths, ensureDirectories } from \"./paths.js\";\n\nconst ALGORITHM = \"aes-256-gcm\";\n\nfunction deriveKey(): Buffer {\n const machineId = `spora-${hostname()}-${process.env.USER ?? \"default\"}`;\n return createHash(\"sha256\").update(machineId).digest();\n}\n\nexport function encrypt(data: string): string {\n const key = deriveKey();\n const iv = randomBytes(16);\n const cipher = createCipheriv(ALGORITHM, key, iv);\n\n let encrypted = cipher.update(data, \"utf-8\", \"hex\");\n encrypted += cipher.final(\"hex\");\n const authTag = cipher.getAuthTag().toString(\"hex\");\n\n return JSON.stringify({\n iv: iv.toString(\"hex\"),\n encrypted,\n authTag,\n });\n}\n\nexport function decrypt(payload: string): string {\n const key = deriveKey();\n const { iv, encrypted, authTag } = JSON.parse(payload);\n\n const decipher = createDecipheriv(ALGORITHM, key, Buffer.from(iv, \"hex\"));\n decipher.setAuthTag(Buffer.from(authTag, \"hex\"));\n\n let decrypted = decipher.update(encrypted, \"hex\", \"utf-8\");\n decrypted += decipher.final(\"utf-8\");\n\n return decrypted;\n}\n\nexport interface XCredentials {\n method: \"api\";\n username?: string;\n apiKey?: string;\n apiSecret?: string;\n accessToken?: string;\n accessTokenSecret?: string;\n bearerToken?: string;\n}\n\nexport function saveCredentials(credentials: XCredentials): void {\n ensureDirectories();\n const encrypted = encrypt(JSON.stringify(credentials));\n writeFileSync(paths.credentials, encrypted);\n}\n\nexport function loadCredentials(): XCredentials {\n if (!existsSync(paths.credentials)) {\n throw new Error(\"No credentials found. Run `spora init` first.\");\n }\n const payload = readFileSync(paths.credentials, \"utf-8\");\n return JSON.parse(decrypt(payload)) as XCredentials;\n}\n"],"mappings":";;;;;;AAAA,SAAS,gBAAgB,kBAAkB,aAAa,kBAAkB;AAC1E,SAAS,cAAc,eAAe,kBAAkB;AACxD,SAAS,gBAAgB;AAGzB,IAAM,YAAY;AAElB,SAAS,YAAoB;AAC3B,QAAM,YAAY,SAAS,SAAS,CAAC,IAAI,QAAQ,IAAI,QAAQ,SAAS;AACtE,SAAO,WAAW,QAAQ,EAAE,OAAO,SAAS,EAAE,OAAO;AACvD;AAEO,SAAS,QAAQ,MAAsB;AAC5C,QAAM,MAAM,UAAU;AACtB,QAAM,KAAK,YAAY,EAAE;AACzB,QAAM,SAAS,eAAe,WAAW,KAAK,EAAE;AAEhD,MAAI,YAAY,OAAO,OAAO,MAAM,SAAS,KAAK;AAClD,eAAa,OAAO,MAAM,KAAK;AAC/B,QAAM,UAAU,OAAO,WAAW,EAAE,SAAS,KAAK;AAElD,SAAO,KAAK,UAAU;AAAA,IACpB,IAAI,GAAG,SAAS,KAAK;AAAA,IACrB;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAEO,SAAS,QAAQ,SAAyB;AAC/C,QAAM,MAAM,UAAU;AACtB,QAAM,EAAE,IAAI,WAAW,QAAQ,IAAI,KAAK,MAAM,OAAO;AAErD,QAAM,WAAW,iBAAiB,WAAW,KAAK,OAAO,KAAK,IAAI,KAAK,CAAC;AACxE,WAAS,WAAW,OAAO,KAAK,SAAS,KAAK,CAAC;AAE/C,MAAI,YAAY,SAAS,OAAO,WAAW,OAAO,OAAO;AACzD,eAAa,SAAS,MAAM,OAAO;AAEnC,SAAO;AACT;AAYO,SAAS,gBAAgB,aAAiC;AAC/D,oBAAkB;AAClB,QAAM,YAAY,QAAQ,KAAK,UAAU,WAAW,CAAC;AACrD,gBAAc,MAAM,aAAa,SAAS;AAC5C;AAEO,SAAS,kBAAgC;AAC9C,MAAI,CAAC,WAAW,MAAM,WAAW,GAAG;AAClC,UAAM,IAAI,MAAM,+CAA+C;AAAA,EACjE;AACA,QAAM,UAAU,aAAa,MAAM,aAAa,OAAO;AACvD,SAAO,KAAK,MAAM,QAAQ,OAAO,CAAC;AACpC;","names":[]}
|
package/dist/cli.js
CHANGED
|
@@ -37,7 +37,7 @@ program.name("spora").description("AI agents (Spores) that autonomously manage X
|
|
|
37
37
|
program.command("init").description("Set up X account credentials for your Spore").option("--token <token>", "Connection token from spora.dev for auto-connect").option("--method <method>", "Connection method (api only)").option("--api-key <key>", "X API Key (api mode)").option("--api-secret <secret>", "X API Secret (api mode)").option("--access-token <token>", "X Access Token (api mode)").option("--access-token-secret <secret>", "X Access Token Secret (api mode)").option("--bearer-token <token>", "X Bearer Token (optional, recommended)").option("--api-tier <tier>", "X API tier: free | basic (api mode)").action(async (opts) => {
|
|
38
38
|
if (opts.method) {
|
|
39
39
|
const { ensureDirectories } = await import("./paths-BYR6MEPR.js");
|
|
40
|
-
const { saveCredentials } = await import("./crypto-
|
|
40
|
+
const { saveCredentials } = await import("./crypto-B65ZH7KN.js");
|
|
41
41
|
const { createDefaultConfig, saveConfig } = await import("./config-FL4VJVKZ.js");
|
|
42
42
|
ensureDirectories();
|
|
43
43
|
if (opts.method !== "api") {
|
|
@@ -67,7 +67,7 @@ program.command("init").description("Set up X account credentials for your Spore
|
|
|
67
67
|
console.log(chalk.cyan(BANNER));
|
|
68
68
|
console.log(chalk.bold("Welcome to Spora."));
|
|
69
69
|
console.log(chalk.gray("The global town square for AI agents.\n"));
|
|
70
|
-
const { runInit } = await import("./init-
|
|
70
|
+
const { runInit } = await import("./init-SEJPTOOB.js");
|
|
71
71
|
await runInit(opts.token);
|
|
72
72
|
});
|
|
73
73
|
program.command("serve").description("Start the Spora MCP server (stdio)").action(async () => {
|
|
@@ -79,7 +79,7 @@ program.command("chat").description("Open web-based chat interface with your Spo
|
|
|
79
79
|
console.log(chalk.red("\u2717 No identity found. Run `spora create` first."));
|
|
80
80
|
process.exit(1);
|
|
81
81
|
}
|
|
82
|
-
const { startWebChat } = await import("./web-chat-
|
|
82
|
+
const { startWebChat } = await import("./web-chat-ZZ65DUID.js");
|
|
83
83
|
await startWebChat();
|
|
84
84
|
});
|
|
85
85
|
program.command("tui").description("Start terminal-based chat interface (TUI)").action(async () => {
|
|
@@ -222,7 +222,7 @@ program.command("journal").description("Add a reflection to the evolution journa
|
|
|
222
222
|
});
|
|
223
223
|
program.command("post").description("Post a tweet").argument("<content>", "Tweet content (max 280 chars)").action(async (content) => {
|
|
224
224
|
try {
|
|
225
|
-
const { getXClient } = await import("./x-client-
|
|
225
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
226
226
|
const client = await getXClient();
|
|
227
227
|
const result = await client.postTweet(content);
|
|
228
228
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -233,7 +233,7 @@ program.command("post").description("Post a tweet").argument("<content>", "Tweet
|
|
|
233
233
|
});
|
|
234
234
|
program.command("reply").description("Reply to a tweet").argument("<tweetId>", "Tweet ID to reply to").argument("<content>", "Reply content").action(async (tweetId, content) => {
|
|
235
235
|
try {
|
|
236
|
-
const { getXClient } = await import("./x-client-
|
|
236
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
237
237
|
const client = await getXClient();
|
|
238
238
|
const result = await client.replyToTweet(tweetId, content);
|
|
239
239
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -244,7 +244,7 @@ program.command("reply").description("Reply to a tweet").argument("<tweetId>", "
|
|
|
244
244
|
});
|
|
245
245
|
program.command("like").description("Like a tweet").argument("<tweetId>", "Tweet ID").action(async (tweetId) => {
|
|
246
246
|
try {
|
|
247
|
-
const { getXClient } = await import("./x-client-
|
|
247
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
248
248
|
const client = await getXClient();
|
|
249
249
|
const result = await client.likeTweet(tweetId);
|
|
250
250
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -255,7 +255,7 @@ program.command("like").description("Like a tweet").argument("<tweetId>", "Tweet
|
|
|
255
255
|
});
|
|
256
256
|
program.command("retweet").description("Retweet a tweet").argument("<tweetId>", "Tweet ID").action(async (tweetId) => {
|
|
257
257
|
try {
|
|
258
|
-
const { getXClient } = await import("./x-client-
|
|
258
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
259
259
|
const client = await getXClient();
|
|
260
260
|
const result = await client.retweet(tweetId);
|
|
261
261
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -266,7 +266,7 @@ program.command("retweet").description("Retweet a tweet").argument("<tweetId>",
|
|
|
266
266
|
});
|
|
267
267
|
program.command("follow").description("Follow a user").argument("<handle>", "User handle or ID").action(async (handle) => {
|
|
268
268
|
try {
|
|
269
|
-
const { getXClient } = await import("./x-client-
|
|
269
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
270
270
|
const client = await getXClient();
|
|
271
271
|
const result = await client.followUser(handle);
|
|
272
272
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -277,7 +277,7 @@ program.command("follow").description("Follow a user").argument("<handle>", "Use
|
|
|
277
277
|
});
|
|
278
278
|
program.command("unfollow").description("Unfollow a user").argument("<handle>", "User handle or ID").action(async (handle) => {
|
|
279
279
|
try {
|
|
280
|
-
const { getXClient } = await import("./x-client-
|
|
280
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
281
281
|
const client = await getXClient();
|
|
282
282
|
const result = await client.unfollowUser(handle);
|
|
283
283
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -288,7 +288,7 @@ program.command("unfollow").description("Unfollow a user").argument("<handle>",
|
|
|
288
288
|
});
|
|
289
289
|
program.command("timeline").description("Read home timeline").option("-c, --count <n>", "Number of tweets", "20").action(async (opts) => {
|
|
290
290
|
try {
|
|
291
|
-
const { getXClient } = await import("./x-client-
|
|
291
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
292
292
|
const client = await getXClient();
|
|
293
293
|
const result = await client.getTimeline({ count: parseInt(opts.count) });
|
|
294
294
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -299,7 +299,7 @@ program.command("timeline").description("Read home timeline").option("-c, --coun
|
|
|
299
299
|
});
|
|
300
300
|
program.command("mentions").description("Read mentions").option("-c, --count <n>", "Number of mentions", "20").action(async (opts) => {
|
|
301
301
|
try {
|
|
302
|
-
const { getXClient } = await import("./x-client-
|
|
302
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
303
303
|
const client = await getXClient();
|
|
304
304
|
const result = await client.getMentions({ count: parseInt(opts.count) });
|
|
305
305
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -310,7 +310,7 @@ program.command("mentions").description("Read mentions").option("-c, --count <n>
|
|
|
310
310
|
});
|
|
311
311
|
program.command("search").description("Search for tweets").argument("<query>", "Search query").option("-c, --count <n>", "Number of results", "20").action(async (query, opts) => {
|
|
312
312
|
try {
|
|
313
|
-
const { getXClient } = await import("./x-client-
|
|
313
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
314
314
|
const client = await getXClient();
|
|
315
315
|
const result = await client.searchTweets(query, { count: parseInt(opts.count) });
|
|
316
316
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -321,7 +321,7 @@ program.command("search").description("Search for tweets").argument("<query>", "
|
|
|
321
321
|
});
|
|
322
322
|
program.command("profile").description("Get a user's X profile").argument("<handle>", "X handle (without @)").action(async (handle) => {
|
|
323
323
|
try {
|
|
324
|
-
const { getXClient } = await import("./x-client-
|
|
324
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
325
325
|
const client = await getXClient();
|
|
326
326
|
const result = await client.getProfile(handle);
|
|
327
327
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -387,7 +387,7 @@ program.command("note").description("Add a relationship note about someone").arg
|
|
|
387
387
|
});
|
|
388
388
|
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) => {
|
|
389
389
|
try {
|
|
390
|
-
const { addToQueue } = await import("./queue-
|
|
390
|
+
const { addToQueue } = await import("./queue-2ZBKDFX3.js");
|
|
391
391
|
const entry = addToQueue(content, opts.at);
|
|
392
392
|
console.log(JSON.stringify({ success: true, id: entry.id, scheduledFor: entry.scheduledFor }));
|
|
393
393
|
} catch (error) {
|
|
@@ -397,7 +397,7 @@ program.command("schedule").description("Queue a post for later").argument("<con
|
|
|
397
397
|
});
|
|
398
398
|
program.command("flush").description("Post all queued items whose time has come").action(async () => {
|
|
399
399
|
try {
|
|
400
|
-
const { flushQueue } = await import("./queue-
|
|
400
|
+
const { flushQueue } = await import("./queue-2ZBKDFX3.js");
|
|
401
401
|
const results = await flushQueue();
|
|
402
402
|
console.log(JSON.stringify(results, null, 2));
|
|
403
403
|
} catch (error) {
|
|
@@ -406,13 +406,13 @@ program.command("flush").description("Post all queued items whose time has come"
|
|
|
406
406
|
}
|
|
407
407
|
});
|
|
408
408
|
program.command("queue").description("Show scheduled posts").action(async () => {
|
|
409
|
-
const { showQueue } = await import("./queue-
|
|
409
|
+
const { showQueue } = await import("./queue-2ZBKDFX3.js");
|
|
410
410
|
showQueue();
|
|
411
411
|
});
|
|
412
412
|
var colony = program.command("colony").description("Colony commands");
|
|
413
413
|
colony.command("checkin").description("Check into The Colony \u2014 sync memory, discover Spores").option("-m, --message <msg>", "Optional message to post").action(async (opts) => {
|
|
414
414
|
try {
|
|
415
|
-
const { colonyCheckin } = await import("./colony-
|
|
415
|
+
const { colonyCheckin } = await import("./colony-NNX45EAV.js");
|
|
416
416
|
const result = await colonyCheckin(opts.message);
|
|
417
417
|
console.log(JSON.stringify(result, null, 2));
|
|
418
418
|
} catch (error) {
|
|
@@ -431,7 +431,7 @@ colony.command("memory").description("Read the Colony's shared memory").action(a
|
|
|
431
431
|
});
|
|
432
432
|
colony.command("plans").description("Get all active Colony plans").action(async () => {
|
|
433
433
|
try {
|
|
434
|
-
const { getActivePlans } = await import("./colony-
|
|
434
|
+
const { getActivePlans } = await import("./colony-NNX45EAV.js");
|
|
435
435
|
const plans = getActivePlans();
|
|
436
436
|
console.log(plans.length > 0 ? JSON.stringify(plans, null, 2) : JSON.stringify({ message: "No active plans. Propose one!" }));
|
|
437
437
|
} catch (error) {
|
|
@@ -441,7 +441,7 @@ colony.command("plans").description("Get all active Colony plans").action(async
|
|
|
441
441
|
});
|
|
442
442
|
colony.command("propose").description("Propose a coordinated plan").argument("<description>", "What's the plan?").action(async (description) => {
|
|
443
443
|
try {
|
|
444
|
-
const { proposePlan } = await import("./colony-
|
|
444
|
+
const { proposePlan } = await import("./colony-NNX45EAV.js");
|
|
445
445
|
const result = await proposePlan(description);
|
|
446
446
|
console.log(JSON.stringify(result, null, 2));
|
|
447
447
|
} catch (error) {
|
|
@@ -451,7 +451,7 @@ colony.command("propose").description("Propose a coordinated plan").argument("<d
|
|
|
451
451
|
});
|
|
452
452
|
colony.command("join").description("Join an active plan").argument("<planId>", "Plan ID").action(async (planId) => {
|
|
453
453
|
try {
|
|
454
|
-
const { joinPlan } = await import("./colony-
|
|
454
|
+
const { joinPlan } = await import("./colony-NNX45EAV.js");
|
|
455
455
|
const result = await joinPlan(planId);
|
|
456
456
|
console.log(JSON.stringify(result, null, 2));
|
|
457
457
|
} catch (error) {
|
|
@@ -461,7 +461,7 @@ colony.command("join").description("Join an active plan").argument("<planId>", "
|
|
|
461
461
|
});
|
|
462
462
|
colony.command("post-status").description("Post a status update to the Colony").argument("<status>", "Your status").action(async (status) => {
|
|
463
463
|
try {
|
|
464
|
-
const { postStatus } = await import("./colony-
|
|
464
|
+
const { postStatus } = await import("./colony-NNX45EAV.js");
|
|
465
465
|
const result = await postStatus(status);
|
|
466
466
|
console.log(JSON.stringify(result, null, 2));
|
|
467
467
|
} catch (error) {
|
|
@@ -471,7 +471,7 @@ colony.command("post-status").description("Post a status update to the Colony").
|
|
|
471
471
|
});
|
|
472
472
|
colony.command("activity").description("Get today's Colony activity").action(async () => {
|
|
473
473
|
try {
|
|
474
|
-
const { getTodaysActivity } = await import("./colony-
|
|
474
|
+
const { getTodaysActivity } = await import("./colony-NNX45EAV.js");
|
|
475
475
|
const activity = getTodaysActivity();
|
|
476
476
|
console.log(activity.length > 0 ? JSON.stringify(activity, null, 2) : JSON.stringify({ message: "No Colony activity today yet." }));
|
|
477
477
|
} catch (error) {
|
|
@@ -501,11 +501,11 @@ program.command("start").description("Start the autonomous Spora agent").option(
|
|
|
501
501
|
}
|
|
502
502
|
console.log(chalk.cyan(BANNER));
|
|
503
503
|
console.log(chalk.bold("Starting Spora agent...\n"));
|
|
504
|
-
const { startHeartbeatLoop } = await import("./heartbeat-
|
|
504
|
+
const { startHeartbeatLoop } = await import("./heartbeat-ZCCOIZGU.js");
|
|
505
505
|
await startHeartbeatLoop();
|
|
506
506
|
});
|
|
507
507
|
program.command("stop").description("Stop the running Spora agent").action(async () => {
|
|
508
|
-
const { getRunningPid, requestStop } = await import("./heartbeat-
|
|
508
|
+
const { getRunningPid, requestStop } = await import("./heartbeat-ZCCOIZGU.js");
|
|
509
509
|
const pid = getRunningPid();
|
|
510
510
|
if (!pid) {
|
|
511
511
|
console.log(JSON.stringify({ message: "Spora agent is not running." }));
|
|
@@ -587,7 +587,7 @@ llm.command("test").description("Send a tiny test prompt to validate current LLM
|
|
|
587
587
|
}
|
|
588
588
|
});
|
|
589
589
|
program.command("agent-status").description("Check if the Spora agent is running").action(async () => {
|
|
590
|
-
const { getRunningPid } = await import("./heartbeat-
|
|
590
|
+
const { getRunningPid } = await import("./heartbeat-ZCCOIZGU.js");
|
|
591
591
|
const pid = getRunningPid();
|
|
592
592
|
const { hasLLMKey } = await import("./llm-OGOYCWBH.js");
|
|
593
593
|
console.log(JSON.stringify({
|
|
@@ -633,7 +633,7 @@ program.command("doctor").description("Run diagnostics for X API, LLM provider,
|
|
|
633
633
|
checks.push({ check: "llm_call", ok: false, detail: error.message });
|
|
634
634
|
}
|
|
635
635
|
try {
|
|
636
|
-
const { getXClient } = await import("./x-client-
|
|
636
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.js");
|
|
637
637
|
const client = await getXClient();
|
|
638
638
|
const timeline = await client.getTimeline({ count: 3 });
|
|
639
639
|
checks.push({ check: "x_api_timeline", ok: true, detail: `timeline_count=${timeline.length}` });
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-M6YOQVSI.js";
|
|
8
8
|
import {
|
|
9
9
|
loadCredentials
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QWEYVDLU.js";
|
|
11
11
|
import {
|
|
12
12
|
logger
|
|
13
13
|
} from "./chunk-YMGJQRKG.js";
|
|
@@ -418,4 +418,4 @@ var XApiClient = class {
|
|
|
418
418
|
export {
|
|
419
419
|
XApiClient
|
|
420
420
|
};
|
|
421
|
-
//# sourceMappingURL=client-
|
|
421
|
+
//# sourceMappingURL=client-Z5UQWPPI.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-T7L2L7ZL.js";
|
|
11
11
|
import {
|
|
12
12
|
getXClient
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PN5A6MCV.js";
|
|
14
14
|
import {
|
|
15
15
|
loadIdentity
|
|
16
16
|
} from "./chunk-M6YOQVSI.js";
|
|
@@ -226,4 +226,4 @@ export {
|
|
|
226
226
|
postStatus,
|
|
227
227
|
proposePlan
|
|
228
228
|
};
|
|
229
|
-
//# sourceMappingURL=colony-
|
|
229
|
+
//# sourceMappingURL=colony-NNX45EAV.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
encrypt,
|
|
4
4
|
loadCredentials,
|
|
5
5
|
saveCredentials
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QWEYVDLU.js";
|
|
7
7
|
import "./chunk-3RYCUGXE.js";
|
|
8
8
|
export {
|
|
9
9
|
decrypt,
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
loadCredentials,
|
|
12
12
|
saveCredentials
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=crypto-
|
|
14
|
+
//# sourceMappingURL=crypto-B65ZH7KN.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAutonomyCycle
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-EU4FMOKG.js";
|
|
4
|
+
import "./chunk-PN5A6MCV.js";
|
|
5
5
|
import {
|
|
6
6
|
flushQueue
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MDOFAAZB.js";
|
|
8
8
|
import {
|
|
9
9
|
buildReflectionPrompt
|
|
10
10
|
} from "./chunk-Q3YXJ2C6.js";
|
|
@@ -253,4 +253,4 @@ export {
|
|
|
253
253
|
requestStop,
|
|
254
254
|
startHeartbeatLoop
|
|
255
255
|
};
|
|
256
|
-
//# sourceMappingURL=heartbeat-
|
|
256
|
+
//# sourceMappingURL=heartbeat-ZCCOIZGU.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
loadCredentials,
|
|
6
6
|
saveCredentials
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QWEYVDLU.js";
|
|
8
8
|
import {
|
|
9
9
|
getDefaultModel,
|
|
10
10
|
setLLMApiKey
|
|
@@ -196,7 +196,7 @@ async function loginFlow() {
|
|
|
196
196
|
console.log(chalk.green("\u2713 Logged in!\n"));
|
|
197
197
|
console.log(chalk.gray("Opening chat interface...\n"));
|
|
198
198
|
try {
|
|
199
|
-
const { startWebChat } = await import("./web-chat-
|
|
199
|
+
const { startWebChat } = await import("./web-chat-ZZ65DUID.js");
|
|
200
200
|
await startWebChat();
|
|
201
201
|
} catch (error) {
|
|
202
202
|
console.log(chalk.yellow(`Could not start chat interface: ${error.message}
|
|
@@ -288,7 +288,7 @@ async function showDoneAndOpenChat() {
|
|
|
288
288
|
console.log(chalk.bold.cyan("\u2501\u2501\u2501 Your Spore is Ready! \u2501\u2501\u2501\n"));
|
|
289
289
|
console.log(chalk.gray("Opening chat interface...\n"));
|
|
290
290
|
try {
|
|
291
|
-
const { startWebChat } = await import("./web-chat-
|
|
291
|
+
const { startWebChat } = await import("./web-chat-ZZ65DUID.js");
|
|
292
292
|
await startWebChat();
|
|
293
293
|
} catch (error) {
|
|
294
294
|
console.log(chalk.yellow(`Could not start chat interface: ${error.message}
|
|
@@ -413,4 +413,4 @@ async function runInit(token) {
|
|
|
413
413
|
export {
|
|
414
414
|
runInit
|
|
415
415
|
};
|
|
416
|
-
//# sourceMappingURL=init-
|
|
416
|
+
//# sourceMappingURL=init-SEJPTOOB.js.map
|
package/dist/mcp-server.js
CHANGED
|
@@ -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-YG7UCCNI.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-YG7UCCNI.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-YG7UCCNI.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-YG7UCCNI.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 or handle to follow") },
|
|
452
452
|
async ({ userId }) => {
|
|
453
453
|
try {
|
|
454
|
-
const { getXClient } = await import("./x-client-
|
|
454
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.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 or handle to unfollow") },
|
|
467
467
|
async ({ userId }) => {
|
|
468
468
|
try {
|
|
469
|
-
const { getXClient } = await import("./x-client-
|
|
469
|
+
const { getXClient } = await import("./x-client-YG7UCCNI.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-YG7UCCNI.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-YG7UCCNI.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-YG7UCCNI.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-YG7UCCNI.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-2ZBKDFX3.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-2ZBKDFX3.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-NNX45EAV.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-NNX45EAV.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-NNX45EAV.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-NNX45EAV.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-NNX45EAV.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-NNX45EAV.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-NNX45EAV.js");
|
|
700
700
|
const activity = getTodaysActivity();
|
|
701
701
|
return {
|
|
702
702
|
content: [
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
addToQueue,
|
|
3
3
|
flushQueue,
|
|
4
4
|
showQueue
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MDOFAAZB.js";
|
|
6
6
|
import "./chunk-YMGJQRKG.js";
|
|
7
7
|
import "./chunk-NO3NQN67.js";
|
|
8
8
|
import "./chunk-3RYCUGXE.js";
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
flushQueue,
|
|
12
12
|
showQueue
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=queue-
|
|
14
|
+
//# sourceMappingURL=queue-2ZBKDFX3.js.map
|