sparkecoder 0.1.113 → 0.1.115

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 +57 -1
  2. package/dist/agent/index.js.map +1 -1
  3. package/dist/cli.js +213 -2
  4. package/dist/cli.js.map +1 -1
  5. package/dist/index.js +57 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/server/index.js +57 -1
  8. package/dist/server/index.js.map +1 -1
  9. package/dist/skills/default/computer-use.md +70 -2
  10. package/dist/skills/default/recording.md +196 -0
  11. package/package.json +1 -1
  12. package/src/skills/default/computer-use.md +70 -2
  13. package/src/skills/default/recording.md +196 -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/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_buildManifest.js +0 -0
  99. /package/web/.next/standalone/web/.next/static/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_clientMiddlewareManifest.json +0 -0
  100. /package/web/.next/standalone/web/.next/static/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_ssgManifest.js +0 -0
  101. /package/web/.next/standalone/web/.next/static/static/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_buildManifest.js +0 -0
  102. /package/web/.next/standalone/web/.next/static/static/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_clientMiddlewareManifest.json +0 -0
  103. /package/web/.next/standalone/web/.next/static/static/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_ssgManifest.js +0 -0
  104. /package/web/.next/static/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_buildManifest.js +0 -0
  105. /package/web/.next/static/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_clientMiddlewareManifest.json +0 -0
  106. /package/web/.next/static/{mC7Yp8aJpCL22mrYVzIEG → pSGgtxBjN5_o0YHZgQzXm}/_ssgManifest.js +0 -0
@@ -7020,6 +7020,8 @@ ${JSON.stringify(outputSchema, null, 2)}
7020
7020
  `;
7021
7021
  }
7022
7022
  function buildOrchestratorPromptAddendum() {
7023
+ const platform2 = process.platform === "darwin" ? "darwin" : "other";
7024
+ const computerUseAvailable = platform2 === "darwin";
7023
7025
  return `
7024
7026
  ## Orchestrator Mode
7025
7027
 
@@ -7092,9 +7094,63 @@ If the user asks "add the GitHub MCP" or "remember that I prefer Python", load t
7092
7094
  ### Typical flow
7093
7095
 
7094
7096
  1. Inbound event arrives (any channel).
7095
- 2. You decompose, \`spawn\` one or more workers with explicit goals.
7097
+ 2. You **decompose** the request into independent sub-tasks, then \`spawn\` one worker per sub-task \u2014 in parallel \u2014 with explicit, scoped goals.
7096
7098
  3. Workers run autonomously. They wake you via SYSTEM events when done / failed / blocked.
7097
7099
  4. On each wake, you decide: notify the user (via the original channel) / spawn follow-up work / wait for more events.
7100
+
7101
+ ### Decomposition rule
7102
+
7103
+ If a single user message contains **multiple independent asks** that don't share state, spawn **one worker per ask, all in the same turn** (parallel \`spawn\` calls). They run concurrently and finish faster. Examples of when to split:
7104
+
7105
+ - *"Take a screenshot of the desktop AND open Calculator"*
7106
+ \u2192 spawn \`screenshot\` worker + spawn \`open-calculator\` worker (independent).
7107
+ - *"Run the tests and also tell me what changed since yesterday"*
7108
+ \u2192 spawn \`run-tests\` worker + spawn \`git-diff-since-yesterday\` worker.
7109
+ - *"Fix the typo in README and bump the version"*
7110
+ \u2192 spawn \`fix-readme-typo\` worker + spawn \`bump-version\` worker.
7111
+
7112
+ When NOT to split (keep as one worker):
7113
+
7114
+ - The asks share state (one's output feeds the other).
7115
+ - The asks are tightly coupled (e.g. *"refactor X and run its tests"* \u2014 the tests depend on the refactor).
7116
+ - The asks are trivially small (one or two tool calls each); spawning overhead exceeds the parallelism win.
7117
+
7118
+ ### Prefer headless tools
7119
+
7120
+ When spawning a worker, push it toward the *cheapest tool that gets the job done*:
7121
+
7122
+ 1. **Bash / file tools** for anything with a CLI (git, npm, brew, builds, tests, file editing, HTTP via curl, scripting).
7123
+ 2. **agent-browser** (\`load_skill browser\`) for *anything* in a web browser \u2014 refs from \`snapshot -i\` are deterministic, ~100\xD7 cheaper in tokens than pixel coordinates, work cross-platform, and don't need any host permissions.${computerUseAvailable ? `
7124
+ 3. **Computer use** is the last resort \u2014 only when the task genuinely requires a native macOS GUI app with no CLI / API equivalent (System Settings, Calculator, Finder operations that don't have CLI flags, complex cross-app drag/drop, demos where the user wants to *see* the screen).
7125
+
7126
+ A common anti-pattern: a worker reaches for computer use because the user phrased the request visually ("open the website and click the button"). Almost always wrong \u2014 that's a job for the browser skill, not the desktop. Coach the worker in its goal text: *"Use the browser skill (\`load_skill browser\` + \`agent-browser\` with refs from \`snapshot -i\`) to open the site and click the button. Don't use computer use for browser work."*
7127
+
7128
+ ### Serialize desktop / computer-use tasks
7129
+
7130
+ There is exactly **one** desktop, mouse, and keyboard on the host. If two or more workers both need the **\`computer\` tool** (clicking, typing, taking desktop screenshots, opening apps, switching windows), they will **fight over the same screen** \u2014 windows will steal focus from each other, screenshots will catch the wrong app, mouse clicks will land on the wrong target.
7131
+
7132
+ **Rule**: when spawning workers, look at each one's goal:
7133
+
7134
+ - Does it require **GUI interaction** (open an app, click, type in a window, screenshot the desktop, navigate the OS, drive a real browser/terminal window)? \u2192 mark it as a **desktop task**.
7135
+ - Does it only need **headless tools** (bash, file edits, web fetches, code analysis, git, builds, tests run non-interactively)? \u2192 it's a **headless task**.
7136
+
7137
+ Then:
7138
+
7139
+ - **Spawn ALL headless tasks in parallel** (in the same turn).
7140
+ - **Run desktop tasks one at a time**, even if there are multiple of them. Either:
7141
+ - Spawn the first one now, wait for its \`worker.completed\`, then spawn the next; OR
7142
+ - Tell the user the desktop tasks will run sequentially and pick the most important one first.
7143
+
7144
+ Example: *"Take a screenshot of Calculator AND run the test suite AND open System Settings"*:
7145
+ - \u2713 \`screenshot-calculator\` (desktop) \u2014 spawn now
7146
+ - \u2713 \`run-tests\` (headless) \u2014 spawn now, in parallel
7147
+ - \u23F3 \`open-system-settings\` (desktop) \u2014 wait until \`screenshot-calculator\` completes, THEN spawn.
7148
+
7149
+ Headless workers never interfere with desktop workers (they don't touch the screen), so they always run in parallel.
7150
+
7151
+ When you spawn a **desktop worker**, include a one-liner in the goal asking it to **record the session by default** (\`screencapture -v -V <seconds> -C\` on macOS) and return the recording path in its result, *unless* the task is long-running / boring / contains sensitive content. The recording lets you (and the user) replay what actually happened on screen. When the worker reports back, mention the recording path in your reply via the original channel.` : ""}
7152
+
7153
+ Default bias: **when in doubt, decompose**. Two workers running in parallel and reporting independently is almost always better UX than one worker doing things sequentially.
7098
7154
  `;
7099
7155
  }
7100
7156
  function createSummaryPrompt(conversationHistory) {