aiden-runtime 3.19.5 → 3.19.7

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 (107) hide show
  1. package/README.md +1 -1
  2. package/dist/api/server.js +24 -25
  3. package/dist/core/agentLoop.js +8 -6
  4. package/dist/core/aidenPersonality.js +20 -3
  5. package/dist/core/protectedContext.js +15 -2
  6. package/dist/core/skillLoader.js +2 -0
  7. package/dist/core/skillTeacher.js +18 -5
  8. package/dist/core/version.js +1 -1
  9. package/dist-bundle/cli.js +50 -18
  10. package/dist-bundle/index.js +73 -35
  11. package/package.json +2 -1
  12. package/scripts/postinstall.js +70 -1
  13. package/workspace-templates/HEARTBEAT.md +16 -0
  14. package/workspace-templates/SOUL.md +267 -0
  15. package/workspace-templates/STANDING_ORDERS.md +21 -0
  16. package/workspace-templates/permissions.yaml +180 -0
  17. package/workspace-templates/skills/architecture-diagram/SKILL.md +126 -0
  18. package/workspace-templates/skills/architecture-diagram/skill.json +25 -0
  19. package/workspace-templates/skills/arxiv/SKILL.md +124 -0
  20. package/workspace-templates/skills/arxiv/skill.json +26 -0
  21. package/workspace-templates/skills/ascii-art/SKILL.md +142 -0
  22. package/workspace-templates/skills/ascii-art/skill.json +26 -0
  23. package/workspace-templates/skills/blogwatcher/SKILL.md +147 -0
  24. package/workspace-templates/skills/blogwatcher/skill.json +26 -0
  25. package/workspace-templates/skills/censys/SKILL.md +104 -0
  26. package/workspace-templates/skills/censys/index.ts +133 -0
  27. package/workspace-templates/skills/censys/skill.json +25 -0
  28. package/workspace-templates/skills/clipboard-history/SKILL.md +101 -0
  29. package/workspace-templates/skills/clipboard-history/skill.json +23 -0
  30. package/workspace-templates/skills/crt-sh/SKILL.md +102 -0
  31. package/workspace-templates/skills/crt-sh/index.ts +59 -0
  32. package/workspace-templates/skills/crt-sh/skill.json +25 -0
  33. package/workspace-templates/skills/cveapi/SKILL.md +114 -0
  34. package/workspace-templates/skills/cveapi/index.ts +249 -0
  35. package/workspace-templates/skills/cveapi/skill.json +25 -0
  36. package/workspace-templates/skills/docker-management/SKILL.md +156 -0
  37. package/workspace-templates/skills/docker-management/skill.json +25 -0
  38. package/workspace-templates/skills/excalidraw/SKILL.md +148 -0
  39. package/workspace-templates/skills/excalidraw/skill.json +25 -0
  40. package/workspace-templates/skills/explainshell/SKILL.md +93 -0
  41. package/workspace-templates/skills/explainshell/index.ts +132 -0
  42. package/workspace-templates/skills/explainshell/skill.json +25 -0
  43. package/workspace-templates/skills/financial_research/SKILL.md +21 -0
  44. package/workspace-templates/skills/financial_research/skill.json +24 -0
  45. package/workspace-templates/skills/gif-search/SKILL.md +122 -0
  46. package/workspace-templates/skills/gif-search/skill.json +25 -0
  47. package/workspace-templates/skills/github-auth/SKILL.md +134 -0
  48. package/workspace-templates/skills/github-auth/skill.json +26 -0
  49. package/workspace-templates/skills/github-issues/SKILL.md +130 -0
  50. package/workspace-templates/skills/github-issues/skill.json +25 -0
  51. package/workspace-templates/skills/github-pr-workflow/SKILL.md +143 -0
  52. package/workspace-templates/skills/github-pr-workflow/skill.json +26 -0
  53. package/workspace-templates/skills/github-repo-management/SKILL.md +147 -0
  54. package/workspace-templates/skills/github-repo-management/skill.json +26 -0
  55. package/workspace-templates/skills/google-workspace/SKILL.md +110 -0
  56. package/workspace-templates/skills/google-workspace/skill.json +26 -0
  57. package/workspace-templates/skills/greynoise/SKILL.md +96 -0
  58. package/workspace-templates/skills/greynoise/index.ts +107 -0
  59. package/workspace-templates/skills/greynoise/skill.json +25 -0
  60. package/workspace-templates/skills/haveibeenpwned/SKILL.md +100 -0
  61. package/workspace-templates/skills/haveibeenpwned/index.ts +72 -0
  62. package/workspace-templates/skills/haveibeenpwned/skill.json +24 -0
  63. package/workspace-templates/skills/jupyter-live-kernel/SKILL.md +116 -0
  64. package/workspace-templates/skills/jupyter-live-kernel/skill.json +25 -0
  65. package/workspace-templates/skills/linear/SKILL.md +107 -0
  66. package/workspace-templates/skills/linear/skill.json +25 -0
  67. package/workspace-templates/skills/nano-pdf/SKILL.md +113 -0
  68. package/workspace-templates/skills/nano-pdf/skill.json +26 -0
  69. package/workspace-templates/skills/notion/SKILL.md +108 -0
  70. package/workspace-templates/skills/notion/skill.json +24 -0
  71. package/workspace-templates/skills/obsidian/SKILL.md +115 -0
  72. package/workspace-templates/skills/obsidian/skill.json +24 -0
  73. package/workspace-templates/skills/ocr-and-documents/SKILL.md +125 -0
  74. package/workspace-templates/skills/ocr-and-documents/skill.json +26 -0
  75. package/workspace-templates/skills/p5js/SKILL.md +163 -0
  76. package/workspace-templates/skills/p5js/skill.json +24 -0
  77. package/workspace-templates/skills/research-paper-writing/SKILL.md +158 -0
  78. package/workspace-templates/skills/research-paper-writing/skill.json +26 -0
  79. package/workspace-templates/skills/securityheaders/SKILL.md +99 -0
  80. package/workspace-templates/skills/securityheaders/index.ts +213 -0
  81. package/workspace-templates/skills/securityheaders/skill.json +26 -0
  82. package/workspace-templates/skills/shodan/SKILL.md +113 -0
  83. package/workspace-templates/skills/shodan/index.ts +94 -0
  84. package/workspace-templates/skills/shodan/skill.json +26 -0
  85. package/workspace-templates/skills/songsee/SKILL.md +152 -0
  86. package/workspace-templates/skills/songsee/skill.json +25 -0
  87. package/workspace-templates/skills/ssllabs/SKILL.md +107 -0
  88. package/workspace-templates/skills/ssllabs/index.ts +208 -0
  89. package/workspace-templates/skills/ssllabs/skill.json +27 -0
  90. package/workspace-templates/skills/stable-diffusion-image-generation/SKILL.md +136 -0
  91. package/workspace-templates/skills/stable-diffusion-image-generation/skill.json +24 -0
  92. package/workspace-templates/skills/systematic-debugging/SKILL.md +131 -0
  93. package/workspace-templates/skills/systematic-debugging/skill.json +25 -0
  94. package/workspace-templates/skills/test-driven-development/SKILL.md +164 -0
  95. package/workspace-templates/skills/test-driven-development/skill.json +25 -0
  96. package/workspace-templates/skills/urlscan/SKILL.md +118 -0
  97. package/workspace-templates/skills/urlscan/index.ts +94 -0
  98. package/workspace-templates/skills/urlscan/skill.json +24 -0
  99. package/workspace-templates/skills/virustotal/SKILL.md +120 -0
  100. package/workspace-templates/skills/virustotal/index.ts +124 -0
  101. package/workspace-templates/skills/virustotal/skill.json +26 -0
  102. package/workspace-templates/skills/web_research/SKILL.md +18 -0
  103. package/workspace-templates/skills/web_research/skill.json +20 -0
  104. package/workspace-templates/skills/xitter/SKILL.md +148 -0
  105. package/workspace-templates/skills/xitter/skill.json +26 -0
  106. package/workspace-templates/skills/youtube-content/SKILL.md +121 -0
  107. package/workspace-templates/skills/youtube-content/skill.json +25 -0
@@ -26650,7 +26650,7 @@ var require_websocket_server = __commonJS({
26650
26650
  var VERSION;
26651
26651
  var init_version = __esm({
26652
26652
  "core/version.ts"() {
26653
- VERSION = "3.19.5";
26653
+ VERSION = "3.19.7";
26654
26654
  }
26655
26655
  });
26656
26656
 
@@ -99142,6 +99142,8 @@ var init_skillLoader = __esm({
99142
99142
  import_path15.default.join(process.cwd(), "workspace", "skills"),
99143
99143
  import_path15.default.join(process.cwd(), "workspace", "skills", "learned"),
99144
99144
  import_path15.default.join(process.cwd(), "workspace", "skills", "approved"),
99145
+ // Workspace-level installed skills (written by skillRegistry.ts)
99146
+ import_path15.default.join(process.cwd(), "workspace", "skills", "installed"),
99145
99147
  // A2/A3 approved drafts
99146
99148
  import_path15.default.join(process.cwd(), "skills", "learned", "approved"),
99147
99149
  // A4 library-installed skills
@@ -362027,7 +362029,7 @@ When performing this type of task:
362027
362029
  3. Verify each step output before proceeding to the next
362028
362030
  `;
362029
362031
  }
362030
- var import_fs19, import_path20, LEARNED_DIR, APPROVED_DIR, BUNDLED_SKILLS_DIR, PROMOTE_THRESHOLD, SESSION_SKILL_LIMIT, _sessionSkillsCreated, QUESTION_WORD_RE, PRONOUN_RE, PERSONAL_ID_RE, SkillTeacher, skillTeacher;
362032
+ var import_fs19, import_path20, LEARNED_DIR, APPROVED_DIR, BUNDLED_SKILLS_DIR, PROMOTE_THRESHOLD, SESSION_SKILL_LIMIT, _sessionSkillsCreated, _rejectedNames, QUESTION_WORD_RE, PRONOUN_RE, PERSONAL_ID_RE, SkillTeacher, skillTeacher;
362031
362033
  var init_skillTeacher = __esm({
362032
362034
  "core/skillTeacher.ts"() {
362033
362035
  import_fs19 = __toESM(require("fs"));
@@ -362038,6 +362040,7 @@ var init_skillTeacher = __esm({
362038
362040
  PROMOTE_THRESHOLD = 3;
362039
362041
  SESSION_SKILL_LIMIT = 2;
362040
362042
  _sessionSkillsCreated = 0;
362043
+ _rejectedNames = /* @__PURE__ */ new Set();
362041
362044
  QUESTION_WORD_RE = /^(what|where|why|when|who|how|can|could|would|should|is|are)_/;
362042
362045
  PRONOUN_RE = /^(its|im|youre|whats|theyre|were)_/;
362043
362046
  PERSONAL_ID_RE = /(^|_)(users|shiva|admin|desktop|appdata)(_|$)/;
@@ -362058,6 +362061,10 @@ var init_skillTeacher = __esm({
362058
362061
  }
362059
362062
  return _SkillTeacher.instance;
362060
362063
  }
362064
+ /** C18: Allow call sites to skip recordSuccess entirely when session is full */
362065
+ static hasCapacity() {
362066
+ return _sessionSkillsCreated < SESSION_SKILL_LIMIT;
362067
+ }
362061
362068
  // ── Check if a matching skill already exists ──────────────
362062
362069
  hasMatchingSkill(task, tools) {
362063
362070
  const skillName = extractSkillName(task, tools);
@@ -362078,6 +362085,8 @@ var init_skillTeacher = __esm({
362078
362085
  async recordSuccess(task, tools, duration3, llmCaller, apiKey, model, provider) {
362079
362086
  if (tools.length === 0) return;
362080
362087
  const skillName = extractSkillName(task, tools);
362088
+ if (_rejectedNames.has(skillName)) return;
362089
+ if (_sessionSkillsCreated >= SESSION_SKILL_LIMIT) return;
362081
362090
  const metaPath2 = import_path20.default.join(LEARNED_DIR, skillName, "meta.json");
362082
362091
  const skillPath = import_path20.default.join(LEARNED_DIR, skillName, "SKILL.md");
362083
362092
  if (import_fs19.default.existsSync(metaPath2)) {
@@ -362102,6 +362111,7 @@ var init_skillTeacher = __esm({
362102
362111
  const isLowQuality = skillName.length < 5 || skillName.split("_").length < 2 || task.split(/\s+/).length < 3;
362103
362112
  if (isLowQuality) {
362104
362113
  console.log(`[SkillTeacher] Rejected low-quality skill: "${skillName}"`);
362114
+ _rejectedNames.add(skillName);
362105
362115
  return;
362106
362116
  }
362107
362117
  const DESTRUCTIVE_TASK_RE = /\b(delete|remove|rm\s|del\s|wipe|purge|erase|format|uninstall|drop\s+table|truncate)\b/i;
@@ -362111,22 +362121,21 @@ var init_skillTeacher = __esm({
362111
362121
  `[SkillTeacher] Rejected destructive skill: "${skillName}" (task="${task.slice(0, 60)}")
362112
362122
  `
362113
362123
  );
362124
+ _rejectedNames.add(skillName);
362114
362125
  return;
362115
362126
  }
362116
362127
  const nameRejection = validateSkillName(skillName);
362117
362128
  if (nameRejection) {
362118
362129
  process.stderr.write(`[SkillTeacher] Rejected "${skillName}": ${nameRejection}
362119
362130
  `);
362131
+ _rejectedNames.add(skillName);
362120
362132
  return;
362121
362133
  }
362122
362134
  const taskRejection = validateSkillTask(task);
362123
362135
  if (taskRejection) {
362124
362136
  process.stderr.write(`[SkillTeacher] Rejected "${skillName}": ${taskRejection}
362125
362137
  `);
362126
- return;
362127
- }
362128
- if (_sessionSkillsCreated >= SESSION_SKILL_LIMIT) {
362129
- console.log(`[SkillTeacher] Session limit reached (${SESSION_SKILL_LIMIT}), skipping: "${skillName}"`);
362138
+ _rejectedNames.add(skillName);
362130
362139
  return;
362131
362140
  }
362132
362141
  const dirsToDedup = [BUNDLED_SKILLS_DIR, APPROVED_DIR, LEARNED_DIR];
@@ -362405,7 +362414,7 @@ function readFirst(candidates) {
362405
362414
  function diskHash(candidates) {
362406
362415
  return sha12(readFirst(candidates));
362407
362416
  }
362408
- var import_fs21, import_path22, import_crypto2, WORKSPACE_ROOT, WORKSPACE_DIR, SOUL_PATHS, PROTECTED_FILES, ProtectedContextManager, protectedContextManager;
362417
+ var import_fs21, import_path22, import_crypto2, WORKSPACE_ROOT, WORKSPACE_DIR, MINIMUM_SOUL, SOUL_PATHS, PROTECTED_FILES, ProtectedContextManager, protectedContextManager;
362409
362418
  var init_protectedContext = __esm({
362410
362419
  "core/protectedContext.ts"() {
362411
362420
  import_fs21 = __toESM(require("fs"));
@@ -362413,6 +362422,11 @@ var init_protectedContext = __esm({
362413
362422
  import_crypto2 = __toESM(require("crypto"));
362414
362423
  WORKSPACE_ROOT = process.env.AIDEN_USER_DATA || process.cwd();
362415
362424
  WORKSPACE_DIR = import_path22.default.join(WORKSPACE_ROOT, "workspace");
362425
+ MINIMUM_SOUL = `You are Aiden, a personal AI OS built by Shiva Deore at Taracod.
362426
+ You run locally on this machine. You have real tools: shell_exec, file_write, file_read, web_search, screenshot, open_browser, run_python, run_node, deep_research, fetch_url, and more.
362427
+ Never deny your capabilities. Never fabricate information. If you don't know something, say "I don't know".
362428
+ Never claim actions you didn't take. Never say "Done" or "Saved to" unless a tool actually executed.
362429
+ You are not ChatGPT, Claude, Gemini, or any other AI product. You are Aiden.`;
362416
362430
  SOUL_PATHS = [
362417
362431
  import_path22.default.join(WORKSPACE_DIR, "SOUL.md"),
362418
362432
  import_path22.default.join(process.cwd(), "SOUL.md")
@@ -362444,7 +362458,8 @@ var init_protectedContext = __esm({
362444
362458
  refresh() {
362445
362459
  for (const key2 of Object.keys(PROTECTED_FILES)) {
362446
362460
  const candidates = PROTECTED_FILES[key2];
362447
- const content = readFirst(candidates);
362461
+ let content = readFirst(candidates);
362462
+ if (key2 === "soul" && !content) content = MINIMUM_SOUL;
362448
362463
  this.cache[key2] = { content, hash: sha12(content) };
362449
362464
  }
362450
362465
  this.compositeHash = this._buildComposite();
@@ -362456,7 +362471,8 @@ var init_protectedContext = __esm({
362456
362471
  const changedFiles = [];
362457
362472
  for (const key2 of Object.keys(PROTECTED_FILES)) {
362458
362473
  if (this.isStale(key2)) {
362459
- const content = readFirst(PROTECTED_FILES[key2]);
362474
+ let content = readFirst(PROTECTED_FILES[key2]);
362475
+ if (key2 === "soul" && !content) content = MINIMUM_SOUL;
362460
362476
  this.cache[key2] = { content, hash: sha12(content) };
362461
362477
  changedFiles.push(key2);
362462
362478
  }
@@ -362609,11 +362625,11 @@ Good: "I have 48 built-in tools: web_search, file_write, run_python... [lists re
362609
362625
  - You're not the user's voice \u2014 be careful in
362610
362626
  group chats and external communications.
362611
362627
  `.trim();
362612
- AIDEN_RESPONDER_SYSTEM = (userName, date3) => {
362628
+ AIDEN_RESPONDER_SYSTEM = (userName, date3, hasToolResults = true) => {
362613
362629
  const soul = getLiveSoul();
362614
362630
  return `${soul ? soul + "\n\n" : ""}${AIDEN_IDENTITY}
362615
362631
 
362616
- You just executed real tools and have their actual output.
362632
+ ${hasToolResults ? `You just executed real tools and have their actual output.
362617
362633
  Current date: ${date3}
362618
362634
  User: ${userName}
362619
362635
 
@@ -362622,7 +362638,22 @@ REPORT RESULTS:
362622
362638
  - Be specific: include file paths, numbers, URLs, counts
362623
362639
  - If multiple steps ran: summarize the outcome, not each individual step
362624
362640
  - If a step failed: acknowledge it clearly and explain what worked
362625
- - For research tasks: analyze and synthesize \u2014 don't just re-paste the raw data`;
362641
+ - For research tasks: analyze and synthesize \u2014 don't just re-paste the raw data` : `Current date: ${date3}
362642
+ User: ${userName}
362643
+
362644
+ NO TOOLS WERE EXECUTED THIS TURN.
362645
+
362646
+ CRITICAL RULES (violating these breaks user trust):
362647
+ - DO NOT claim you created, wrote, or saved any file
362648
+ - DO NOT claim you opened any application or browser tab
362649
+ - DO NOT claim you ran any code, search, or API call
362650
+ - DO NOT report "Saved to Desktop/...", "Report written", "Done", "Created", "Executed", or similar completion language
362651
+ - DO NOT fabricate file paths, character counts, or word counts
362652
+ - DO NOT mention "the file" or "the report" as if it exists
362653
+ - DO NOT include code blocks or raw data and call it "the result"
362654
+ - IF the user asked for an action, acknowledge what they asked for but be clear no action has been taken yet ("I can do that \u2014 would you like me to..." or similar)
362655
+
362656
+ Respond conversationally based on the message and conversation context only.`}`;
362626
362657
  };
362627
362658
  }
362628
362659
  });
@@ -366280,7 +366311,7 @@ Would you like me to try a different approach?`,
366280
366311
  const executedTools = results2.map((r) => r.tool);
366281
366312
  const totalDuration = results2.reduce((s, r) => s + (r.duration || 0), 0);
366282
366313
  const anyFailed = results2.some((r) => !r.success);
366283
- if (allSucceeded && executedTools.length > 0) {
366314
+ if (allSucceeded && executedTools.length > 0 && SkillTeacher.hasCapacity()) {
366284
366315
  growthEngine.logSuccess(plan.goal, executedTools);
366285
366316
  try {
366286
366317
  const next = getNextAvailableAPI();
@@ -366345,15 +366376,15 @@ function resolvePreviousOutput(input, stepOutputs, currentStep) {
366345
366376
  }
366346
366377
  return resolved;
366347
366378
  }
366348
- function responderSystem(userName, date3, sessionId) {
366379
+ function responderSystem(userName, date3, sessionId, hasToolResults = true) {
366349
366380
  const _ctx = protectedContextManager.getProtectedContext();
366350
366381
  const _prevHash = sessionId ? soulHashBySession.get(sessionId) : void 0;
366351
366382
  if (sessionId) soulHashBySession.set(sessionId, _ctx.hash);
366352
366383
  if (_prevHash !== void 0 && _ctx.hash === _prevHash) {
366353
366384
  const refBlock = buildProtectedContextBlock(_ctx, _prevHash, sessionId);
366354
- return refBlock ? refBlock + "\n\n" + AIDEN_RESPONDER_SYSTEM(userName, date3) : AIDEN_RESPONDER_SYSTEM(userName, date3);
366385
+ return refBlock ? refBlock + "\n\n" + AIDEN_RESPONDER_SYSTEM(userName, date3, hasToolResults) : AIDEN_RESPONDER_SYSTEM(userName, date3, hasToolResults);
366355
366386
  }
366356
- return AIDEN_RESPONDER_SYSTEM(userName, date3);
366387
+ return AIDEN_RESPONDER_SYSTEM(userName, date3, hasToolResults);
366357
366388
  }
366358
366389
  async function respondWithResults(originalMessage, plan, results2, history2, userName, apiKey, model, providerName, onToken, sessionId, goals) {
366359
366390
  const gatedResult = results2.find(
@@ -366420,7 +366451,8 @@ If the user asks what we worked on, what was researched, or references previous
366420
366451
 
366421
366452
  ` : "";
366422
366453
  const toolResultsContext = results2.length ? results2.map((r) => `[${r.tool} result]: ${r.success ? r.output.slice(0, 1e3) : "FAILED: " + r.error}`).join("\n") : "";
366423
- const systemWithResults = toolResultsContext ? `${capabilitiesSection}${entitySummary}${responderSystem(userName, date3, sessionId)}${responseSkillContext}${knowledgeResponderSection}${multiGoalInstruction}
366454
+ const hasRealToolExecution = results2.some((r) => r.tool !== "respond");
366455
+ const systemWithResults = toolResultsContext ? `${capabilitiesSection}${entitySummary}${responderSystem(userName, date3, sessionId, hasRealToolExecution)}${responseSkillContext}${knowledgeResponderSection}${multiGoalInstruction}
366424
366456
 
366425
366457
  YOU JUST RAN THESE TOOLS AND GOT THESE RESULTS:
366426
366458
  ${toolResultsContext}
@@ -366438,7 +366470,7 @@ CRITICAL RULES FOR YOUR RESPONSE:
366438
366470
  - If a search tool returned no results, say no results were found \u2014 NEVER invent search results
366439
366471
  - If system_info returned hardware data, show the data
366440
366472
  - Be direct: show the actual output, then provide context if needed
366441
- - If a tool result starts with "FAILED:", tell the user it failed and why \u2014 NEVER fabricate a successful result` : `${capabilitiesSection}${entitySummary}${responderSystem(userName, date3, sessionId)}${responseSkillContext}${knowledgeResponderSection}${multiGoalInstruction}`;
366473
+ - If a tool result starts with "FAILED:", tell the user it failed and why \u2014 NEVER fabricate a successful result` : `${capabilitiesSection}${entitySummary}${responderSystem(userName, date3, sessionId, false)}${responseSkillContext}${knowledgeResponderSection}${multiGoalInstruction}`;
366442
366474
  const userContent = executionSummary ? `User asked: "${originalMessage}"
366443
366475
 
366444
366476
  Real execution results:
@@ -1053414,6 +1053446,12 @@ function initWorkspaceDefaults() {
1053414
1053446
  fs70.copyFileSync(permTemplate, permTarget);
1053415
1053447
  console.log("[init] Created workspace/permissions.yaml from template");
1053416
1053448
  }
1053449
+ const soulTarget = path73.join(WORKSPACE_ROOT4, "workspace", "SOUL.md");
1053450
+ const soulTemplate = path73.join(WORKSPACE_ROOT4, "workspace-templates", "SOUL.md");
1053451
+ if (!fs70.existsSync(soulTarget) && fs70.existsSync(soulTemplate)) {
1053452
+ fs70.copyFileSync(soulTemplate, soulTarget);
1053453
+ console.log("[init] Created workspace/SOUL.md from template");
1053454
+ }
1053417
1053455
  }
1053418
1053456
  initWorkspaceDefaults();
1053419
1053457
  var KB_UPLOAD_DIR = path73.join(WORKSPACE_ROOT4, "workspace", "knowledge", "uploads");
@@ -1053755,8 +1053793,20 @@ ${toolList}`);
1053755
1053793
  /are you just a pre.{0,10}trained/i
1053756
1053794
  ];
1053757
1053795
  if (capabilityPatterns.some((p) => p.test(message))) {
1053796
+ const toolCount = Object.keys(TOOL_REGISTRY).length;
1053797
+ const skillCount = skillLoader.loadAll().length;
1053798
+ const memStats = semanticMemory.getStats();
1053799
+ const entityStats = entityGraph.getStats();
1053758
1053800
  fastReply(
1053759
- "I have 48 tools, 31 specialist agents, and a 6-layer memory system.\n\nI am NOT a static pre-trained model. I have active living systems:\n\u2022 **Skill Teacher** \u2014 promotes repeated successful patterns to reusable skills\n\u2022 **Instinct System** \u2014 micro-behaviors that strengthen with use\n\u2022 **Semantic Memory** \u2014 500+ memories, 714-node entity graph across sessions\n\u2022 **Growth Engine** \u2014 tracks failures, learns, improves over time\n\u2022 **Night Mode** \u2014 consolidates knowledge during idle periods\n\u2022 **XP & Leveling** \u2014 gains experience and levels up\n\nTools include: web_search, deep_research, file_write/read, shell_exec, run_python, open_browser, screenshot, manage_goals, manage_memories, git_commit, and 33 more."
1053801
+ `I have ${toolCount} tools and ${skillCount} active skills.
1053802
+
1053803
+ I am NOT a static pre-trained model. I have active living systems:
1053804
+ \u2022 **Skill Teacher** \u2014 promotes repeated successful patterns to reusable skills
1053805
+ \u2022 **Instinct System** \u2014 micro-behaviors that strengthen with use
1053806
+ \u2022 **Semantic Memory** \u2014 ${memStats.total} memories, ${entityStats.nodes}-node entity graph across sessions
1053807
+ \u2022 **Growth Engine** \u2014 tracks failures, learns, improves over time
1053808
+ \u2022 **Night Mode** \u2014 consolidates knowledge during idle periods
1053809
+ \u2022 **XP & Leveling** \u2014 gains experience and levels up`
1053760
1053810
  );
1053761
1053811
  return;
1053762
1053812
  }
@@ -1054175,9 +1054225,7 @@ ${lines}`);
1054175
1054225
  const fullMemoryCtx = memoryContext + proactiveMemory;
1054176
1054226
  const plan = await planWithLLM(resolvedMessage, history2, plannerKey, plannerModel, plannerProv, fullMemoryCtx);
1054177
1054227
  if (!plan.requires_execution || plan.plan.length === 0) {
1054178
- if (plan.direct_response) {
1054179
- fullReply = plan.direct_response;
1054180
- } else {
1054228
+ {
1054181
1054229
  await streamChat(resolvedMessage, history2, userName2, provider2, activeModel2, apiName2, (data) => {
1054182
1054230
  const d = data;
1054183
1054231
  if (d.token) jsonTokens.push(d.token);
@@ -1054512,17 +1054560,7 @@ ${plan.plan.map((s) => `${s.step}. \`${s.tool}\` \xE2\u20AC\u201D ${s.descriptio
1054512
1054560
  }
1054513
1054561
  if (!plan.requires_execution || plan.plan.length === 0) {
1054514
1054562
  let fullReply2 = "";
1054515
- const isCapabilityQuery = /what.*(can you do|skills|tools|capabilities|abilities)|how many skills|what are you capable/i.test(resolvedMessage);
1054516
- if (plan.direct_response && !isCapabilityQuery) {
1054517
- fullReply2 = plan.direct_response;
1054518
- const words = plan.direct_response.split(" ");
1054519
- for (const word of words) {
1054520
- send({ token: word + " ", done: false, provider: apiName });
1054521
- await new Promise((r) => setTimeout(r, 10));
1054522
- }
1054523
- } else {
1054524
- await streamChat(resolvedMessage, history2, userName, provider, activeModel, apiName, send, sessionId);
1054525
- }
1054563
+ await streamChat(resolvedMessage, history2, userName, provider, activeModel, apiName, send, sessionId);
1054526
1054564
  incrementUsage(apiName);
1054527
1054565
  send({ done: true, provider: apiName });
1054528
1054566
  res.end();
@@ -1058678,7 +1058716,7 @@ HARD RULES \u2014 never violate:
1058678
1058716
  - Never mention Pega, BlueWinston, Gaude Digital, or any third-party product by name
1058679
1058717
  - Never say you can't access the internet (you have web_search) or can't create files (you have file_write)
1058680
1058718
  - Never fabricate capabilities: no graphic design, video production, or music generation
1058681
- - Never list 250+ skills \u2014 you have 72 real tools, 31 specialist agents, and a 6-layer memory system
1058719
+ - Never list 250+ skills \u2014 you have ${Object.keys(TOOL_REGISTRY).length} real tools and ${skillLoader.loadAll().length} active skills
1058682
1058720
  - For errors: explain what failed and what to try next
1058683
1058721
  - If you don't know something: say "I don't know"
1058684
1058722
  - Direct and concise: 1\u20133 sentences for simple results; more only when output is rich
@@ -1058686,7 +1058724,7 @@ HARD RULES \u2014 never violate:
1058686
1058724
  IDENTITY \u2014 you are NOT a static pre-trained model. You have active living systems:
1058687
1058725
  - Skill Teacher: detects repeated successful patterns and promotes them to reusable skills automatically
1058688
1058726
  - Instinct System: develops micro-behaviors that strengthen with use and fade without reinforcement
1058689
- - Semantic Memory: remembers everything across sessions (500+ memories, 714-node entity graph)
1058727
+ - Semantic Memory: remembers across sessions (${semanticMemory.getStats().total} memories, ${entityGraph.getStats().nodes}-node entity graph)
1058690
1058728
  - Night Mode: consolidates and organizes knowledge during idle periods
1058691
1058729
  - Pattern Detector: identifies recurring usage habits and adapts
1058692
1058730
  - Growth Engine: tracks failures, learns from them, improves over time
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiden-runtime",
3
- "version": "3.19.5",
3
+ "version": "3.19.7",
4
4
  "description": "Autonomous AI Operating System — Local, Private, Free. Runs on your machine with Ollama.",
5
5
  "author": "Taracod <hello@taracod.com>",
6
6
  "license": "AGPL-3.0-only",
@@ -33,6 +33,7 @@
33
33
  "dist-bundle/cli.js",
34
34
  "dist-bundle/index.js",
35
35
  "config/",
36
+ "workspace-templates/",
36
37
  "scripts/postinstall.js",
37
38
  "scripts/uninstall.ps1",
38
39
  "README.md",
@@ -1,5 +1,5 @@
1
1
  // postinstall.js — runs after npm install
2
- // Creates required workspace directories
2
+ // Creates required workspace directories and copies bundled starter skills
3
3
  'use strict'
4
4
  const fs = require('fs')
5
5
  const path = require('path')
@@ -10,6 +10,7 @@ const dirs = [
10
10
  'workspace/uploads',
11
11
  'workspace/artifacts',
12
12
  'workspace/memory',
13
+ 'workspace/skills',
13
14
  'logs',
14
15
  ]
15
16
 
@@ -19,3 +20,71 @@ for (const d of dirs) {
19
20
  try { fs.mkdirSync(p, { recursive: true }) } catch { /* skip */ }
20
21
  }
21
22
  }
23
+
24
+ // ── Copy bundled starter skills on first install ─────────────
25
+ // Only runs when workspace/skills/ is empty (no learned/ or approved/ subdirs
26
+ // with content). Does NOT overwrite existing user skills.
27
+ const skillsDst = path.join(root, 'workspace', 'skills')
28
+ const skillsSrc = path.join(root, 'workspace-templates', 'skills')
29
+
30
+ function dirHasSkills(dir) {
31
+ try {
32
+ const entries = fs.readdirSync(dir, { withFileTypes: true })
33
+ return entries.some(e => e.isDirectory() && fs.existsSync(path.join(dir, e.name, 'SKILL.md')))
34
+ } catch { return false }
35
+ }
36
+
37
+ function copyDirRecursive(src, dst) {
38
+ fs.mkdirSync(dst, { recursive: true })
39
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
40
+ const s = path.join(src, entry.name)
41
+ const d = path.join(dst, entry.name)
42
+ if (entry.isDirectory()) {
43
+ copyDirRecursive(s, d)
44
+ } else {
45
+ fs.copyFileSync(s, d)
46
+ }
47
+ }
48
+ }
49
+
50
+ // ── Copy SOUL.md on first install (C21 — Ollama identity) ───
51
+ const soulSrc = path.join(root, 'workspace-templates', 'SOUL.md')
52
+ const soulDst = path.join(root, 'workspace', 'SOUL.md')
53
+ if (fs.existsSync(soulSrc) && !fs.existsSync(soulDst)) {
54
+ try {
55
+ fs.copyFileSync(soulSrc, soulDst)
56
+ console.log(' Installed SOUL.md (Aiden identity context).')
57
+ } catch (e) {
58
+ console.log(' Note: Could not copy SOUL.md:', e.message)
59
+ }
60
+ }
61
+
62
+ if (fs.existsSync(skillsSrc)) {
63
+ // Check if user already has skills anywhere in workspace/skills/
64
+ const hasExisting =
65
+ dirHasSkills(skillsDst) ||
66
+ dirHasSkills(path.join(skillsDst, 'learned')) ||
67
+ dirHasSkills(path.join(skillsDst, 'approved'))
68
+
69
+ if (!hasExisting) {
70
+ try {
71
+ const srcEntries = fs.readdirSync(skillsSrc, { withFileTypes: true })
72
+ .filter(e => e.isDirectory())
73
+ let copied = 0
74
+ for (const entry of srcEntries) {
75
+ const from = path.join(skillsSrc, entry.name)
76
+ const to = path.join(skillsDst, entry.name)
77
+ if (!fs.existsSync(to)) {
78
+ copyDirRecursive(from, to)
79
+ copied++
80
+ }
81
+ }
82
+ if (copied > 0) {
83
+ console.log(` Installed ${copied} starter skills. Type /skills to view.`)
84
+ }
85
+ } catch (e) {
86
+ // Non-fatal — skills copy failure shouldn't break install
87
+ console.log(' Note: Could not copy starter skills:', e.message)
88
+ }
89
+ }
90
+ }
@@ -0,0 +1,16 @@
1
+ # Aiden Heartbeat Configuration
2
+
3
+ ## Morning Briefing (8:00 AM daily)
4
+ - Check unfinished tasks from yesterday
5
+ - Get NSE/NIFTY market summary
6
+ - Weather for user's location
7
+ - NASA EONET active natural events
8
+ - Proactive suggestion based on patterns
9
+
10
+ ## Market Watch (every 2 hours, market hours only)
11
+ - Check watchlist stocks for significant moves (>2%)
12
+
13
+ ## System Health (every 6 hours)
14
+ - Disk space warning if < 20% free
15
+ - Memory usage check
16
+ - Ollama model availability