Contract at server dev 8dd3201: a subagent's conversation by its id
CI / check (push) Canceled after 0s
CI / check (push) Canceled after 0s
The server's /api/v2 has the tree routes (8dd3201): GET /chats/{c}/tree
{tree, room, live} and GET /chats/{c}/subagents/{id}/transcript {id,
state, turns}. The activity sheet reads the tree when it opens (an older
server's 404 is ignored), so the list is there without a reply streaming;
a subagent's row opens its conversation from the transcript route, by id,
followed every 3 s while it has not ended -- the provisional member-by-name
route is gone. The conversation dialog is one for both kinds now
(ConversationDialog); a 409 (an agent chat's device away) is said in the
server's words. Findings and stopping are not on Android (the reduced
display, subagents.md §12).
ContractTest reads tree.json and subagent_transcript.json.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
12 files changed
+237
-38
No files matched your search
@@ -17,9 +17,11 @@ import eu.llembas.android.api.Plan
|
||||
import eu.llembas.android.api.StatusFrame
|
||||
import eu.llembas.android.api.SteeredFrame
|
||||
import eu.llembas.android.api.StepsFrame
|
||||
import eu.llembas.android.api.SubagentTranscript
|
||||
import eu.llembas.android.api.Tail
|
||||
import eu.llembas.android.api.ToolCall
|
||||
import eu.llembas.android.api.TreeFrame
|
||||
import eu.llembas.android.api.TreeView
|
||||
import eu.llembas.android.ui.chat.approvalTexts
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.builtins.ListSerializer
|
||||
@@ -195,6 +197,20 @@ class ContractTest {
|
||||
assertEquals(tree, LiveReply("m").apply("tree", text("event_tree")).tree)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun theTreeReadAndASubagentsConversation() {
|
||||
val view = read("tree", TreeView.serializer())
|
||||
assertTrue(view.live)
|
||||
assertNotNull(view.tree)
|
||||
assertEquals(listOf("message", "report"), view.room.map { if (it.report) "report" else "message" })
|
||||
val read = read("subagent_transcript", SubagentTranscript.serializer())
|
||||
assertEquals("s2", read.id)
|
||||
assertEquals("working", read.state)
|
||||
assertTrue(read.turns.first().machine)
|
||||
assertEquals("src/api.py", read.turns[1].tools.single().title)
|
||||
assertTrue(read.turns[1].running)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun everyFrameParses() {
|
||||
assertTrue(read("event_steps", StepsFrame.serializer()).steps.isNotEmpty())
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package eu.llembas.android
|
||||
|
||||
import eu.llembas.android.api.ActivityLogic
|
||||
import eu.llembas.android.api.LembasJson
|
||||
import eu.llembas.android.api.SubagentTree
|
||||
import eu.llembas.android.api.TreeLogic
|
||||
@@ -72,12 +71,4 @@ class TreeTest {
|
||||
assertTrue(TreeLogic.hasSubagents(tree.copy(agents = tree.agents.take(1), ended = emptyList(), openSlots = 2)))
|
||||
assertTrue(TreeLogic.hasSubagents(tree))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun aSubagentOpensAsAMember() {
|
||||
val agent = ActivityLogic.ofTreeAgent(tree.agents[1])
|
||||
assertEquals("member", agent.kind)
|
||||
assertEquals("parser", agent.id)
|
||||
assertTrue(agent.transcript)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user