@spencer-kit/coder-studio 0.3.8 → 0.3.10
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 +12 -0
- package/dist/esm/bin.mjs +66 -22
- package/dist/esm/bin.mjs.map +2 -2
- package/dist/esm/server-runner.mjs +66 -22
- package/dist/esm/server-runner.mjs.map +2 -2
- package/dist/web/assets/index-DBpngHWV.js +111 -0
- package/dist/web/assets/index-DBpngHWV.js.map +1 -0
- package/dist/web/assets/index-DUGzjla1.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-LQGuy5NX.js +0 -111
- package/dist/web/assets/index-LQGuy5NX.js.map +0 -1
- package/dist/web/assets/index-YsdPRUE-.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43](https://github.com/spencerkit/coder-studio/pull/43) [`ee20f64`](https://github.com/spencerkit/coder-studio/commit/ee20f641888663152f1a5ce5774e5e2b5a52e7b3) Thanks [@pallyoung](https://github.com/pallyoung)! - Fix supervisor dialog polish by removing the duplicated desktop intro panel and ensuring the scheduled-time picker popover renders above modal overlays.
|
|
8
|
+
|
|
9
|
+
## 0.3.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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.
|
|
14
|
+
|
|
3
15
|
## 0.3.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/esm/bin.mjs
CHANGED
|
@@ -1065,7 +1065,7 @@ async function readFile(workspaceId, rootPath, relPath) {
|
|
|
1065
1065
|
const abs = resolveSafe(rootPath, relPath);
|
|
1066
1066
|
const imageType = getImageTypeInfo(relPath);
|
|
1067
1067
|
if (imageType) {
|
|
1068
|
-
const
|
|
1068
|
+
const bytes = await fsReadFile(abs);
|
|
1069
1069
|
const params = new URLSearchParams({
|
|
1070
1070
|
workspaceId,
|
|
1071
1071
|
path: relPath
|
|
@@ -1074,8 +1074,9 @@ async function readFile(workspaceId, rootPath, relPath) {
|
|
|
1074
1074
|
kind: "image",
|
|
1075
1075
|
mime: imageType.mime,
|
|
1076
1076
|
url: `/api/file?${params.toString()}`,
|
|
1077
|
-
size:
|
|
1078
|
-
isTextBacked: imageType.isTextBacked
|
|
1077
|
+
size: bytes.byteLength,
|
|
1078
|
+
isTextBacked: imageType.isTextBacked,
|
|
1079
|
+
version: createHash("sha256").update(bytes).digest("hex")
|
|
1079
1080
|
};
|
|
1080
1081
|
}
|
|
1081
1082
|
const content = await fsReadFile(abs, "utf-8");
|
|
@@ -5256,9 +5257,27 @@ var init_settings = __esm({
|
|
|
5256
5257
|
import { spawn as spawn2 } from "node:child_process";
|
|
5257
5258
|
function buildPrompt(context) {
|
|
5258
5259
|
const lines = [
|
|
5259
|
-
"You are
|
|
5260
|
+
"You are an autonomous supervisor for a target-scoped software task.",
|
|
5261
|
+
"Your job is to keep the agent moving toward the objective until the objective is complete.",
|
|
5262
|
+
"",
|
|
5260
5263
|
"Return JSON only.",
|
|
5261
5264
|
"",
|
|
5265
|
+
"Decision policy:",
|
|
5266
|
+
'- Prefer "continue" whenever there is a reasonable next action.',
|
|
5267
|
+
"- Do not ask the user to decide, clarify, or choose among implementation options.",
|
|
5268
|
+
"- When information is incomplete, choose a conservative next action based on the objective, target memory, latest user input, and terminal snapshot.",
|
|
5269
|
+
"- Stop only when the objective is complete, or when continuing would likely push the agent in an unsafe or clearly unsupported direction.",
|
|
5270
|
+
"",
|
|
5271
|
+
"Stage decision policy:",
|
|
5272
|
+
"- Use the target memory as the current supervision state.",
|
|
5273
|
+
"- Base your decision on the objective, current plan, activeStepId, progressSummary, lastGuidance, stalledCount, latest user input, and terminal snapshot.",
|
|
5274
|
+
"- Identify which plan step is currently active.",
|
|
5275
|
+
"- Decide whether the active step is done, still in progress, blocked, or obsolete.",
|
|
5276
|
+
"- If the active step is done, advance to the next useful step.",
|
|
5277
|
+
"- If the active step is still in progress, give guidance that moves it forward.",
|
|
5278
|
+
"- If the agent appears stuck or repeated the same action, give a different concrete next action.",
|
|
5279
|
+
"- If the plan is obsolete, update only the affected steps unless a full replacement is necessary.",
|
|
5280
|
+
"",
|
|
5262
5281
|
"Allowed statuses:",
|
|
5263
5282
|
'- "continue": more work is needed; include "reason" and "guidance".',
|
|
5264
5283
|
'- "stop": supervision should stop; include "stopReason" and "reason".',
|
|
@@ -5266,10 +5285,43 @@ function buildPrompt(context) {
|
|
|
5266
5285
|
"Allowed stop reasons:",
|
|
5267
5286
|
'- "objective_complete"',
|
|
5268
5287
|
'- "supervisor_uncertain"',
|
|
5269
|
-
'- "needs_user_input"',
|
|
5270
5288
|
"",
|
|
5271
|
-
"
|
|
5272
|
-
"
|
|
5289
|
+
'Use "objective_complete" only when the objective has been satisfied.',
|
|
5290
|
+
'Use "supervisor_uncertain" only as a last resort when no useful next action can be inferred and additional guidance would likely be misleading.',
|
|
5291
|
+
"",
|
|
5292
|
+
'Guidance requirements for "continue":',
|
|
5293
|
+
"- Give one concrete next action or a short ordered set of concrete actions.",
|
|
5294
|
+
"- Focus on the highest-value step toward completing the objective.",
|
|
5295
|
+
"- Be specific enough for the supervised agent to act without asking the user.",
|
|
5296
|
+
"- Avoid generic reminders, encouragement, or restating the objective.",
|
|
5297
|
+
"- If verification is needed, tell the agent exactly what to verify next.",
|
|
5298
|
+
"- If implementation is needed, point to the likely area, behavior, or file/module based on available evidence.",
|
|
5299
|
+
"",
|
|
5300
|
+
"Planning policy:",
|
|
5301
|
+
"- If planGenerated is false, include a plan with 3 to 7 milestone-sized steps.",
|
|
5302
|
+
"- If planGenerated is true, update progress incrementally.",
|
|
5303
|
+
"- Do not rewrite the full plan unless the existing plan is clearly wrong or obsolete.",
|
|
5304
|
+
"- Use stepUpdates to mark completed or active steps when the terminal snapshot shows progress.",
|
|
5305
|
+
"- Keep activeStepId aligned with the next useful step.",
|
|
5306
|
+
"",
|
|
5307
|
+
"Output schema:",
|
|
5308
|
+
"For continue:",
|
|
5309
|
+
"{",
|
|
5310
|
+
' "status": "continue",',
|
|
5311
|
+
' "reason": "brief explanation of why more work is needed",',
|
|
5312
|
+
' "guidance": "specific next action for the supervised agent",',
|
|
5313
|
+
' "plan": optional array of plan steps,',
|
|
5314
|
+
' "activeStepId": optional step id,',
|
|
5315
|
+
' "progressSummary": optional brief progress summary,',
|
|
5316
|
+
' "stepUpdates": optional array of { "id": string, "status": "pending" | "in_progress" | "done" }',
|
|
5317
|
+
"}",
|
|
5318
|
+
"",
|
|
5319
|
+
"For stop:",
|
|
5320
|
+
"{",
|
|
5321
|
+
' "status": "stop",',
|
|
5322
|
+
' "stopReason": "objective_complete" | "supervisor_uncertain",',
|
|
5323
|
+
' "reason": "brief explanation"',
|
|
5324
|
+
"}",
|
|
5273
5325
|
"",
|
|
5274
5326
|
"Current objective:",
|
|
5275
5327
|
context.objective,
|
|
@@ -5548,7 +5600,7 @@ function parseSupervisorEvaluationResult(payloadText, guidanceMaxChars) {
|
|
|
5548
5600
|
}
|
|
5549
5601
|
if (status === "stop") {
|
|
5550
5602
|
const stopReason = record.stopReason;
|
|
5551
|
-
if (stopReason !== "objective_complete" && stopReason !== "supervisor_uncertain"
|
|
5603
|
+
if (stopReason !== "objective_complete" && stopReason !== "supervisor_uncertain") {
|
|
5552
5604
|
throw new Error("Supervisor stop result is missing a valid stopReason");
|
|
5553
5605
|
}
|
|
5554
5606
|
return {
|
|
@@ -8139,20 +8191,8 @@ function createTreeVisibilityFilter() {
|
|
|
8139
8191
|
return (name) => !isTreeHidden(name);
|
|
8140
8192
|
}
|
|
8141
8193
|
function createWatcherIgnoreFilter(rootPath) {
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
return (path10) => DEFAULT_WATCHER_IGNORED_PATTERNS.some((p) => p.test(normalizePath(path10)));
|
|
8145
|
-
}
|
|
8146
|
-
const gitignoreContent = readFileSync5(gitignorePath, "utf-8");
|
|
8147
|
-
const ig = ignore().add(gitignoreContent);
|
|
8148
|
-
return (path10) => {
|
|
8149
|
-
const normalizedPath = normalizePath(path10);
|
|
8150
|
-
if (DEFAULT_WATCHER_IGNORED_PATTERNS.some((p) => p.test(normalizedPath))) {
|
|
8151
|
-
return true;
|
|
8152
|
-
}
|
|
8153
|
-
const relativePath = relativeToRoot(rootPath, path10);
|
|
8154
|
-
return isIgnoredByGitignore(ig, relativePath);
|
|
8155
|
-
};
|
|
8194
|
+
void rootPath;
|
|
8195
|
+
return (path10) => DEFAULT_WATCHER_IGNORED_PATTERNS.some((p) => p.test(normalizePath(path10)));
|
|
8156
8196
|
}
|
|
8157
8197
|
var DEFAULT_WATCHER_IGNORED_PATTERNS;
|
|
8158
8198
|
var init_gitignore = __esm({
|
|
@@ -9972,6 +10012,7 @@ var init_workspace = __esm({
|
|
|
9972
10012
|
bottomPanelHeight: z6.number(),
|
|
9973
10013
|
focusMode: z6.boolean(),
|
|
9974
10014
|
activeSessionId: z6.string().optional(),
|
|
10015
|
+
fileTreeExpandedDirs: z6.array(z6.string()).optional(),
|
|
9975
10016
|
paneLayout: z6.object({
|
|
9976
10017
|
id: z6.string(),
|
|
9977
10018
|
type: z6.enum(["leaf", "split"]),
|
|
@@ -11987,6 +12028,9 @@ var init_settings2 = __esm({
|
|
|
11987
12028
|
themeId: z13.string().optional(),
|
|
11988
12029
|
terminalRenderer: z13.enum(["standard", "compatibility"]).optional(),
|
|
11989
12030
|
terminalCopyOnSelect: z13.boolean().optional(),
|
|
12031
|
+
terminalFontSize: z13.number().int().min(10).max(18).optional(),
|
|
12032
|
+
desktopTerminalFontSize: z13.number().int().min(10).max(18).optional(),
|
|
12033
|
+
mobileTerminalFontSize: z13.number().int().min(10).max(18).optional(),
|
|
11990
12034
|
locale: z13.enum(["zh", "en"]).optional()
|
|
11991
12035
|
}).optional(),
|
|
11992
12036
|
providers: ProviderSettingsSchema.optional()
|