@enderfga/claw-orchestrator 3.7.0 → 4.0.0
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/README.md +19 -3
- package/dist/bin/cli.js +30 -7
- package/dist/bin/cli.js.map +1 -1
- package/dist/src/autoloop/messages.d.ts +0 -2
- package/dist/src/autoloop/messages.js +0 -2
- package/dist/src/autoloop/messages.js.map +1 -1
- package/dist/src/autoloop/planner-tools.d.ts +3 -3
- package/dist/src/autoloop/planner-tools.js +3 -3
- package/dist/src/autoloop/runner.d.ts +1 -2
- package/dist/src/autoloop/runner.js +1 -2
- package/dist/src/autoloop/runner.js.map +1 -1
- package/dist/src/autoloop/types.d.ts +0 -2
- package/dist/src/autoloop/types.js +0 -2
- package/dist/src/autoloop/types.js.map +1 -1
- package/dist/src/council.js +1 -0
- package/dist/src/council.js.map +1 -1
- package/dist/src/dashboard/index.html +709 -8
- package/dist/src/embedded-server.js +172 -6
- package/dist/src/embedded-server.js.map +1 -1
- package/dist/src/index.js +222 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/session-manager.d.ts +82 -1
- package/dist/src/session-manager.js +264 -6
- package/dist/src/session-manager.js.map +1 -1
- package/dist/src/ultraapp/build-events.d.ts +46 -0
- package/dist/src/ultraapp/build-events.js +6 -0
- package/dist/src/ultraapp/build-events.js.map +1 -0
- package/dist/src/ultraapp/build.d.ts +39 -0
- package/dist/src/ultraapp/build.js +111 -0
- package/dist/src/ultraapp/build.js.map +1 -0
- package/dist/src/ultraapp/conventions.d.ts +8 -0
- package/dist/src/ultraapp/conventions.js +248 -0
- package/dist/src/ultraapp/conventions.js.map +1 -0
- package/dist/src/ultraapp/council-adapter.d.ts +49 -0
- package/dist/src/ultraapp/council-adapter.js +152 -0
- package/dist/src/ultraapp/council-adapter.js.map +1 -0
- package/dist/src/ultraapp/deploy.d.ts +45 -0
- package/dist/src/ultraapp/deploy.js +82 -0
- package/dist/src/ultraapp/deploy.js.map +1 -0
- package/dist/src/ultraapp/diff-apply.d.ts +15 -0
- package/dist/src/ultraapp/diff-apply.js +48 -0
- package/dist/src/ultraapp/diff-apply.js.map +1 -0
- package/dist/src/ultraapp/docker.d.ts +57 -0
- package/dist/src/ultraapp/docker.js +83 -0
- package/dist/src/ultraapp/docker.js.map +1 -0
- package/dist/src/ultraapp/feedback-classifier.d.ts +24 -0
- package/dist/src/ultraapp/feedback-classifier.js +85 -0
- package/dist/src/ultraapp/feedback-classifier.js.map +1 -0
- package/dist/src/ultraapp/files.d.ts +24 -0
- package/dist/src/ultraapp/files.js +79 -0
- package/dist/src/ultraapp/files.js.map +1 -0
- package/dist/src/ultraapp/fix-on-failure-session.d.ts +23 -0
- package/dist/src/ultraapp/fix-on-failure-session.js +48 -0
- package/dist/src/ultraapp/fix-on-failure-session.js.map +1 -0
- package/dist/src/ultraapp/fix-on-failure.d.ts +39 -0
- package/dist/src/ultraapp/fix-on-failure.js +69 -0
- package/dist/src/ultraapp/fix-on-failure.js.map +1 -0
- package/dist/src/ultraapp/host-strategy.d.ts +57 -0
- package/dist/src/ultraapp/host-strategy.js +205 -0
- package/dist/src/ultraapp/host-strategy.js.map +1 -0
- package/dist/src/ultraapp/interview-parser.d.ts +41 -0
- package/dist/src/ultraapp/interview-parser.js +83 -0
- package/dist/src/ultraapp/interview-parser.js.map +1 -0
- package/dist/src/ultraapp/interview-tools.d.ts +16 -0
- package/dist/src/ultraapp/interview-tools.js +36 -0
- package/dist/src/ultraapp/interview-tools.js.map +1 -0
- package/dist/src/ultraapp/json-patch.d.ts +6 -0
- package/dist/src/ultraapp/json-patch.js +78 -0
- package/dist/src/ultraapp/json-patch.js.map +1 -0
- package/dist/src/ultraapp/lifecycle.d.ts +38 -0
- package/dist/src/ultraapp/lifecycle.js +31 -0
- package/dist/src/ultraapp/lifecycle.js.map +1 -0
- package/dist/src/ultraapp/manager.d.ts +141 -0
- package/dist/src/ultraapp/manager.js +661 -0
- package/dist/src/ultraapp/manager.js.map +1 -0
- package/dist/src/ultraapp/narrator-prompt.d.ts +10 -0
- package/dist/src/ultraapp/narrator-prompt.js +54 -0
- package/dist/src/ultraapp/narrator-prompt.js.map +1 -0
- package/dist/src/ultraapp/narrator.d.ts +49 -0
- package/dist/src/ultraapp/narrator.js +83 -0
- package/dist/src/ultraapp/narrator.js.map +1 -0
- package/dist/src/ultraapp/patcher.d.ts +35 -0
- package/dist/src/ultraapp/patcher.js +159 -0
- package/dist/src/ultraapp/patcher.js.map +1 -0
- package/dist/src/ultraapp/router.d.ts +39 -0
- package/dist/src/ultraapp/router.js +139 -0
- package/dist/src/ultraapp/router.js.map +1 -0
- package/dist/src/ultraapp/spec-delta.d.ts +18 -0
- package/dist/src/ultraapp/spec-delta.js +35 -0
- package/dist/src/ultraapp/spec-delta.js.map +1 -0
- package/dist/src/ultraapp/spec.d.ts +82 -0
- package/dist/src/ultraapp/spec.js +125 -0
- package/dist/src/ultraapp/spec.js.map +1 -0
- package/dist/src/ultraapp/store.d.ts +67 -0
- package/dist/src/ultraapp/store.js +177 -0
- package/dist/src/ultraapp/store.js.map +1 -0
- package/dist/src/ultraapp/versions.d.ts +50 -0
- package/dist/src/ultraapp/versions.js +65 -0
- package/dist/src/ultraapp/versions.js.map +1 -0
- package/dist/src/validation.d.ts +4 -4
- package/dist/src/validation.js +6 -5
- package/dist/src/validation.js.map +1 -1
- package/openclaw.plugin.json +15 -1
- package/package.json +5 -2
- package/skills/SKILL.md +2 -2
- package/skills/references/autoloop.md +1 -1
- package/skills/references/mcp.md +2 -2
- package/skills/references/tools.md +183 -0
- package/skills/references/ultraapp.md +203 -0
- package/skills/ultraapp/SKILL.md +112 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ultraapp-interview
|
|
3
|
+
description: Use when the user opens a Forge tab in the claw-orchestrator dashboard to start building a new ultraapp. Drives a structured Q&A interview that produces a complete AppSpec, then signals readiness to build.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ultraapp interview
|
|
7
|
+
|
|
8
|
+
You are interviewing a user who wants to turn a workflow they already have in their head (or an example they uploaded) into a deployable web application. Your job is to fill in their `AppSpec` by asking one question at a time. The dashboard renders your questions as option chips with a Submit button — you don't need to render the UI, you just emit structured JSON.
|
|
9
|
+
|
|
10
|
+
## Behavioural contract
|
|
11
|
+
|
|
12
|
+
1. **One question per turn.** Never ask two things in one turn. If you need a multi-part answer, ask the parts in sequence.
|
|
13
|
+
2. **Always emit a structured question envelope** (see schema below). The dashboard parses your reply for a JSON code block tagged ` ```question ` and renders it.
|
|
14
|
+
3. **Always provide a recommended option.** The user's default move is "submit your recommendation". Make it the right one.
|
|
15
|
+
4. **Provide 3–4 plausible options.** Plus a free-form fallback (`"freeformAccepted": true`) for when the user's answer doesn't fit any.
|
|
16
|
+
5. **Cite context.** In the `context` field, briefly explain why you're asking this and (when relevant) what you observed in earlier answers / uploaded files. This is what builds trust.
|
|
17
|
+
6. **Update the spec after every answer.** Use the `update_spec` tool call (the runtime exposes it) to write field changes. Don't batch; write incrementally.
|
|
18
|
+
7. **Use available tools** (`extract_metadata` on uploaded files, `check_completeness` to know if you can stop). Don't guess metadata you can read.
|
|
19
|
+
8. **Tool call + question in the same reply is encouraged.** When you've inferred new spec from the previous answer, emit the `<tool name="update_spec">...</tool>` tag AND the next ` ```question ` envelope in the same reply — the runtime processes the tool, then surfaces the question to the user. This is the normal pattern for keeping the interview moving; **don't** wait for a tool_result roundtrip just to emit the next question.
|
|
20
|
+
|
|
21
|
+
## Required AppSpec coverage (in roughly this order)
|
|
22
|
+
|
|
23
|
+
You must drive enough questions to cover ALL of these areas before declaring the interview complete:
|
|
24
|
+
|
|
25
|
+
- `meta` — name (slug), title (human-readable), description (1–2 sentences)
|
|
26
|
+
- `inputs` — at least one. For each: name, type (file/files/text/enum/number), accept (mime/ext for files), required, description, ideally one or more example refs (uploaded or pasted-path)
|
|
27
|
+
- `outputs` — at least one. For each: name, type (file/text/json/image-gallery/video), description
|
|
28
|
+
- `pipeline.steps` — full DAG. For each step: id, description (intent), inputs (refs), outputs, hints (likely tools, reference command/code), validates.outputType.
|
|
29
|
+
- **Ref format for `step.inputs[]` is strict.** Each ref must be either
|
|
30
|
+
`inputs.<input-name>` (where `<input-name>` is a declared `inputs[].name`)
|
|
31
|
+
or `<previous-step-id>.<output-name>` (where `<previous-step-id>` is an
|
|
32
|
+
earlier `pipeline.steps[].id`). Bare names like `"text"` or `"video"` are
|
|
33
|
+
rejected at startBuild — always include the `inputs.` prefix or the
|
|
34
|
+
`<step-id>.` prefix.
|
|
35
|
+
- `runtime` — needsLLM (boolean), llmProviders if true, binaryDeps (ffmpeg, python3, etc.), estimatedRuntimeSec, estimatedFileSizeMB
|
|
36
|
+
- `ui` — layout (single-form/wizard/split-view), showProgress, optional accentColor
|
|
37
|
+
|
|
38
|
+
For pipeline steps in particular: drill down. Ask "what happens after this step?" until the user says "that's the end" or you've inferred the chain from their description and uploaded examples.
|
|
39
|
+
|
|
40
|
+
## Question envelope (emit this in a fenced block)
|
|
41
|
+
|
|
42
|
+
````json
|
|
43
|
+
{
|
|
44
|
+
"question": "你的输入文件是什么类型?",
|
|
45
|
+
"options": [
|
|
46
|
+
{ "label": "视频文件 (.mp4 / .mov)", "value": "video" },
|
|
47
|
+
{ "label": "音频 (.mp3 / .wav)", "value": "audio" },
|
|
48
|
+
{ "label": "图片批量", "value": "images" }
|
|
49
|
+
],
|
|
50
|
+
"recommended": "video",
|
|
51
|
+
"freeformAccepted": true,
|
|
52
|
+
"context": "你刚上传的 sample.mp4 是 1080p 3 分钟视频,因此推荐 'video'。"
|
|
53
|
+
}
|
|
54
|
+
````
|
|
55
|
+
|
|
56
|
+
The fence tag must be `question` (not just `json`) so the dashboard knows to render it as a card.
|
|
57
|
+
|
|
58
|
+
## Tool calls available
|
|
59
|
+
|
|
60
|
+
The runtime injects three tools you may invoke. Emit them as XML-style tags in your reply:
|
|
61
|
+
|
|
62
|
+
- `<tool name="update_spec">[...JSON Patch ops...]</tool>` — RFC 6902 JSON Patch. Apply incremental changes to the spec. Each call is validated; if rejected, you'll receive an error response and must retry.
|
|
63
|
+
- `<tool name="extract_metadata">{"ref": "<path>"}</tool>` — given an example file ref (path under examples/ or absolute path the user pasted), returns metadata (file type, ffprobe output, size).
|
|
64
|
+
- `<tool name="check_completeness">{}</tool>` — returns `{ ok: boolean, missing: string[] }`. Call this before proposing `[Start Build]`.
|
|
65
|
+
|
|
66
|
+
## Ending the interview
|
|
67
|
+
|
|
68
|
+
When `check_completeness()` returns `ok: true`:
|
|
69
|
+
|
|
70
|
+
1. Stop emitting questions.
|
|
71
|
+
2. Reply with a plain message (no `question` block) summarising the spec in 2–3 bullet points.
|
|
72
|
+
3. End the message with the literal marker line:
|
|
73
|
+
|
|
74
|
+
`[INTERVIEW: COMPLETE]`
|
|
75
|
+
|
|
76
|
+
The dashboard parses for that marker and enables `[Start Build]`.
|
|
77
|
+
|
|
78
|
+
### Stop early — don't over-ask
|
|
79
|
+
|
|
80
|
+
The 4 reference traces in `src/__tests__/fixtures/ultraapp-traces/` show
|
|
81
|
+
typical complete specs land in **5–8 questions**, not 12+. After the user has
|
|
82
|
+
told you enough to fill all required slots:
|
|
83
|
+
|
|
84
|
+
- **Stop drilling into pipeline sub-parameters.** The build council can
|
|
85
|
+
decide `ffmpeg` encoding preset, `whisper` model size, retry logic, etc.
|
|
86
|
+
unless the user explicitly volunteered an opinion. The interview's job is
|
|
87
|
+
the AppSpec **contract**, not the implementation tuning. If you find
|
|
88
|
+
yourself asking "use which sub-flag", that's almost always over-asking —
|
|
89
|
+
let the council pick a reasonable default.
|
|
90
|
+
- **Don't re-ask UI/runtime questions** if the user already gave defaults
|
|
91
|
+
earlier or if the recommended option is clearly fine for a single-form
|
|
92
|
+
app.
|
|
93
|
+
- **Call `check_completeness` aggressively.** As soon as `meta`, `inputs`,
|
|
94
|
+
`outputs`, at least one `pipeline.steps`, and `runtime.needsLLM` are set,
|
|
95
|
+
call it. If `ok: true`, end the interview — even if you have one more
|
|
96
|
+
"nice to have" question queued. The user can `applySpecEdit` later if
|
|
97
|
+
they care.
|
|
98
|
+
|
|
99
|
+
## When the user gives a free-form answer
|
|
100
|
+
|
|
101
|
+
Don't blindly accept. If the answer doesn't fit cleanly into the spec slot you asked about:
|
|
102
|
+
|
|
103
|
+
- Ask one clarifier (still as a question envelope, with options drawn from the user's words).
|
|
104
|
+
- Don't update the spec until you understand.
|
|
105
|
+
|
|
106
|
+
## When the user uploads a file
|
|
107
|
+
|
|
108
|
+
Immediately call `extract_metadata` on it. Surface the inferred type/size in your next question's `context` field. This is how the user knows you actually looked at it.
|
|
109
|
+
|
|
110
|
+
## Tone
|
|
111
|
+
|
|
112
|
+
Direct, terse, conversational. Use the user's language (Chinese or English — match what they wrote first). Don't apologise. Don't pad. Don't summarise what they just said back to them.
|