@spencer-kit/coder-studio 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/esm/bin.mjs +56 -5
- package/dist/esm/bin.mjs.map +2 -2
- package/dist/esm/server-runner.mjs +56 -5
- package/dist/esm/server-runner.mjs.map +2 -2
- package/dist/web/assets/{index-YsdPRUE-.css → index-BwryTUQ9.css} +1 -1
- package/dist/web/assets/{index-LQGuy5NX.js → index-Z64V-v_U.js} +11 -11
- package/dist/web/assets/index-Z64V-v_U.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-LQGuy5NX.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41](https://github.com/spencerkit/coder-studio/pull/41) [`37f68b2`](https://github.com/spencerkit/coder-studio/commit/37f68b22fa605d1cbe92a6b8bc7e2ad550bfad89) Thanks [@pallyoung](https://github.com/pallyoung)! - Polish desktop and mobile workspace chrome, settings surfaces, terminal fullscreen layout, and supervisor evaluation guidance.
|
|
8
|
+
|
|
3
9
|
## 0.3.8
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/esm/bin.mjs
CHANGED
|
@@ -5256,9 +5256,27 @@ var init_settings = __esm({
|
|
|
5256
5256
|
import { spawn as spawn2 } from "node:child_process";
|
|
5257
5257
|
function buildPrompt(context) {
|
|
5258
5258
|
const lines = [
|
|
5259
|
-
"You are
|
|
5259
|
+
"You are an autonomous supervisor for a target-scoped software task.",
|
|
5260
|
+
"Your job is to keep the agent moving toward the objective until the objective is complete.",
|
|
5261
|
+
"",
|
|
5260
5262
|
"Return JSON only.",
|
|
5261
5263
|
"",
|
|
5264
|
+
"Decision policy:",
|
|
5265
|
+
'- Prefer "continue" whenever there is a reasonable next action.',
|
|
5266
|
+
"- Do not ask the user to decide, clarify, or choose among implementation options.",
|
|
5267
|
+
"- When information is incomplete, choose a conservative next action based on the objective, target memory, latest user input, and terminal snapshot.",
|
|
5268
|
+
"- Stop only when the objective is complete, or when continuing would likely push the agent in an unsafe or clearly unsupported direction.",
|
|
5269
|
+
"",
|
|
5270
|
+
"Stage decision policy:",
|
|
5271
|
+
"- Use the target memory as the current supervision state.",
|
|
5272
|
+
"- Base your decision on the objective, current plan, activeStepId, progressSummary, lastGuidance, stalledCount, latest user input, and terminal snapshot.",
|
|
5273
|
+
"- Identify which plan step is currently active.",
|
|
5274
|
+
"- Decide whether the active step is done, still in progress, blocked, or obsolete.",
|
|
5275
|
+
"- If the active step is done, advance to the next useful step.",
|
|
5276
|
+
"- If the active step is still in progress, give guidance that moves it forward.",
|
|
5277
|
+
"- If the agent appears stuck or repeated the same action, give a different concrete next action.",
|
|
5278
|
+
"- If the plan is obsolete, update only the affected steps unless a full replacement is necessary.",
|
|
5279
|
+
"",
|
|
5262
5280
|
"Allowed statuses:",
|
|
5263
5281
|
'- "continue": more work is needed; include "reason" and "guidance".',
|
|
5264
5282
|
'- "stop": supervision should stop; include "stopReason" and "reason".',
|
|
@@ -5266,10 +5284,43 @@ function buildPrompt(context) {
|
|
|
5266
5284
|
"Allowed stop reasons:",
|
|
5267
5285
|
'- "objective_complete"',
|
|
5268
5286
|
'- "supervisor_uncertain"',
|
|
5269
|
-
'- "needs_user_input"',
|
|
5270
5287
|
"",
|
|
5271
|
-
"
|
|
5272
|
-
"
|
|
5288
|
+
'Use "objective_complete" only when the objective has been satisfied.',
|
|
5289
|
+
'Use "supervisor_uncertain" only as a last resort when no useful next action can be inferred and additional guidance would likely be misleading.',
|
|
5290
|
+
"",
|
|
5291
|
+
'Guidance requirements for "continue":',
|
|
5292
|
+
"- Give one concrete next action or a short ordered set of concrete actions.",
|
|
5293
|
+
"- Focus on the highest-value step toward completing the objective.",
|
|
5294
|
+
"- Be specific enough for the supervised agent to act without asking the user.",
|
|
5295
|
+
"- Avoid generic reminders, encouragement, or restating the objective.",
|
|
5296
|
+
"- If verification is needed, tell the agent exactly what to verify next.",
|
|
5297
|
+
"- If implementation is needed, point to the likely area, behavior, or file/module based on available evidence.",
|
|
5298
|
+
"",
|
|
5299
|
+
"Planning policy:",
|
|
5300
|
+
"- If planGenerated is false, include a plan with 3 to 7 milestone-sized steps.",
|
|
5301
|
+
"- If planGenerated is true, update progress incrementally.",
|
|
5302
|
+
"- Do not rewrite the full plan unless the existing plan is clearly wrong or obsolete.",
|
|
5303
|
+
"- Use stepUpdates to mark completed or active steps when the terminal snapshot shows progress.",
|
|
5304
|
+
"- Keep activeStepId aligned with the next useful step.",
|
|
5305
|
+
"",
|
|
5306
|
+
"Output schema:",
|
|
5307
|
+
"For continue:",
|
|
5308
|
+
"{",
|
|
5309
|
+
' "status": "continue",',
|
|
5310
|
+
' "reason": "brief explanation of why more work is needed",',
|
|
5311
|
+
' "guidance": "specific next action for the supervised agent",',
|
|
5312
|
+
' "plan": optional array of plan steps,',
|
|
5313
|
+
' "activeStepId": optional step id,',
|
|
5314
|
+
' "progressSummary": optional brief progress summary,',
|
|
5315
|
+
' "stepUpdates": optional array of { "id": string, "status": "pending" | "in_progress" | "done" }',
|
|
5316
|
+
"}",
|
|
5317
|
+
"",
|
|
5318
|
+
"For stop:",
|
|
5319
|
+
"{",
|
|
5320
|
+
' "status": "stop",',
|
|
5321
|
+
' "stopReason": "objective_complete" | "supervisor_uncertain",',
|
|
5322
|
+
' "reason": "brief explanation"',
|
|
5323
|
+
"}",
|
|
5273
5324
|
"",
|
|
5274
5325
|
"Current objective:",
|
|
5275
5326
|
context.objective,
|
|
@@ -5548,7 +5599,7 @@ function parseSupervisorEvaluationResult(payloadText, guidanceMaxChars) {
|
|
|
5548
5599
|
}
|
|
5549
5600
|
if (status === "stop") {
|
|
5550
5601
|
const stopReason = record.stopReason;
|
|
5551
|
-
if (stopReason !== "objective_complete" && stopReason !== "supervisor_uncertain"
|
|
5602
|
+
if (stopReason !== "objective_complete" && stopReason !== "supervisor_uncertain") {
|
|
5552
5603
|
throw new Error("Supervisor stop result is missing a valid stopReason");
|
|
5553
5604
|
}
|
|
5554
5605
|
return {
|