sparkecoder 0.1.126 → 0.1.127

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 (106) hide show
  1. package/dist/agent/index.js +52 -3
  2. package/dist/agent/index.js.map +1 -1
  3. package/dist/cli.js +118 -17
  4. package/dist/cli.js.map +1 -1
  5. package/dist/index.js +118 -17
  6. package/dist/index.js.map +1 -1
  7. package/dist/server/index.js +118 -17
  8. package/dist/server/index.js.map +1 -1
  9. package/dist/skills/default/slack-messaging.md +268 -0
  10. package/dist/tools/index.js +3 -1
  11. package/dist/tools/index.js.map +1 -1
  12. package/package.json +1 -1
  13. package/src/skills/default/slack-messaging.md +268 -0
  14. package/web/.next/BUILD_ID +1 -1
  15. package/web/.next/standalone/web/.next/BUILD_ID +1 -1
  16. package/web/.next/standalone/web/.next/build-manifest.json +2 -2
  17. package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
  18. package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
  19. package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
  20. package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  21. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  22. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  23. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  24. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  25. package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
  26. package/web/.next/standalone/web/.next/server/app/_not-found.rsc +1 -1
  27. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  28. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  29. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  30. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  31. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  32. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  33. package/web/.next/standalone/web/.next/server/app/agents.html +1 -1
  34. package/web/.next/standalone/web/.next/server/app/agents.rsc +1 -1
  35. package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p/agents/__PAGE__.segment.rsc +1 -1
  36. package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p/agents.segment.rsc +1 -1
  37. package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p.segment.rsc +1 -1
  38. package/web/.next/standalone/web/.next/server/app/agents.segments/_full.segment.rsc +1 -1
  39. package/web/.next/standalone/web/.next/server/app/agents.segments/_head.segment.rsc +1 -1
  40. package/web/.next/standalone/web/.next/server/app/agents.segments/_index.segment.rsc +1 -1
  41. package/web/.next/standalone/web/.next/server/app/agents.segments/_tree.segment.rsc +1 -1
  42. package/web/.next/standalone/web/.next/server/app/docs/installation.html +2 -2
  43. package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +1 -1
  44. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +1 -1
  45. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
  46. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +1 -1
  47. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +1 -1
  48. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +1 -1
  49. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
  50. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +1 -1
  51. package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
  52. package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +1 -1
  53. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +1 -1
  54. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
  55. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +1 -1
  56. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +1 -1
  57. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
  58. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
  59. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +1 -1
  60. package/web/.next/standalone/web/.next/server/app/docs/tools.html +2 -2
  61. package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +1 -1
  62. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +1 -1
  63. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
  64. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +1 -1
  65. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +1 -1
  66. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +1 -1
  67. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
  68. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +1 -1
  69. package/web/.next/standalone/web/.next/server/app/docs.html +2 -2
  70. package/web/.next/standalone/web/.next/server/app/docs.rsc +1 -1
  71. package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +1 -1
  72. package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  73. package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +1 -1
  74. package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
  75. package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  76. package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  77. package/web/.next/standalone/web/.next/server/app/index.html +1 -1
  78. package/web/.next/standalone/web/.next/server/app/index.rsc +1 -1
  79. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +1 -1
  80. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +1 -1
  81. package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  82. package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  83. package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  84. package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  85. package/web/.next/standalone/web/.next/server/app/settings.html +1 -1
  86. package/web/.next/standalone/web/.next/server/app/settings.rsc +1 -1
  87. package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p/settings/__PAGE__.segment.rsc +1 -1
  88. package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p/settings.segment.rsc +1 -1
  89. package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p.segment.rsc +1 -1
  90. package/web/.next/standalone/web/.next/server/app/settings.segments/_full.segment.rsc +1 -1
  91. package/web/.next/standalone/web/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  92. package/web/.next/standalone/web/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  93. package/web/.next/standalone/web/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  94. package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
  95. package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
  96. package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
  97. package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
  98. /package/web/.next/standalone/web/.next/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_buildManifest.js +0 -0
  99. /package/web/.next/standalone/web/.next/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_clientMiddlewareManifest.json +0 -0
  100. /package/web/.next/standalone/web/.next/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_ssgManifest.js +0 -0
  101. /package/web/.next/standalone/web/.next/static/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_buildManifest.js +0 -0
  102. /package/web/.next/standalone/web/.next/static/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_clientMiddlewareManifest.json +0 -0
  103. /package/web/.next/standalone/web/.next/static/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_ssgManifest.js +0 -0
  104. /package/web/.next/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_buildManifest.js +0 -0
  105. /package/web/.next/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_clientMiddlewareManifest.json +0 -0
  106. /package/web/.next/static/{BSOUN7vf8epF685UYalET → l63ZK5juWEj8lzzuVVSpx}/_ssgManifest.js +0 -0
@@ -1150,8 +1150,10 @@ async function loadAgentsMd(agentsMdPath) {
1150
1150
  }
1151
1151
  async function loadSkillContent(skillName, directories) {
1152
1152
  const allSkills = await loadAllSkills(directories);
1153
+ const normalize2 = (s) => s.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim();
1154
+ const wanted = normalize2(skillName);
1153
1155
  const skill = allSkills.find(
1154
- (s) => s.name.toLowerCase() === skillName.toLowerCase()
1156
+ (s) => normalize2(s.name) === wanted || normalize2(basename(s.filePath, extname4(s.filePath))) === wanted
1155
1157
  );
1156
1158
  if (!skill) {
1157
1159
  return null;
@@ -6505,7 +6507,7 @@ Every user-message you see is tagged at the front with a channel pill describing
6505
6507
  Pill formats:
6506
6508
 
6507
6509
  - \`[WEB] ...\` \u2014 typed in the web dashboard. Your assistant text streams back automatically. No tool call needed.
6508
- - \`[SLACK channel=C0123 thread=1700000000.001 user=U0123] ...\` \u2014 a Slack mention or DM. To reply: \`messenger({action:'post', channel:'slack', to:'C0123', threadTs:'1700000000.001', text:'...'})\`. **Always set \`threadTs\`** so the reply lands in the same thread.
6510
+ - \`[SLACK channel=C0123 thread=1700000000.001 user=Ryan Trattner <@U0123> (ryan@example.com)] ...\` \u2014 a Slack mention or DM. To reply: \`messenger({action:'post', channel:'slack', to:'C0123', threadTs:'1700000000.001', text:'...'})\`. **Always set \`threadTs\`** so the reply lands in the same thread. The \`user=\` field is enriched in-place: when the bot has the right scopes you get \`<Name> <@U_ID> (email)\`; if scopes are missing you may see just the raw id \u2014 that's not an error, just less context. Any \`<@U\u2026>\` mentions inside the message text are similarly normalized to \`<Name> <@U_ID>\` so you can immediately tell who's being addressed.
6509
6511
  - \`[SYSTEM worker.completed worker-name] ...\` \u2014 a worker you spawned finished. Look back at the conversation: where did the request originate?
6510
6512
  - If the original request was \`[WEB]\`, a normal text reply is enough (the user is watching).
6511
6513
  - If it was \`[SLACK ...]\`, post the result to that Slack thread via \`messenger\`.
@@ -6525,6 +6527,48 @@ If \`messenger({action:'post', ...})\` returns \`{ok:false, error:'...'}\` (e.g.
6525
6527
  **Never silently swallow a delivery failure.**
6526
6528
  </delivery_failures>
6527
6529
 
6530
+ <reaching_specific_people>
6531
+
6532
+ When a request needs a *specific human's attention* (e.g. "ask Ryan to review this", "let Sarah know the deploy is done", "wait for Charlie's OK before merging") \u2014 don't just reply into thin air, actually surface it to that person. Two mechanisms, in order of preference:
6533
+
6534
+ **1. @-ping them in a Slack channel they're already in (the cheap path)**
6535
+
6536
+ If you know the person's Slack user id and the conversation has a relevant channel/thread, include a literal mention token in the message text. Slack renders \`<@U0123>\` as a clickable @-mention and pushes a notification to that user.
6537
+
6538
+ \`\`\`
6539
+ messenger({
6540
+ action: 'post', channel: 'slack',
6541
+ to: 'C0B5CESSBGD', threadTs: '1700000000.001',
6542
+ text: '<@U05C6RWBDPC> heads up \u2014 the deploy hit a flaky test, can you check?'
6543
+ })
6544
+ \`\`\`
6545
+
6546
+ You already have the user id from inbound \`[SLACK ... user=U0123]\` pills. If multiple people are involved in a thread, you've seen their ids in the recent messages \u2014 use those. **The mention must be wrapped in \`<@...>\` \u2014 bare \`@username\` does NOT notify.**
6547
+
6548
+ **2. DM them directly (when channel context is missing OR you only know their email)**
6549
+
6550
+ For "DM Alice" / "shoot Bob a note" / pinging someone not in the current thread, use the **\`slack-messaging\` skill** \u2014 load it first with \`load_skill slack-messaging\`. It documents the lookup recipe (\`users.lookupByEmail\` \u2192 user id \u2192 \`messenger\` with the user id as \`to\`). Slack auto-opens the DM; no extra step.
6551
+
6552
+ Quick form (when you've already loaded the skill earlier in the turn): look up the user id by email via the Slack API, then \`messenger({action:'post', channel:'slack', to:'<U_ID>', text:'...'})\`. No \`threadTs\` for DMs \u2014 they're standalone.
6553
+
6554
+ **When to use which**
6555
+
6556
+ | Situation | Use |
6557
+ |---|---|
6558
+ | Inbound Slack thread + you know the user is in it | ping with \`<@U\u2026>\` in the existing thread |
6559
+ | Need them but they're not in this channel/thread | DM (skill) |
6560
+ | Have only their email, not their id | DM (skill \u2014 it looks up the id) |
6561
+ | Need a broadcast-style heads-up | ping in their team's channel |
6562
+ | Sensitive / 1:1 conversation | always DM, never ping in a shared channel |
6563
+
6564
+ **Don'ts**
6565
+
6566
+ - Don't @-mention everyone in a channel ("FYI" pings \u2014 leave that to humans).
6567
+ - Don't ping AND DM the same person for the same thing \u2014 pick one.
6568
+ - Don't fabricate user ids or emails. If you don't know how to reach them, ask the requester ("which Sarah?") instead of guessing.
6569
+ - Don't ping in a thread the person hasn't shown up in unless the asker explicitly named them \u2014 surprise pings are annoying.
6570
+ </reaching_specific_people>
6571
+
6528
6572
  <hard_rules>
6529
6573
 
6530
6574
  - Avoid direct workspace work. Do not directly edit product code, run builds, or perform substantive implementation yourself; spawn workers for that.
@@ -7363,7 +7407,12 @@ function load() {
7363
7407
  const now = Date.now();
7364
7408
  for (const [id, e] of Object.entries(parsed.users || {})) {
7365
7409
  if (e && typeof e.expiresAt === "number" && e.expiresAt > now) {
7366
- userMap.set(id, { name: e.name ?? null, expiresAt: e.expiresAt });
7410
+ userMap.set(id, {
7411
+ name: e.name ?? null,
7412
+ realName: e.realName ?? null,
7413
+ email: e.email ?? null,
7414
+ expiresAt: e.expiresAt
7415
+ });
7367
7416
  }
7368
7417
  }
7369
7418
  for (const [key2, e] of Object.entries(parsed.threads || {})) {