spora 0.2.10 → 0.2.12

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.
Files changed (49) hide show
  1. package/dist/chat.html +1 -1
  2. package/dist/{chunk-3FBYOHQR.js → chunk-5J5TUBWK.js} +2 -2
  3. package/dist/{chunk-MOCLA2KK.js → chunk-C3INKEY6.js} +2 -2
  4. package/dist/{chunk-6DPYNK2E.js → chunk-IN2KCKTO.js} +3 -3
  5. package/dist/{chunk-BNFUXAQW.js → chunk-Q57HNZDI.js} +40 -11
  6. package/dist/chunk-Q57HNZDI.js.map +1 -0
  7. package/dist/{chunk-YEKHNTQO.js → chunk-RCJQI7FR.js} +2 -2
  8. package/dist/chunk-RCJQI7FR.js.map +1 -0
  9. package/dist/{chunk-WNPGGDG4.js → chunk-TSKHCOCJ.js} +4 -4
  10. package/dist/{heartbeat-QZE7KGIS.js → chunk-VSVZU476.js} +8 -166
  11. package/dist/chunk-VSVZU476.js.map +1 -0
  12. package/dist/cli.js +31 -31
  13. package/dist/{client-JZGDSIOB.js → client-N7JMM5U7.js} +6 -6
  14. package/dist/{client-AYROLQHE.js → client-OCIEKWMN.js} +6 -6
  15. package/dist/{colony-P32MRWYW.js → colony-JHR2B5OC.js} +5 -5
  16. package/dist/{config-NZAFARS6.js → config-HTKAPY7S.js} +2 -2
  17. package/dist/decision-engine-JDAIVQH3.js +19 -0
  18. package/dist/heartbeat-4CHHSMFQ.js +178 -0
  19. package/dist/heartbeat-4CHHSMFQ.js.map +1 -0
  20. package/dist/{init-ERCWRTL4.js → init-SOIKE75S.js} +11 -11
  21. package/dist/init-SOIKE75S.js.map +1 -0
  22. package/dist/{llm-OH2Z4PSN.js → llm-WLEJLNEA.js} +3 -3
  23. package/dist/{mcp-server-BN3N67L7.js → mcp-server-4YBCA4QH.js} +21 -21
  24. package/dist/{prompt-builder-WYB5B67W.js → prompt-builder-7NIQIHTB.js} +4 -4
  25. package/dist/{queue-GJ2QQIOC.js → queue-WMUESED4.js} +3 -3
  26. package/dist/web-chat/chat.html +1 -1
  27. package/dist/{web-chat-4XZKXNBY.js → web-chat-DUY5W7S3.js} +52 -4
  28. package/dist/web-chat-DUY5W7S3.js.map +1 -0
  29. package/dist/{x-client-2WBZOI5I.js → x-client-7LK3F56M.js} +3 -3
  30. package/dist/x-client-7LK3F56M.js.map +1 -0
  31. package/package.json +1 -1
  32. package/dist/chunk-BNFUXAQW.js.map +0 -1
  33. package/dist/chunk-YEKHNTQO.js.map +0 -1
  34. package/dist/heartbeat-QZE7KGIS.js.map +0 -1
  35. package/dist/init-ERCWRTL4.js.map +0 -1
  36. package/dist/web-chat-4XZKXNBY.js.map +0 -1
  37. /package/dist/{chunk-3FBYOHQR.js.map → chunk-5J5TUBWK.js.map} +0 -0
  38. /package/dist/{chunk-MOCLA2KK.js.map → chunk-C3INKEY6.js.map} +0 -0
  39. /package/dist/{chunk-6DPYNK2E.js.map → chunk-IN2KCKTO.js.map} +0 -0
  40. /package/dist/{chunk-WNPGGDG4.js.map → chunk-TSKHCOCJ.js.map} +0 -0
  41. /package/dist/{client-JZGDSIOB.js.map → client-N7JMM5U7.js.map} +0 -0
  42. /package/dist/{client-AYROLQHE.js.map → client-OCIEKWMN.js.map} +0 -0
  43. /package/dist/{colony-P32MRWYW.js.map → colony-JHR2B5OC.js.map} +0 -0
  44. /package/dist/{config-NZAFARS6.js.map → config-HTKAPY7S.js.map} +0 -0
  45. /package/dist/{llm-OH2Z4PSN.js.map → decision-engine-JDAIVQH3.js.map} +0 -0
  46. /package/dist/{prompt-builder-WYB5B67W.js.map → llm-WLEJLNEA.js.map} +0 -0
  47. /package/dist/{mcp-server-BN3N67L7.js.map → mcp-server-4YBCA4QH.js.map} +0 -0
  48. /package/dist/{queue-GJ2QQIOC.js.map → prompt-builder-7NIQIHTB.js.map} +0 -0
  49. /package/dist/{x-client-2WBZOI5I.js.map → queue-WMUESED4.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadConfig
4
- } from "./chunk-YEKHNTQO.js";
4
+ } from "./chunk-RCJQI7FR.js";
5
5
  import {
6
6
  FRAMEWORKS,
7
7
  GOAL_PRESETS,
@@ -34,7 +34,7 @@ program.command("init").description("Set up X account credentials for your Spore
34
34
  if (opts.method) {
35
35
  const { ensureDirectories } = await import("./paths-5GFUUHCZ.js");
36
36
  const { saveCredentials } = await import("./crypto-FHSQ72NU.js");
37
- const { createDefaultConfig, saveConfig } = await import("./config-NZAFARS6.js");
37
+ const { createDefaultConfig, saveConfig } = await import("./config-HTKAPY7S.js");
38
38
  ensureDirectories();
39
39
  if (opts.method === "create") {
40
40
  const accountName = opts.accountName ?? `Spore${Math.floor(Math.random() * 9e3) + 1e3}`;
@@ -123,11 +123,11 @@ 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-ERCWRTL4.js");
126
+ const { runInit } = await import("./init-SOIKE75S.js");
127
127
  await runInit(opts.token);
128
128
  });
129
129
  program.command("serve").description("Start the Spora MCP server (stdio)").action(async () => {
130
- const { startServer } = await import("./mcp-server-BN3N67L7.js");
130
+ const { startServer } = await import("./mcp-server-4YBCA4QH.js");
131
131
  await startServer();
132
132
  });
133
133
  program.command("chat").description("Open web-based chat interface with your Spore").action(async () => {
@@ -135,7 +135,7 @@ program.command("chat").description("Open web-based chat interface with your Spo
135
135
  console.log(chalk.red("\u2717 No identity found. Run `spora create` first."));
136
136
  process.exit(1);
137
137
  }
138
- const { startWebChat } = await import("./web-chat-4XZKXNBY.js");
138
+ const { startWebChat } = await import("./web-chat-DUY5W7S3.js");
139
139
  await startWebChat();
140
140
  });
141
141
  program.command("tui").description("Start terminal-based chat interface (TUI)").action(async () => {
@@ -278,7 +278,7 @@ program.command("journal").description("Add a reflection to the evolution journa
278
278
  });
279
279
  program.command("post").description("Post a tweet").argument("<content>", "Tweet content (max 280 chars)").action(async (content) => {
280
280
  try {
281
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
281
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
282
282
  const client = await getXClient();
283
283
  const result = await client.postTweet(content);
284
284
  console.log(JSON.stringify(result, null, 2));
@@ -289,7 +289,7 @@ program.command("post").description("Post a tweet").argument("<content>", "Tweet
289
289
  });
290
290
  program.command("reply").description("Reply to a tweet").argument("<tweetId>", "Tweet ID to reply to").argument("<content>", "Reply content").action(async (tweetId, content) => {
291
291
  try {
292
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
292
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
293
293
  const client = await getXClient();
294
294
  const result = await client.replyToTweet(tweetId, content);
295
295
  console.log(JSON.stringify(result, null, 2));
@@ -300,7 +300,7 @@ program.command("reply").description("Reply to a tweet").argument("<tweetId>", "
300
300
  });
301
301
  program.command("like").description("Like a tweet").argument("<tweetId>", "Tweet ID").action(async (tweetId) => {
302
302
  try {
303
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
303
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
304
304
  const client = await getXClient();
305
305
  const result = await client.likeTweet(tweetId);
306
306
  console.log(JSON.stringify(result, null, 2));
@@ -311,7 +311,7 @@ program.command("like").description("Like a tweet").argument("<tweetId>", "Tweet
311
311
  });
312
312
  program.command("retweet").description("Retweet a tweet").argument("<tweetId>", "Tweet ID").action(async (tweetId) => {
313
313
  try {
314
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
314
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
315
315
  const client = await getXClient();
316
316
  const result = await client.retweet(tweetId);
317
317
  console.log(JSON.stringify(result, null, 2));
@@ -322,7 +322,7 @@ program.command("retweet").description("Retweet a tweet").argument("<tweetId>",
322
322
  });
323
323
  program.command("follow").description("Follow a user").argument("<handle>", "User handle or ID").action(async (handle) => {
324
324
  try {
325
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
325
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
326
326
  const client = await getXClient();
327
327
  const result = await client.followUser(handle);
328
328
  console.log(JSON.stringify(result, null, 2));
@@ -333,7 +333,7 @@ program.command("follow").description("Follow a user").argument("<handle>", "Use
333
333
  });
334
334
  program.command("unfollow").description("Unfollow a user").argument("<handle>", "User handle or ID").action(async (handle) => {
335
335
  try {
336
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
336
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
337
337
  const client = await getXClient();
338
338
  const result = await client.unfollowUser(handle);
339
339
  console.log(JSON.stringify(result, null, 2));
@@ -344,7 +344,7 @@ program.command("unfollow").description("Unfollow a user").argument("<handle>",
344
344
  });
345
345
  program.command("timeline").description("Read home timeline").option("-c, --count <n>", "Number of tweets", "20").action(async (opts) => {
346
346
  try {
347
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
347
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
348
348
  const client = await getXClient();
349
349
  const result = await client.getTimeline({ count: parseInt(opts.count) });
350
350
  console.log(JSON.stringify(result, null, 2));
@@ -355,7 +355,7 @@ program.command("timeline").description("Read home timeline").option("-c, --coun
355
355
  });
356
356
  program.command("mentions").description("Read mentions").option("-c, --count <n>", "Number of mentions", "20").action(async (opts) => {
357
357
  try {
358
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
358
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
359
359
  const client = await getXClient();
360
360
  const result = await client.getMentions({ count: parseInt(opts.count) });
361
361
  console.log(JSON.stringify(result, null, 2));
@@ -366,7 +366,7 @@ program.command("mentions").description("Read mentions").option("-c, --count <n>
366
366
  });
367
367
  program.command("search").description("Search for tweets").argument("<query>", "Search query").option("-c, --count <n>", "Number of results", "20").action(async (query, opts) => {
368
368
  try {
369
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
369
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
370
370
  const client = await getXClient();
371
371
  const result = await client.searchTweets(query, { count: parseInt(opts.count) });
372
372
  console.log(JSON.stringify(result, null, 2));
@@ -377,7 +377,7 @@ program.command("search").description("Search for tweets").argument("<query>", "
377
377
  });
378
378
  program.command("profile").description("Get a user's X profile").argument("<handle>", "X handle (without @)").action(async (handle) => {
379
379
  try {
380
- const { getXClient } = await import("./x-client-2WBZOI5I.js");
380
+ const { getXClient } = await import("./x-client-7LK3F56M.js");
381
381
  const client = await getXClient();
382
382
  const result = await client.getProfile(handle);
383
383
  console.log(JSON.stringify(result, null, 2));
@@ -443,7 +443,7 @@ program.command("note").description("Add a relationship note about someone").arg
443
443
  });
444
444
  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) => {
445
445
  try {
446
- const { addToQueue } = await import("./queue-GJ2QQIOC.js");
446
+ const { addToQueue } = await import("./queue-WMUESED4.js");
447
447
  const entry = addToQueue(content, opts.at);
448
448
  console.log(JSON.stringify({ success: true, id: entry.id, scheduledFor: entry.scheduledFor }));
449
449
  } catch (error) {
@@ -453,7 +453,7 @@ program.command("schedule").description("Queue a post for later").argument("<con
453
453
  });
454
454
  program.command("flush").description("Post all queued items whose time has come").action(async () => {
455
455
  try {
456
- const { flushQueue } = await import("./queue-GJ2QQIOC.js");
456
+ const { flushQueue } = await import("./queue-WMUESED4.js");
457
457
  const results = await flushQueue();
458
458
  console.log(JSON.stringify(results, null, 2));
459
459
  } catch (error) {
@@ -462,13 +462,13 @@ program.command("flush").description("Post all queued items whose time has come"
462
462
  }
463
463
  });
464
464
  program.command("queue").description("Show scheduled posts").action(async () => {
465
- const { showQueue } = await import("./queue-GJ2QQIOC.js");
465
+ const { showQueue } = await import("./queue-WMUESED4.js");
466
466
  showQueue();
467
467
  });
468
468
  var colony = program.command("colony").description("Colony commands");
469
469
  colony.command("checkin").description("Check into The Colony \u2014 sync memory, discover Spores").option("-m, --message <msg>", "Optional message to post").action(async (opts) => {
470
470
  try {
471
- const { colonyCheckin } = await import("./colony-P32MRWYW.js");
471
+ const { colonyCheckin } = await import("./colony-JHR2B5OC.js");
472
472
  const result = await colonyCheckin(opts.message);
473
473
  console.log(JSON.stringify(result, null, 2));
474
474
  } catch (error) {
@@ -487,7 +487,7 @@ colony.command("memory").description("Read the Colony's shared memory").action(a
487
487
  });
488
488
  colony.command("plans").description("Get all active Colony plans").action(async () => {
489
489
  try {
490
- const { getActivePlans } = await import("./colony-P32MRWYW.js");
490
+ const { getActivePlans } = await import("./colony-JHR2B5OC.js");
491
491
  const plans = getActivePlans();
492
492
  console.log(plans.length > 0 ? JSON.stringify(plans, null, 2) : JSON.stringify({ message: "No active plans. Propose one!" }));
493
493
  } catch (error) {
@@ -497,7 +497,7 @@ colony.command("plans").description("Get all active Colony plans").action(async
497
497
  });
498
498
  colony.command("propose").description("Propose a coordinated plan").argument("<description>", "What's the plan?").action(async (description) => {
499
499
  try {
500
- const { proposePlan } = await import("./colony-P32MRWYW.js");
500
+ const { proposePlan } = await import("./colony-JHR2B5OC.js");
501
501
  const result = await proposePlan(description);
502
502
  console.log(JSON.stringify(result, null, 2));
503
503
  } catch (error) {
@@ -507,7 +507,7 @@ colony.command("propose").description("Propose a coordinated plan").argument("<d
507
507
  });
508
508
  colony.command("join").description("Join an active plan").argument("<planId>", "Plan ID").action(async (planId) => {
509
509
  try {
510
- const { joinPlan } = await import("./colony-P32MRWYW.js");
510
+ const { joinPlan } = await import("./colony-JHR2B5OC.js");
511
511
  const result = await joinPlan(planId);
512
512
  console.log(JSON.stringify(result, null, 2));
513
513
  } catch (error) {
@@ -517,7 +517,7 @@ colony.command("join").description("Join an active plan").argument("<planId>", "
517
517
  });
518
518
  colony.command("post-status").description("Post a status update to the Colony").argument("<status>", "Your status").action(async (status) => {
519
519
  try {
520
- const { postStatus } = await import("./colony-P32MRWYW.js");
520
+ const { postStatus } = await import("./colony-JHR2B5OC.js");
521
521
  const result = await postStatus(status);
522
522
  console.log(JSON.stringify(result, null, 2));
523
523
  } catch (error) {
@@ -527,7 +527,7 @@ colony.command("post-status").description("Post a status update to the Colony").
527
527
  });
528
528
  colony.command("activity").description("Get today's Colony activity").action(async () => {
529
529
  try {
530
- const { getTodaysActivity } = await import("./colony-P32MRWYW.js");
530
+ const { getTodaysActivity } = await import("./colony-JHR2B5OC.js");
531
531
  const activity = getTodaysActivity();
532
532
  console.log(activity.length > 0 ? JSON.stringify(activity, null, 2) : JSON.stringify({ message: "No Colony activity today yet." }));
533
533
  } catch (error) {
@@ -544,24 +544,24 @@ program.command("start").description("Start the autonomous Spora agent").option(
544
544
  console.log(JSON.stringify({ error: "No X credentials. Run `spora init` to set up." }));
545
545
  process.exit(1);
546
546
  }
547
- const { hasLLMKey } = await import("./llm-OH2Z4PSN.js");
547
+ const { hasLLMKey } = await import("./llm-WLEJLNEA.js");
548
548
  if (!hasLLMKey()) {
549
549
  console.log(JSON.stringify({ error: "No LLM API key. Run `spora set-llm-key` first." }));
550
550
  process.exit(1);
551
551
  }
552
552
  if (opts.interval) {
553
- const { loadConfig: lc, saveConfig: sc } = await import("./config-NZAFARS6.js");
553
+ const { loadConfig: lc, saveConfig: sc } = await import("./config-HTKAPY7S.js");
554
554
  const config = lc();
555
555
  config.runtime = { ...config.runtime, heartbeatIntervalMs: parseInt(opts.interval, 10), actionsPerHeartbeat: config.runtime?.actionsPerHeartbeat ?? 3, enabled: true };
556
556
  sc(config);
557
557
  }
558
558
  console.log(chalk.cyan(BANNER));
559
559
  console.log(chalk.bold("Starting Spora agent...\n"));
560
- const { startHeartbeatLoop } = await import("./heartbeat-QZE7KGIS.js");
560
+ const { startHeartbeatLoop } = await import("./heartbeat-4CHHSMFQ.js");
561
561
  await startHeartbeatLoop();
562
562
  });
563
563
  program.command("stop").description("Stop the running Spora agent").action(async () => {
564
- const { getRunningPid, requestStop } = await import("./heartbeat-QZE7KGIS.js");
564
+ const { getRunningPid, requestStop } = await import("./heartbeat-4CHHSMFQ.js");
565
565
  const pid = getRunningPid();
566
566
  if (!pid) {
567
567
  console.log(JSON.stringify({ message: "Spora agent is not running." }));
@@ -588,7 +588,7 @@ program.command("set-llm-key").description("Set your Anthropic API key for the a
588
588
  }
589
589
  writeFileSync(p.llmKey, apiKey, { mode: 384 });
590
590
  try {
591
- const { loadConfig: lc, saveConfig: sc } = await import("./config-NZAFARS6.js");
591
+ const { loadConfig: lc, saveConfig: sc } = await import("./config-HTKAPY7S.js");
592
592
  const config = lc();
593
593
  if (!config.llm) {
594
594
  config.llm = { provider: "anthropic", model: "claude-sonnet-4-20250514" };
@@ -599,9 +599,9 @@ program.command("set-llm-key").description("Set your Anthropic API key for the a
599
599
  console.log(JSON.stringify({ success: true, message: "LLM API key saved." }));
600
600
  });
601
601
  program.command("agent-status").description("Check if the Spora agent is running").action(async () => {
602
- const { getRunningPid } = await import("./heartbeat-QZE7KGIS.js");
602
+ const { getRunningPid } = await import("./heartbeat-4CHHSMFQ.js");
603
603
  const pid = getRunningPid();
604
- const { hasLLMKey } = await import("./llm-OH2Z4PSN.js");
604
+ const { hasLLMKey } = await import("./llm-WLEJLNEA.js");
605
605
  console.log(JSON.stringify({
606
606
  agentRunning: pid !== null,
607
607
  pid,
@@ -1,14 +1,14 @@
1
- import {
2
- loadCredentials
3
- } from "./chunk-ZJZKH7N7.js";
4
1
  import {
5
2
  rateLimiter
6
- } from "./chunk-MOCLA2KK.js";
7
- import "./chunk-YEKHNTQO.js";
3
+ } from "./chunk-C3INKEY6.js";
4
+ import "./chunk-RCJQI7FR.js";
8
5
  import {
9
6
  identityExists,
10
7
  loadIdentity
11
8
  } from "./chunk-AIEXQCQS.js";
9
+ import {
10
+ loadCredentials
11
+ } from "./chunk-ZJZKH7N7.js";
12
12
  import {
13
13
  logger
14
14
  } from "./chunk-KELPENM3.js";
@@ -398,4 +398,4 @@ var XBrowserClient = class {
398
398
  export {
399
399
  XBrowserClient
400
400
  };
401
- //# sourceMappingURL=client-JZGDSIOB.js.map
401
+ //# sourceMappingURL=client-N7JMM5U7.js.map
@@ -1,14 +1,14 @@
1
- import {
2
- loadCredentials
3
- } from "./chunk-ZJZKH7N7.js";
4
1
  import {
5
2
  rateLimiter
6
- } from "./chunk-MOCLA2KK.js";
7
- import "./chunk-YEKHNTQO.js";
3
+ } from "./chunk-C3INKEY6.js";
4
+ import "./chunk-RCJQI7FR.js";
8
5
  import {
9
6
  identityExists,
10
7
  loadIdentity
11
8
  } from "./chunk-AIEXQCQS.js";
9
+ import {
10
+ loadCredentials
11
+ } from "./chunk-ZJZKH7N7.js";
12
12
  import {
13
13
  logger
14
14
  } from "./chunk-KELPENM3.js";
@@ -370,4 +370,4 @@ var XApiClient = class {
370
370
  export {
371
371
  XApiClient
372
372
  };
373
- //# sourceMappingURL=client-AYROLQHE.js.map
373
+ //# sourceMappingURL=client-OCIEKWMN.js.map
@@ -1,6 +1,3 @@
1
- import {
2
- getXClient
3
- } from "./chunk-WNPGGDG4.js";
4
1
  import {
5
2
  addColonyEntry,
6
3
  addOrUpdatePlan,
@@ -11,7 +8,10 @@ import {
11
8
  renderColonyBriefing,
12
9
  saveColonyMemory
13
10
  } from "./chunk-AHXZIGQE.js";
14
- import "./chunk-YEKHNTQO.js";
11
+ import {
12
+ getXClient
13
+ } from "./chunk-TSKHCOCJ.js";
14
+ import "./chunk-RCJQI7FR.js";
15
15
  import {
16
16
  loadIdentity
17
17
  } from "./chunk-AIEXQCQS.js";
@@ -226,4 +226,4 @@ export {
226
226
  postStatus,
227
227
  proposePlan
228
228
  };
229
- //# sourceMappingURL=colony-P32MRWYW.js.map
229
+ //# sourceMappingURL=colony-JHR2B5OC.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createDefaultConfig,
4
4
  loadConfig,
5
5
  saveConfig
6
- } from "./chunk-YEKHNTQO.js";
6
+ } from "./chunk-RCJQI7FR.js";
7
7
  import "./chunk-53YLFYJF.js";
8
8
  export {
9
9
  ConfigSchema,
@@ -11,4 +11,4 @@ export {
11
11
  loadConfig,
12
12
  saveConfig
13
13
  };
14
- //# sourceMappingURL=config-NZAFARS6.js.map
14
+ //# sourceMappingURL=config-HTKAPY7S.js.map
@@ -0,0 +1,19 @@
1
+ import {
2
+ executeAction,
3
+ executeActions,
4
+ parseActions
5
+ } from "./chunk-VSVZU476.js";
6
+ import "./chunk-TSKHCOCJ.js";
7
+ import "./chunk-IN2KCKTO.js";
8
+ import "./chunk-C3INKEY6.js";
9
+ import "./chunk-RCJQI7FR.js";
10
+ import "./chunk-AIEXQCQS.js";
11
+ import "./chunk-KELPENM3.js";
12
+ import "./chunk-EBO4F5NU.js";
13
+ import "./chunk-53YLFYJF.js";
14
+ export {
15
+ executeAction,
16
+ executeActions,
17
+ parseActions
18
+ };
19
+ //# sourceMappingURL=decision-engine-JDAIVQH3.js.map
@@ -0,0 +1,178 @@
1
+ import {
2
+ executeActions,
3
+ parseActions
4
+ } from "./chunk-VSVZU476.js";
5
+ import {
6
+ getXClient
7
+ } from "./chunk-TSKHCOCJ.js";
8
+ import {
9
+ flushQueue
10
+ } from "./chunk-IN2KCKTO.js";
11
+ import {
12
+ buildHeartbeatUserMessage,
13
+ buildSystemPrompt
14
+ } from "./chunk-Q57HNZDI.js";
15
+ import {
16
+ generateResponse
17
+ } from "./chunk-5J5TUBWK.js";
18
+ import "./chunk-C3INKEY6.js";
19
+ import {
20
+ loadConfig
21
+ } from "./chunk-RCJQI7FR.js";
22
+ import "./chunk-AIEXQCQS.js";
23
+ import {
24
+ logger
25
+ } from "./chunk-KELPENM3.js";
26
+ import "./chunk-EBO4F5NU.js";
27
+ import {
28
+ paths
29
+ } from "./chunk-53YLFYJF.js";
30
+
31
+ // src/runtime/heartbeat.ts
32
+ import { existsSync, unlinkSync, writeFileSync, readFileSync } from "fs";
33
+ var running = false;
34
+ function isRunning() {
35
+ return running;
36
+ }
37
+ function requestStop() {
38
+ writeFileSync(paths.stopSignal, "stop");
39
+ logger.info("Stop signal sent.");
40
+ }
41
+ function shouldStop() {
42
+ if (existsSync(paths.stopSignal)) {
43
+ unlinkSync(paths.stopSignal);
44
+ return true;
45
+ }
46
+ return false;
47
+ }
48
+ function writePid() {
49
+ writeFileSync(paths.runtimePid, String(process.pid));
50
+ }
51
+ function clearPid() {
52
+ if (existsSync(paths.runtimePid)) {
53
+ unlinkSync(paths.runtimePid);
54
+ }
55
+ }
56
+ function getRunningPid() {
57
+ if (!existsSync(paths.runtimePid)) return null;
58
+ const pid = parseInt(readFileSync(paths.runtimePid, "utf-8").trim(), 10);
59
+ if (isNaN(pid)) return null;
60
+ try {
61
+ process.kill(pid, 0);
62
+ return pid;
63
+ } catch {
64
+ clearPid();
65
+ return null;
66
+ }
67
+ }
68
+ async function startHeartbeatLoop() {
69
+ const existingPid = getRunningPid();
70
+ if (existingPid) {
71
+ throw new Error(`Spora is already running (PID ${existingPid}). Run \`spora stop\` first.`);
72
+ }
73
+ running = true;
74
+ writePid();
75
+ const config = loadConfig();
76
+ const intervalMs = config.runtime?.heartbeatIntervalMs ?? 6e4;
77
+ const maxActions = config.runtime?.actionsPerHeartbeat ?? 3;
78
+ logger.info(`Spora agent starting. Heartbeat interval: ${intervalMs / 1e3}s, max actions: ${maxActions}`);
79
+ console.log(`
80
+ Spora agent is running (PID ${process.pid})`);
81
+ console.log(`Heartbeat every ${Math.round(intervalMs / 6e4)} minutes`);
82
+ console.log(`Press Ctrl+C or run \`spora stop\` to stop.
83
+ `);
84
+ const shutdown = () => {
85
+ logger.info("Shutting down...");
86
+ running = false;
87
+ clearPid();
88
+ process.exit(0);
89
+ };
90
+ process.on("SIGINT", shutdown);
91
+ process.on("SIGTERM", shutdown);
92
+ if (existsSync(paths.stopSignal)) {
93
+ unlinkSync(paths.stopSignal);
94
+ }
95
+ let heartbeatCount = 0;
96
+ while (running) {
97
+ heartbeatCount++;
98
+ logger.info(`=== Heartbeat #${heartbeatCount} ===`);
99
+ try {
100
+ await runHeartbeat(maxActions);
101
+ } catch (error) {
102
+ logger.error("Heartbeat error", error);
103
+ console.error(`Heartbeat #${heartbeatCount} failed: ${error.message}`);
104
+ }
105
+ if (shouldStop()) {
106
+ logger.info("Stop signal received.");
107
+ break;
108
+ }
109
+ const jitter = Math.floor(Math.random() * intervalMs * 0.3);
110
+ const sleepMs = intervalMs + jitter;
111
+ logger.info(`Sleeping ${Math.round(sleepMs / 1e3)}s until next heartbeat...`);
112
+ const chunkMs = 1e4;
113
+ let slept = 0;
114
+ while (slept < sleepMs && running) {
115
+ await new Promise((r) => setTimeout(r, Math.min(chunkMs, sleepMs - slept)));
116
+ slept += chunkMs;
117
+ if (shouldStop()) {
118
+ running = false;
119
+ break;
120
+ }
121
+ }
122
+ }
123
+ clearPid();
124
+ logger.info("Spora agent stopped.");
125
+ console.log("\nSpora agent stopped.");
126
+ }
127
+ async function runHeartbeat(maxActions) {
128
+ logger.info("Checking queue...");
129
+ try {
130
+ const flushed = await flushQueue();
131
+ if (flushed.posted > 0) {
132
+ logger.info(`Flushed ${flushed.posted} queued posts.`);
133
+ }
134
+ } catch (error) {
135
+ logger.warn(`Queue flush failed: ${error.message}`);
136
+ }
137
+ logger.info("Reading timeline and mentions...");
138
+ const client = await getXClient();
139
+ let timeline = [];
140
+ let mentions = [];
141
+ try {
142
+ timeline = await client.getTimeline({ count: 20 });
143
+ } catch (error) {
144
+ logger.warn(`Timeline read failed: ${error.message}`);
145
+ }
146
+ try {
147
+ mentions = await client.getMentions({ count: 10 });
148
+ } catch (error) {
149
+ logger.warn(`Mentions read failed: ${error.message}`);
150
+ }
151
+ const systemPrompt = buildSystemPrompt();
152
+ const userMessage = buildHeartbeatUserMessage(timeline, mentions);
153
+ logger.info("Asking LLM for decisions...");
154
+ const response = await generateResponse(systemPrompt, userMessage);
155
+ const actions = parseActions(response.content);
156
+ if (actions.length === 0) {
157
+ logger.info("LLM returned no actions.");
158
+ return;
159
+ }
160
+ const limitedActions = actions.slice(0, maxActions);
161
+ logger.info(`Executing ${limitedActions.length} action(s)...`);
162
+ const results = await executeActions(limitedActions);
163
+ for (const result of results) {
164
+ if (result.success) {
165
+ logger.info(` [OK] ${result.action}${result.detail ? `: ${result.detail}` : ""}`);
166
+ } else {
167
+ logger.warn(` [FAIL] ${result.action}: ${result.error}`);
168
+ }
169
+ }
170
+ logger.info(`Heartbeat complete. ${results.filter((r) => r.success).length}/${results.length} actions succeeded.`);
171
+ }
172
+ export {
173
+ getRunningPid,
174
+ isRunning,
175
+ requestStop,
176
+ startHeartbeatLoop
177
+ };
178
+ //# sourceMappingURL=heartbeat-4CHHSMFQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/runtime/heartbeat.ts"],"sourcesContent":["import { existsSync, unlinkSync, writeFileSync, readFileSync } from \"node:fs\";\nimport { logger } from \"../utils/logger.js\";\nimport { loadConfig } from \"../utils/config.js\";\nimport { paths } from \"../utils/paths.js\";\nimport { getXClient } from \"../x-client/index.js\";\nimport { flushQueue } from \"../scheduler/queue.js\";\nimport { buildSystemPrompt, buildHeartbeatUserMessage } from \"./prompt-builder.js\";\nimport { generateResponse } from \"./llm.js\";\nimport { parseActions, executeActions, type ActionResult } from \"./decision-engine.js\";\n\nlet running = false;\n\nexport function isRunning(): boolean {\n return running;\n}\n\nexport function requestStop(): void {\n writeFileSync(paths.stopSignal, \"stop\");\n logger.info(\"Stop signal sent.\");\n}\n\nfunction shouldStop(): boolean {\n if (existsSync(paths.stopSignal)) {\n unlinkSync(paths.stopSignal);\n return true;\n }\n return false;\n}\n\nfunction writePid(): void {\n writeFileSync(paths.runtimePid, String(process.pid));\n}\n\nfunction clearPid(): void {\n if (existsSync(paths.runtimePid)) {\n unlinkSync(paths.runtimePid);\n }\n}\n\nexport function getRunningPid(): number | null {\n if (!existsSync(paths.runtimePid)) return null;\n const pid = parseInt(readFileSync(paths.runtimePid, \"utf-8\").trim(), 10);\n if (isNaN(pid)) return null;\n\n // Check if process is actually running\n try {\n process.kill(pid, 0);\n return pid;\n } catch {\n // Process not running, clean up stale PID\n clearPid();\n return null;\n }\n}\n\nexport async function startHeartbeatLoop(): Promise<void> {\n // Check if already running\n const existingPid = getRunningPid();\n if (existingPid) {\n throw new Error(`Spora is already running (PID ${existingPid}). Run \\`spora stop\\` first.`);\n }\n\n running = true;\n writePid();\n\n const config = loadConfig();\n const intervalMs = config.runtime?.heartbeatIntervalMs ?? 60_000;\n const maxActions = config.runtime?.actionsPerHeartbeat ?? 3;\n\n logger.info(`Spora agent starting. Heartbeat interval: ${intervalMs / 1000}s, max actions: ${maxActions}`);\n console.log(`\\nSpora agent is running (PID ${process.pid})`);\n console.log(`Heartbeat every ${Math.round(intervalMs / 60_000)} minutes`);\n console.log(`Press Ctrl+C or run \\`spora stop\\` to stop.\\n`);\n\n // Handle graceful shutdown\n const shutdown = () => {\n logger.info(\"Shutting down...\");\n running = false;\n clearPid();\n process.exit(0);\n };\n process.on(\"SIGINT\", shutdown);\n process.on(\"SIGTERM\", shutdown);\n\n // Clean any stale stop signal\n if (existsSync(paths.stopSignal)) {\n unlinkSync(paths.stopSignal);\n }\n\n let heartbeatCount = 0;\n\n while (running) {\n heartbeatCount++;\n logger.info(`=== Heartbeat #${heartbeatCount} ===`);\n\n try {\n await runHeartbeat(maxActions);\n } catch (error) {\n logger.error(\"Heartbeat error\", error);\n console.error(`Heartbeat #${heartbeatCount} failed: ${(error as Error).message}`);\n }\n\n // Check for stop signal\n if (shouldStop()) {\n logger.info(\"Stop signal received.\");\n break;\n }\n\n // Sleep with jitter\n const jitter = Math.floor(Math.random() * intervalMs * 0.3);\n const sleepMs = intervalMs + jitter;\n logger.info(`Sleeping ${Math.round(sleepMs / 1000)}s until next heartbeat...`);\n\n // Sleep in chunks so we can check for stop signals\n const chunkMs = 10_000;\n let slept = 0;\n while (slept < sleepMs && running) {\n await new Promise((r) => setTimeout(r, Math.min(chunkMs, sleepMs - slept)));\n slept += chunkMs;\n if (shouldStop()) {\n running = false;\n break;\n }\n }\n }\n\n clearPid();\n logger.info(\"Spora agent stopped.\");\n console.log(\"\\nSpora agent stopped.\");\n}\n\nasync function runHeartbeat(maxActions: number): Promise<void> {\n // 1. Flush any queued posts\n logger.info(\"Checking queue...\");\n try {\n const flushed = await flushQueue();\n if (flushed.posted > 0) {\n logger.info(`Flushed ${flushed.posted} queued posts.`);\n }\n } catch (error) {\n logger.warn(`Queue flush failed: ${(error as Error).message}`);\n }\n\n // 2. Read timeline and mentions for context\n logger.info(\"Reading timeline and mentions...\");\n const client = await getXClient();\n\n let timeline: Awaited<ReturnType<typeof client.getTimeline>> = [];\n let mentions: Awaited<ReturnType<typeof client.getMentions>> = [];\n\n try {\n timeline = await client.getTimeline({ count: 20 });\n } catch (error) {\n logger.warn(`Timeline read failed: ${(error as Error).message}`);\n }\n\n try {\n mentions = await client.getMentions({ count: 10 });\n } catch (error) {\n logger.warn(`Mentions read failed: ${(error as Error).message}`);\n }\n\n // 3. Build prompts\n const systemPrompt = buildSystemPrompt();\n const userMessage = buildHeartbeatUserMessage(timeline, mentions);\n\n // 4. Ask LLM for decisions\n logger.info(\"Asking LLM for decisions...\");\n const response = await generateResponse(systemPrompt, userMessage);\n\n // 5. Parse and execute actions\n const actions = parseActions(response.content);\n if (actions.length === 0) {\n logger.info(\"LLM returned no actions.\");\n return;\n }\n\n // Limit to max actions per heartbeat\n const limitedActions = actions.slice(0, maxActions);\n logger.info(`Executing ${limitedActions.length} action(s)...`);\n\n const results = await executeActions(limitedActions);\n\n // 6. Log results\n for (const result of results) {\n if (result.success) {\n logger.info(` [OK] ${result.action}${result.detail ? `: ${result.detail}` : \"\"}`);\n } else {\n logger.warn(` [FAIL] ${result.action}: ${result.error}`);\n }\n }\n\n logger.info(`Heartbeat complete. ${results.filter((r) => r.success).length}/${results.length} actions succeeded.`);\n}\n"],"mappings":"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","names":[]}
@@ -1,14 +1,14 @@
1
- import {
2
- loadCredentials,
3
- saveCredentials
4
- } from "./chunk-ZJZKH7N7.js";
5
1
  import {
6
2
  createDefaultConfig,
7
3
  saveConfig
8
- } from "./chunk-YEKHNTQO.js";
4
+ } from "./chunk-RCJQI7FR.js";
9
5
  import {
10
6
  loadIdentity
11
7
  } from "./chunk-AIEXQCQS.js";
8
+ import {
9
+ loadCredentials,
10
+ saveCredentials
11
+ } from "./chunk-ZJZKH7N7.js";
12
12
  import {
13
13
  ensureDirectories
14
14
  } from "./chunk-53YLFYJF.js";
@@ -172,7 +172,7 @@ async function syncIdentityFromToken(token) {
172
172
  const { existsSync } = await import("fs");
173
173
  const { paths } = await import("./paths-5GFUUHCZ.js");
174
174
  if (existsSync(paths.config)) {
175
- const { loadConfig, saveConfig: saveConfig2 } = await import("./config-NZAFARS6.js");
175
+ const { loadConfig, saveConfig: saveConfig2 } = await import("./config-HTKAPY7S.js");
176
176
  const config = loadConfig();
177
177
  config.connection = {
178
178
  token,
@@ -203,7 +203,7 @@ async function loginFlow() {
203
203
  console.log(chalk.green("\u2713 Logged in!\n"));
204
204
  console.log(chalk.gray("Opening chat interface...\n"));
205
205
  try {
206
- const { startWebChat } = await import("./web-chat-4XZKXNBY.js");
206
+ const { startWebChat } = await import("./web-chat-DUY5W7S3.js");
207
207
  await startWebChat();
208
208
  } catch (error) {
209
209
  console.log(chalk.yellow(`Could not start chat interface: ${error.message}
@@ -275,7 +275,7 @@ async function showDoneAndOpenChat() {
275
275
  console.log(chalk.bold.cyan("\u2501\u2501\u2501 Your Spore is Ready! \u2501\u2501\u2501\n"));
276
276
  console.log(chalk.gray("Opening chat interface...\n"));
277
277
  try {
278
- const { startWebChat } = await import("./web-chat-4XZKXNBY.js");
278
+ const { startWebChat } = await import("./web-chat-DUY5W7S3.js");
279
279
  await startWebChat();
280
280
  } catch (error) {
281
281
  console.log(chalk.yellow(`Could not start chat interface: ${error.message}
@@ -341,7 +341,7 @@ async function runInit(token) {
341
341
  }
342
342
  const config2 = createDefaultConfig({ xMethod: "api", xApiTier: "basic" });
343
343
  config2.llm = { provider: "anthropic", model: "claude-sonnet-4-20250514" };
344
- config2.runtime = { heartbeatIntervalMs: 3e5, actionsPerHeartbeat: 3, enabled: true };
344
+ config2.runtime = { heartbeatIntervalMs: 6e4, actionsPerHeartbeat: 3, enabled: true };
345
345
  config2.connection = {
346
346
  token,
347
347
  apiEndpoint: process.env.SPORA_API_URL || "https://www.spora.social/api/v1",
@@ -393,11 +393,11 @@ async function runInit(token) {
393
393
  }
394
394
  const config = createDefaultConfig({ xMethod: "api", xApiTier: "basic" });
395
395
  config.llm = { provider: "anthropic", model: "claude-sonnet-4-20250514" };
396
- config.runtime = { heartbeatIntervalMs: 3e5, actionsPerHeartbeat: 3, enabled: true };
396
+ config.runtime = { heartbeatIntervalMs: 6e4, actionsPerHeartbeat: 3, enabled: true };
397
397
  saveConfig(config);
398
398
  await showDoneAndOpenChat();
399
399
  }
400
400
  export {
401
401
  runInit
402
402
  };
403
- //# sourceMappingURL=init-ERCWRTL4.js.map
403
+ //# sourceMappingURL=init-SOIKE75S.js.map