castle-web-cli 0.4.81 → 0.4.83
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/dist/agent-prompts.d.ts +0 -3
- package/dist/agent-prompts.js +3 -8
- package/dist/agent.d.ts +1 -2
- package/dist/agent.js +327 -157
- package/dist/castle-host/host.js +28 -0
- package/dist/ide.js +150 -1
- package/dist/init.js +1 -1
- package/dist/native/loop.js +15 -29
- package/dist/native/openrouter.d.ts +5 -1
- package/dist/native/openrouter.js +20 -1
- package/dist/native/tools.d.ts +0 -1
- package/dist/native/tools.js +3 -79
- package/dist/native/types.d.ts +4 -1
- package/dist/native/types.js +3 -3
- package/dist/shell/assets/index-BMkQt27u.css +1 -0
- package/dist/shell/assets/index-C9Zhmien.js +142 -0
- package/dist/shell/index.html +2 -2
- package/dist/shell/operator.png +0 -0
- package/kits/basic-2d/CLAUDE.md +27 -22
- package/kits/basic-2d/behaviors/Collider.jsx +24 -30
- package/kits/basic-2d/behaviors/Layout.jsx +9 -6
- package/kits/basic-2d/behaviors/Sprite.jsx +137 -7
- package/kits/basic-2d/blueprints/cauldron.scene +3 -5
- package/kits/basic-2d/editors/BlueprintLibrary.jsx +11 -11
- package/kits/basic-2d/editors/SceneEditor.jsx +212 -50
- package/kits/basic-2d/editors/SelectionOverlay.jsx +73 -54
- package/kits/basic-2d/editors/inspectorSheet.js +5 -1
- package/kits/basic-2d/engine/ScenePlayer.jsx +102 -7
- package/kits/basic-2d/engine/autoInspector.jsx +26 -7
- package/kits/basic-2d/engine/blueprint.js +109 -11
- package/kits/basic-2d/engine/collider.js +146 -0
- package/kits/basic-2d/engine/scene.js +53 -30
- package/kits/basic-2d/engine/spriteGeometry.js +32 -0
- package/kits/basic-2d/engine/ui.jsx +89 -30
- package/kits/basic-2d/engine/ui.module.css +157 -53
- package/kits/basic-2d/scenes/main.scene +3 -3
- package/package.json +2 -1
- package/dist/shell/assets/index-D3unT7do.js +0 -141
- package/dist/shell/assets/index-RZrw5gQ2.css +0 -1
- package/kits/basic-2d/pnpm-workspace.yaml +0 -3
package/dist/agent-prompts.d.ts
CHANGED
|
@@ -9,15 +9,12 @@ export interface PromptTask {
|
|
|
9
9
|
status: string;
|
|
10
10
|
progress: number;
|
|
11
11
|
notes: string;
|
|
12
|
-
files?: string[];
|
|
13
12
|
error?: string;
|
|
14
13
|
blockedBy?: string[];
|
|
15
|
-
suspectNoChanges?: boolean;
|
|
16
14
|
}
|
|
17
15
|
export interface PromptSibling {
|
|
18
16
|
title: string;
|
|
19
17
|
status: string;
|
|
20
|
-
files?: string[];
|
|
21
18
|
}
|
|
22
19
|
export declare function buildRouterPrompt(opts: {
|
|
23
20
|
deckLabel: string;
|
package/dist/agent-prompts.js
CHANGED
|
@@ -48,7 +48,6 @@ comma-separated active-task titles or ids, or \`all\`
|
|
|
48
48
|
- Never claim the board is cleared without actually emitting the fence.
|
|
49
49
|
- Tasks are one-and-done -- when the user gives feedback on a finished task, spawn a new fix task (and \`castle-done\` the old row) rather than reopening it.
|
|
50
50
|
- Task agents are capable coding agents working in this same deck directory, but they know nothing about this conversation beyond your prompt.
|
|
51
|
-
- Board rows may include \`files:\` for finished work. Use those touched-file lists to aim follow-up/fix tasks and to keep shared names consistent without rereading the deck.
|
|
52
51
|
|
|
53
52
|
Asking with options (the \`\`\`ask block). When you need the user to settle a few choices at once, emit ONE fenced block tagged \`ask\` containing JSON -- it renders inline in the chat as grouped options they tap and submit together (far better than stacking questions they can only half-answer). Reach for it to pin a direction fast when their ask is vague ("make me a game" -> ask what kind), NOT to interrogate. Options only, no free text.
|
|
54
53
|
|
|
@@ -88,15 +87,11 @@ function renderTasks(tasks) {
|
|
|
88
87
|
return tasks
|
|
89
88
|
.map((t) => {
|
|
90
89
|
const notes = t.notes.trim() ? ` -- notes: ${t.notes.trim()}` : "";
|
|
91
|
-
const files = t.files && t.files.length > 0 ? ` -- files: ${t.files.join(", ")}` : "";
|
|
92
90
|
const error = t.error ? ` -- error: ${t.error}` : "";
|
|
93
91
|
const blockedBy = t.blockedBy && t.blockedBy.length > 0
|
|
94
92
|
? ` -- blocked by: ${t.blockedBy.join(", ")}`
|
|
95
93
|
: "";
|
|
96
|
-
|
|
97
|
-
? " -- caution: done but touched no tracked files (bash side effects aren't tracked); verify the work actually landed"
|
|
98
|
-
: "";
|
|
99
|
-
return `- [${t.status} ${t.progress}%] ${t.title} (${t.id})${notes}${files}${error}${blockedBy}${suspect}`;
|
|
94
|
+
return `- [${t.status} ${t.progress}%] ${t.title} (${t.id})${notes}${error}${blockedBy}`;
|
|
100
95
|
})
|
|
101
96
|
.join("\n");
|
|
102
97
|
}
|
|
@@ -163,10 +158,10 @@ export function buildTaskPrompt(opts) {
|
|
|
163
158
|
? `\n\nThis task waited on earlier tasks:\n${opts.depsSummary}\n`
|
|
164
159
|
: "";
|
|
165
160
|
const siblingRows = (opts.siblings ?? [])
|
|
166
|
-
.map((s) => `- [${s.status}] ${s.title}
|
|
161
|
+
.map((s) => `- [${s.status}] ${s.title}`)
|
|
167
162
|
.join("\n");
|
|
168
163
|
const siblings = siblingRows
|
|
169
|
-
? `\n\nOther tasks on this deck's board (snapshot at your start):\n${siblingRows}\nRunning and waiting rows are sibling agents working in this same directory. If a sibling plainly owns something your prompt only references (art, a scene, a behavior), leave it to them -- create only what YOUR prompt says to create
|
|
164
|
+
? `\n\nOther tasks on this deck's board (snapshot at your start):\n${siblingRows}\nRunning and waiting rows are sibling agents working in this same directory. If a sibling plainly owns something your prompt only references (art, a scene, a behavior), leave it to them -- create only what YOUR prompt says to create.\n`
|
|
170
165
|
: "";
|
|
171
166
|
// Same "say there are no docs" reasoning as buildRouterPrompt's
|
|
172
167
|
// quickReference above -- a task agent wastes turns the same way a router
|
package/dist/agent.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Duplex } from "stream";
|
|
|
3
3
|
export declare const AGENT_WS_PATH = "/__castle/agent";
|
|
4
4
|
export declare const AGENT_ATTACHMENT_PREFIX = "/__castle/agent/attachments/";
|
|
5
5
|
export declare const AGENT_PLAYTEST_PREFIX = "/__castle/agent/playtest/";
|
|
6
|
+
export declare const AGENT_MODEL_CAPS_PREFIX = "/__castle/agent/model-caps";
|
|
6
7
|
export type AgentBackend = "cursor" | "claude" | "smith";
|
|
7
8
|
export type ClaudeModel = "sonnet" | "opus" | "fable" | "openrouter";
|
|
8
9
|
type TaskStatus = "waiting" | "running" | "blocked" | "done" | "failed" | "interrupted";
|
|
@@ -20,7 +21,6 @@ interface TaskRecord {
|
|
|
20
21
|
finishedAt?: string;
|
|
21
22
|
pid?: number;
|
|
22
23
|
originMessageId?: string;
|
|
23
|
-
files?: string[];
|
|
24
24
|
playtestFrames?: string[];
|
|
25
25
|
resultSummary?: string;
|
|
26
26
|
avatar?: string;
|
|
@@ -28,7 +28,6 @@ interface TaskRecord {
|
|
|
28
28
|
acknowledged?: boolean;
|
|
29
29
|
rejected?: boolean;
|
|
30
30
|
blockedBy?: string[];
|
|
31
|
-
suspectNoChanges?: boolean;
|
|
32
31
|
}
|
|
33
32
|
export interface DepsState {
|
|
34
33
|
kind: "ready" | "waiting" | "blocked";
|