@shumkov/orchestra 0.10.1 → 0.10.2
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.
|
@@ -369,13 +369,23 @@ mcp.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
369
369
|
},
|
|
370
370
|
}, {
|
|
371
371
|
// 0.13: edit a message already sent via `reply`, in place — the progressive-
|
|
372
|
-
// status primitive. Update one bubble instead of sending several.
|
|
372
|
+
// status primitive. Update one bubble instead of sending several. The edit is
|
|
373
|
+
// re-rendered the same way the reply was, so a checklist stays a checklist.
|
|
373
374
|
name: 'edit_message',
|
|
374
|
-
description: 'Edit a message you previously sent via `reply`, in place.
|
|
375
|
-
'
|
|
376
|
-
'
|
|
377
|
-
'
|
|
378
|
-
'
|
|
375
|
+
description: 'Edit a message you previously sent via `reply`, in place. In a chat that ' +
|
|
376
|
+
'renders rich, an edited checklist/table/heading is re-rendered rich rather ' +
|
|
377
|
+
'than flattened. Canonical use: send a plan as `- [ ] step` items, then edit ' +
|
|
378
|
+
'that same message_id with the WHOLE list again and `- [x]` on completed ' +
|
|
379
|
+
'steps — check items off as you go and the user watches one bubble update. ' +
|
|
380
|
+
'Also fine for a short one-line status. An edit REPLACES the body, so always ' +
|
|
381
|
+
're-send the full text. An edit is TEXT-ONLY: image markdown degrades to its ' +
|
|
382
|
+
'caption and cannot add media to a bubble (send media with `reply(files:)`). ' +
|
|
383
|
+
'Keep status in PLAIN LANGUAGE — never tool names like Bash/Edit. One bubble, ' +
|
|
384
|
+
'never chunked: ~4,000 chars for plain text, much more (~32,000) when it ' +
|
|
385
|
+
'renders rich; over the limit the tool tells you which one applied — send ' +
|
|
386
|
+
'long content as a fresh `reply` instead. An edit does NOT notify the user ' +
|
|
387
|
+
'and carries no consumed_turn_ids: it is a mid-turn update, never the final ' +
|
|
388
|
+
'answer.',
|
|
379
389
|
inputSchema: {
|
|
380
390
|
type: 'object',
|
|
381
391
|
properties: {
|
|
@@ -951,10 +951,33 @@ class CliProcess extends Process {
|
|
|
951
951
|
'calls without replying, or the request plainly needs research / several steps —',
|
|
952
952
|
'send a SHORT one-line status via `reply` WITH `interim: true` (it returns a',
|
|
953
953
|
`\`message_id\`), then use \`mcp__${b}__edit_message\` on that SAME`,
|
|
954
|
-
'`message_id` to update the bubble as you progress.
|
|
955
|
-
'INTERIM status ONLY.',
|
|
954
|
+
'`message_id` to update the bubble as you progress.',
|
|
956
955
|
'',
|
|
957
|
-
'
|
|
956
|
+
'An edit re-renders the bubble exactly as the original `reply` did — a chat',
|
|
957
|
+
'that renders rich re-renders an edited checklist, table or heading rich, not',
|
|
958
|
+
'flat. So on multi-step work the strongest progress bubble is a CHECKLIST:',
|
|
959
|
+
'send the plan as `- [ ] step` items, then `edit_message` that same message_id',
|
|
960
|
+
'with the list again and `- [x]` on what you have finished. Check items off as',
|
|
961
|
+
'you complete them — the user watches ONE bubble fill in instead of collecting',
|
|
962
|
+
'a trail of status messages. Always re-send the WHOLE list (an edit REPLACES',
|
|
963
|
+
'the body, so a partial re-send loses everything you left out).',
|
|
964
|
+
'',
|
|
965
|
+
'Short one-line status text is still fine for an interim bubble — a checklist',
|
|
966
|
+
'is the better shape when the work has steps worth showing, not a requirement.',
|
|
967
|
+
'',
|
|
968
|
+
'An edit is TEXT-ONLY. Checklists, tables and headings re-render; image',
|
|
969
|
+
'markdown degrades to its caption, and an edit can never ADD media to a',
|
|
970
|
+
`bubble — send files with \`reply(files:)\`. An edit that is nothing but`,
|
|
971
|
+
'media has nothing left to say and will come back as an error.',
|
|
972
|
+
'',
|
|
973
|
+
'Length: an edit is ONE bubble, never chunked. Plain text is capped around',
|
|
974
|
+
'4,000 characters; a rich-rendered structure in a rich-enabled chat gets a',
|
|
975
|
+
'much larger one (~32,000). You cannot see which applies — if you go over, the',
|
|
976
|
+
'tool tells you the limit that applied, so shorten the edit or send the long',
|
|
977
|
+
'content as a fresh `reply`.',
|
|
978
|
+
'',
|
|
979
|
+
'HARD RULE — a status bubble or progress checklist is a MID-TURN update, NOT',
|
|
980
|
+
'the end of work, and `edit_message` NEVER delivers the final answer. After an',
|
|
958
981
|
'interim reply you MUST keep working in the SAME turn and deliver the real',
|
|
959
982
|
'result. NEVER end your turn on a status / "give me a couple min" / "looking',
|
|
960
983
|
'into it" reply with no result behind it — that leaves the user staring at a',
|
|
@@ -975,20 +998,30 @@ class CliProcess extends Process {
|
|
|
975
998
|
// that puts `stream` in the bridge's tool list), so the contract below can
|
|
976
999
|
// never coach the agent toward a tool that isn't there.
|
|
977
1000
|
...(this.streamToolEnabled ? [
|
|
978
|
-
'### Showing your answer as you write it',
|
|
1001
|
+
'### Showing your answer as you write it — HARD CONTRACT',
|
|
1002
|
+
'',
|
|
1003
|
+
'The user is watching a LIVE bubble the whole time you compose, and',
|
|
1004
|
+
`\`mcp__${b}__stream\` is the ONLY thing that fills it in. Writing a long`,
|
|
1005
|
+
'answer in silence and dropping it at the end is a CONTRACT VIOLATION, not a',
|
|
1006
|
+
'style choice: the user sat watching an empty bubble for the entire time you',
|
|
1007
|
+
'were writing.',
|
|
1008
|
+
'',
|
|
1009
|
+
'So if your answer will run longer than about two paragraphs, this is the',
|
|
1010
|
+
'cadence: after EVERY section you finish — or after every paragraph, when',
|
|
1011
|
+
'the answer has no sections — and BEFORE you start writing the next one,',
|
|
1012
|
+
`you MUST call \`mcp__${b}__stream\` with the FULL answer-so-far.`,
|
|
1013
|
+
'Not once at the end, not "at a natural checkpoint" — after each one,',
|
|
1014
|
+
'every time. Four sections means four stream calls, and then the reply.',
|
|
979
1015
|
'',
|
|
980
|
-
|
|
981
|
-
'
|
|
982
|
-
'finished thought). Each call replaces the preview, so always send the whole',
|
|
983
|
-
'answer up to that point — never just the new part. The user watches it fill in',
|
|
984
|
-
'instead of staring at silence.',
|
|
1016
|
+
'Each call REPLACES the preview, so always send the whole answer up to that',
|
|
1017
|
+
'point — never just the part you added.',
|
|
985
1018
|
'',
|
|
986
1019
|
'HARD RULE — `stream` is a PREVIEW, not a delivery. It never ends a turn and',
|
|
987
1020
|
`it is not the answer. ALWAYS finish with a normal \`mcp__${b}__reply\``,
|
|
988
1021
|
'carrying the complete answer; NEVER end a turn on a stream call.',
|
|
989
1022
|
'',
|
|
990
|
-
'
|
|
991
|
-
'
|
|
1023
|
+
'A couple of sentences is short — just reply, no stream. And never retry a',
|
|
1024
|
+
'stream call: it cannot fail in a way that matters.',
|
|
992
1025
|
'',
|
|
993
1026
|
] : []),
|
|
994
1027
|
// TEMPORARY mitigation (2026-06-08 Shumabit@UMI wedge): AskUserQuestion opens
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shumkov/orchestra",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Transport-agnostic session engine for Claude Code and the native Codex app-server: spawn, steer, supervise, observe turns, and recover.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "index.js",
|