Contract at server dev 9ab0818: spec 3.7.0 from the server -- end, ms, always, the builds
CI / check (push) Canceled after 0s
CI / check (push) Canceled after 0s
- Pinned: 75 files, with the spec's display.json (DisplayTest runs its
duration and end cases) and progress.json's budget stop.
- Not additive: a call's chips no longer carry "exit 0", and an edit's are
one "+N -M" (the app draws chips only, so nothing is said twice);
block.title follows the spec's key order.
- A message's `end {phase, reason, text}` is what a stopped or failed reply
is drawn from, so a reloaded one says "Stopped: by you" too; the app
writes the line in its own language from the phase and the reason.
- A call's time is block.duration (the server's), else made from `ms`;
its state is block.state; a call without a title shows block.label.
- "Always allow" only when every item of the approval has `always`.
- The notifications build's updater takes its file from latest.json, else
from GET /apps' `notifications {url, sha256}` of the same version.
- ApiClient.mentions and attachFrom with their models and fixtures; the
composer does not use them yet.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
38 files changed
+1343
-48
No files matched your search
@@ -51,6 +51,11 @@ is in alpha and releases come off `main`.
|
||||
- The approval card offers the spec's four actions: *Allow once*, *Always allow*, *Deny*, and
|
||||
*Deny, and say why*. The plan card approves together with the mode to continue in --
|
||||
*Approve, continue in Edit* or *Approve, continue in Manual* -- and *Revise*.
|
||||
- With LLeMbas 2.0.0-beta.11: a reply that was stopped or failed says so with its reason after a
|
||||
reload too (the instance stores how it ended); *Always allow* is offered only where the request
|
||||
offers it; a tool call's time is the instance's own; a call without a title is named as the
|
||||
instance names its tool. The notifications build can take its own file from the instance's
|
||||
recommendation of the same release when the website's manifest names none.
|
||||
- **A reply ends when it is saved, and the chat's name follows** (with a server that sends `done`
|
||||
first: LLeMbas 2.0.0-beta.11). The app treats `done` as the end -- the transcript, a spoken
|
||||
answer and a queued prompt no longer wait for a model to name a new chat -- and takes the name
|
||||
|
||||
@@ -174,6 +174,27 @@ class ApiClient(val base: String, private val token: String, val http: OkHttpCli
|
||||
/** The app releases this server recommends; 404 from a server older than the route. */
|
||||
suspend fun apps(): AppsInfo = get("/apps")
|
||||
|
||||
/** What `@` offers from the server for [q]: the chat's earlier attachments, files of the tree, a web address. */
|
||||
suspend fun mentions(q: String, chatId: String? = null): Mentions = get("/mentions?q=${segment(q)}" + (chatId?.let { "&chat=${segment(it)}" } ?: ""))
|
||||
|
||||
/**
|
||||
* Attach without uploading: a copy of an earlier attachment, a file of the tree as it is now,
|
||||
* or a web page's text -- whichever [mention] is. 404 for what cannot be reached, 400 for a
|
||||
* page that cannot be fetched.
|
||||
*/
|
||||
suspend fun attachFrom(mention: Mention, chatId: String? = null): Attachment = send<AttachmentEnvelope>(
|
||||
"POST",
|
||||
"/attachments/from",
|
||||
buildJsonObject {
|
||||
when (mention.kind) {
|
||||
"attachment" -> put("attachment", mention.id)
|
||||
"url" -> put("url", mention.url)
|
||||
else -> put("path", mention.path)
|
||||
}
|
||||
chatId?.let { put("chat", it) }
|
||||
},
|
||||
).attachment
|
||||
|
||||
/** The web's search in JSON: chats by their words (and meaning, where indexed), files, memories. */
|
||||
suspend fun search(q: String, within: String = "all", limit: Int = 20): SearchResults = get("/search?q=${segment(q)}&in=${segment(within)}&limit=$limit")
|
||||
|
||||
|
||||
@@ -32,12 +32,31 @@ const val TITLE_MAX = 80
|
||||
* what `/api/v2` says of it.
|
||||
*/
|
||||
fun ToolCall.state(): String = when {
|
||||
// The server's own word, from spec 3.7.0; an older one leaves it to what the call carries.
|
||||
block.state in CALL_STATES -> block.state
|
||||
|
||||
status == "denied" -> "denied"
|
||||
|
||||
status == "error" || !error.isNullOrEmpty() -> "failed"
|
||||
|
||||
status == "running" || status == "pending" -> "running"
|
||||
|
||||
else -> "done"
|
||||
}
|
||||
|
||||
private val CALL_STATES = setOf("running", "done", "failed", "denied")
|
||||
|
||||
/**
|
||||
* What is written after a call's title for its time: the server's own [ToolBlock.duration] where
|
||||
* it sends one (it measured the call), else made from the call's `ms`; nothing for a call that is
|
||||
* running or was denied.
|
||||
*/
|
||||
fun ToolCall.took(): String? {
|
||||
val state = state()
|
||||
if (state == "running" || state == "denied") return null
|
||||
return block.duration.ifBlank { null } ?: callDuration(state, ms)
|
||||
}
|
||||
|
||||
/**
|
||||
* How long a finished call took (`display.md` §2): tenths under a minute (`0.4s`), then
|
||||
* `1m 05s`, then `2h 03m`. None for a call that is running or was denied, or whose time was not
|
||||
@@ -59,16 +78,24 @@ fun callDuration(state: String, ms: Long?): String? {
|
||||
|
||||
/**
|
||||
* How a reply ended, when it did not finish (`display.md` §4): the `stopped` or `failed` progress
|
||||
* whose line stays on it. From the end the stream said (kept on the message as its `progress`,
|
||||
* with the reason: by you, step limit, budget), else from what the stored row knows -- that it
|
||||
* was stopped, or its error, of which the first line is the reason. Null for a reply that
|
||||
* whose line stays on it. From the row's own `end` (spec 3.7.0: the phase and the reason, stored
|
||||
* with the reply); from an older server, the end the stream said (kept on the message as its
|
||||
* `progress`), else what the row knows -- that it was stopped, or its error, of which the first
|
||||
* line is the reason. Null for a reply that
|
||||
* finished, a user's message, or one still queued.
|
||||
*/
|
||||
fun Message.end(): Progress? = when {
|
||||
fun Message.ending(): Progress? = when {
|
||||
role != "assistant" -> null
|
||||
|
||||
// What the server stored with the reply (spec 3.7.0): it stays true after a reload.
|
||||
end?.phase in END_PHASES -> Progress(phase = end?.phase.orEmpty(), reason = end?.reason?.ifBlank { null })
|
||||
|
||||
progress?.phase in END_PHASES -> progress
|
||||
|
||||
!error.isNullOrBlank() -> Progress(phase = "failed", reason = error.lineSequence().firstOrNull { it.isNotBlank() }?.trim())
|
||||
|
||||
stopped -> Progress(phase = "stopped")
|
||||
|
||||
else -> null
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +222,26 @@ data class SearchResults(
|
||||
|
||||
/** One app release the server recommends (`GET /api/v2/apps`), with the page its files are on. */
|
||||
@Serializable
|
||||
data class AppRelease(val version: String = "", val tag: String = "", val channel: String = "", val page: String = "")
|
||||
data class AppRelease(
|
||||
val version: String = "",
|
||||
val tag: String = "",
|
||||
val channel: String = "",
|
||||
val page: String = "",
|
||||
/** The release's other builds, for an updater that installs its own kind: `{url, sha256}` each, where the server knows them. */
|
||||
val notifications: AppBuild? = null,
|
||||
val fdroid: AppBuild? = null,
|
||||
)
|
||||
|
||||
/** One APK of a release: where it is and its SHA-256. */
|
||||
@Serializable
|
||||
data class AppBuild(val url: String = "", val sha256: String = "")
|
||||
|
||||
/** What `@` offers from the server (`GET /api/v2/mentions`): an earlier `attachment` by [id], a `file` of the tree by [path], or a `url`. */
|
||||
@Serializable
|
||||
data class Mention(val kind: String = "", val id: String = "", val path: String = "", val url: String = "", val name: String = "", val detail: String = "")
|
||||
|
||||
@Serializable
|
||||
data class Mentions(val items: List<Mention> = emptyList())
|
||||
|
||||
@Serializable
|
||||
data class ServerChannel(val version: String = "", val channel: String = "")
|
||||
@@ -355,8 +374,23 @@ data class Metrics(
|
||||
@SerialName("tok_s") val tokPerSecond: Double = 0.0,
|
||||
)
|
||||
|
||||
/**
|
||||
* How a call is drawn (`display.md`): its [kind], the one short [title], the facts after it as
|
||||
* [chips] (an edit's `+N −M`, a non-zero `exit N`, the hits), and from spec 3.7.0 its [state]
|
||||
* (running, done, failed, denied), the [duration] of a finished call as the spec writes it, and
|
||||
* the tool's name as a person reads it ([label]). The last three are empty from an older server.
|
||||
*/
|
||||
@Serializable
|
||||
data class ToolBlock(val kind: String = "tool", val title: String = "", val chips: List<String> = emptyList(), val added: Int = 0, val removed: Int = 0)
|
||||
data class ToolBlock(
|
||||
val kind: String = "tool",
|
||||
val title: String = "",
|
||||
val chips: List<String> = emptyList(),
|
||||
val added: Int = 0,
|
||||
val removed: Int = 0,
|
||||
val state: String = "",
|
||||
val duration: String = "",
|
||||
val label: String = "",
|
||||
)
|
||||
|
||||
/** One tool call. What the tool wrote varies by tool, so the free-form parts stay JSON. */
|
||||
@Serializable
|
||||
@@ -491,6 +525,14 @@ data class Step(
|
||||
val messages: List<SteerNote> = emptyList(),
|
||||
)
|
||||
|
||||
/**
|
||||
* A reply's end when it did not finish: `stopped` with `person`, `steps`, `budget` or no reason,
|
||||
* or `failed` with the error's first line. [text] is the line in the account's language; the app
|
||||
* writes its own from [phase] and [reason], in the app's language.
|
||||
*/
|
||||
@Serializable
|
||||
data class MessageEnd(val phase: String = "", val reason: String = "", val text: String = "")
|
||||
|
||||
@Serializable
|
||||
data class Message(
|
||||
val id: String,
|
||||
@@ -499,6 +541,8 @@ data class Message(
|
||||
val complete: Boolean = true,
|
||||
val stopped: Boolean = false,
|
||||
val error: String? = null,
|
||||
/** How a reply that did not finish ended (spec 3.7.0); null for one that finished, or from an older server. */
|
||||
val end: MessageEnd? = null,
|
||||
val queued: Boolean = false,
|
||||
val machine: Boolean = false,
|
||||
val origin: String = "",
|
||||
@@ -540,6 +584,8 @@ data class CardItem(
|
||||
val options: List<Option> = emptyList(),
|
||||
val multiple: Boolean = false,
|
||||
@SerialName("free_text") val freeText: Boolean = true,
|
||||
/** An approval: whether "Always allow" is offered beside "Allow once" (spec 3.7.0). An older server says nothing, and offered it always. */
|
||||
val always: Boolean = true,
|
||||
val editable: Boolean = false,
|
||||
val plan: JsonObject? = null,
|
||||
@SerialName("mode_choice") val modeChoice: Boolean = false,
|
||||
|
||||
@@ -51,8 +51,7 @@ import eu.llembas.android.api.Message
|
||||
import eu.llembas.android.api.ShowCard
|
||||
import eu.llembas.android.api.Step
|
||||
import eu.llembas.android.api.ToolCall
|
||||
import eu.llembas.android.api.callDuration
|
||||
import eu.llembas.android.api.state
|
||||
import eu.llembas.android.api.took
|
||||
import eu.llembas.android.ui.MarkdownText
|
||||
import eu.llembas.android.ui.theme.LocalPalette
|
||||
|
||||
@@ -99,7 +98,8 @@ fun ToolCallBlock(call: ToolCall, depth: Int = 0, onShow: ((ShowCard) -> Unit)?
|
||||
Icon(iconFor(call.block.kind), contentDescription = null, modifier = Modifier.size(16.dp), tint = palette.inkMuted)
|
||||
Spacer(Modifier.width(6.dp))
|
||||
Text(
|
||||
call.block.title.ifBlank { call.name },
|
||||
// The one short title; a call without one is named as a person reads the tool.
|
||||
call.block.title.ifBlank { call.block.label.ifBlank { call.name } },
|
||||
fontFamily = if (call.block.kind == "shell") FontFamily.Monospace else null,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
maxLines = if (open) 6 else 1,
|
||||
@@ -110,7 +110,7 @@ fun ToolCallBlock(call: ToolCall, depth: Int = 0, onShow: ((ShowCard) -> Unit)?
|
||||
Text(chip, style = MaterialTheme.typography.labelSmall, color = palette.inkFaint, modifier = Modifier.padding(start = 6.dp))
|
||||
}
|
||||
// How long a finished call took (display.md §2); a running or a denied one shows none.
|
||||
callDuration(call.state(), call.ms)?.let { took ->
|
||||
call.took()?.let { took ->
|
||||
Text(took, style = MaterialTheme.typography.labelSmall, color = palette.inkFaint, maxLines = 1, modifier = Modifier.padding(start = 6.dp))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,8 +121,11 @@ private fun Approval(card: Card, onAnswer: (CardAnswer) -> Unit) {
|
||||
} else {
|
||||
FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Button(onClick = { onAnswer(CardAnswer(verdict = "allow", texts = texts)) }) { Text(stringResource(R.string.card_allow_once)) }
|
||||
OutlinedButton(onClick = { onAnswer(CardAnswer(verdict = "allow_always", texts = texts)) }) {
|
||||
Text(stringResource(R.string.card_allow_always))
|
||||
// Only where the request offers it: a call that may only ever be allowed once has none.
|
||||
if (offersAlways(card)) {
|
||||
OutlinedButton(onClick = { onAnswer(CardAnswer(verdict = "allow_always", texts = texts)) }) {
|
||||
Text(stringResource(R.string.card_allow_always))
|
||||
}
|
||||
}
|
||||
// The spec's four actions (display.md §5): Deny at once, or with the person's words to the model.
|
||||
TextButton(onClick = { onAnswer(CardAnswer(verdict = "deny")) }) { Text(stringResource(R.string.card_deny)) }
|
||||
@@ -234,6 +237,9 @@ private fun PlanCard(card: Card, onAnswer: (CardAnswer) -> Unit) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Whether an approval card offers "Always allow": only when every call on it may be remembered (`always`). */
|
||||
internal fun offersAlways(card: Card): Boolean = card.items.isNotEmpty() && card.items.all { it.always }
|
||||
|
||||
/** A plan's approval as the server reads it: allow, and the mode to continue in where one was chosen. */
|
||||
internal fun planApproval(item: CardItem, mode: String?): CardAnswer =
|
||||
CardAnswer(verdict = "allow", choices = if (item.modeChoice && mode != null) mapOf(item.key to listOf(mode)) else emptyMap())
|
||||
|
||||
@@ -85,7 +85,7 @@ import eu.llembas.android.api.Message
|
||||
import eu.llembas.android.api.ShowCard
|
||||
import eu.llembas.android.api.Step
|
||||
import eu.llembas.android.api.ToolCall
|
||||
import eu.llembas.android.api.end
|
||||
import eu.llembas.android.api.ending
|
||||
import eu.llembas.android.lembas
|
||||
import eu.llembas.android.ui.MarkdownText
|
||||
import eu.llembas.android.ui.Segment
|
||||
@@ -228,7 +228,7 @@ fun AssistantMessage(
|
||||
// How a reply that did not finish ended (display.md §4): the progress text alone --
|
||||
// "Stopped: by you", "Failed: …" -- staying at the end of the reply; an error in
|
||||
// the error colour, a stop muted. Nothing else says it a second time.
|
||||
message.end()?.let { end ->
|
||||
message.ending()?.let { end ->
|
||||
Text(
|
||||
progressLineOf(end, withElapsed = false) ?: message.error.orEmpty(),
|
||||
color = if (end.phase == "failed") palette.danger else palette.inkMuted,
|
||||
|
||||
@@ -10,9 +10,11 @@ import android.net.Uri
|
||||
import android.provider.Settings
|
||||
import eu.llembas.android.BuildConfig
|
||||
import eu.llembas.android.R
|
||||
import eu.llembas.android.api.AppRelease
|
||||
import eu.llembas.android.api.LembasJson
|
||||
import eu.llembas.android.api.SharedHttp
|
||||
import eu.llembas.android.api.await
|
||||
import eu.llembas.android.lembas
|
||||
import eu.llembas.android.notify.NotificationAccess
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -38,6 +40,16 @@ data class Latest(val version: String, val url: String, val sha256: String, val
|
||||
* same key: Android takes it), so without its own file it installs nothing.
|
||||
*/
|
||||
fun fileFor(notificationsBuild: Boolean): LatestFile? = if (notificationsBuild) notifications else LatestFile(url, sha256)
|
||||
|
||||
/**
|
||||
* The same, with what the instance says of the release it recommends (`GET /api/v2/apps`,
|
||||
* its entry's `notifications` build) for a manifest that names no notifications file -- but
|
||||
* only when both speak of the same version, and the address is https.
|
||||
*/
|
||||
fun fileFor(notificationsBuild: Boolean, recommended: AppRelease?): LatestFile? = fileFor(notificationsBuild)
|
||||
?: recommended?.takeIf { notificationsBuild && it.version == version }?.notifications
|
||||
?.takeIf { it.url.startsWith("https://") && it.sha256.isNotBlank() }
|
||||
?.let { LatestFile(it.url, it.sha256) }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +75,14 @@ class Updater(private val context: Context) {
|
||||
)
|
||||
return@withContext context.getString(R.string.update_allow_installs)
|
||||
}
|
||||
val file = latest.fileFor(NotificationAccess.AVAILABLE) ?: return@withContext context.getString(R.string.update_notifications_manual)
|
||||
// Its own kind: from the manifest, else from the instance's recommendation of the same release.
|
||||
val recommended = if (NotificationAccess.AVAILABLE && latest.notifications == null) {
|
||||
runCatching { context.lembas.instances.client()?.apps()?.android }.getOrNull()
|
||||
} else {
|
||||
null
|
||||
}
|
||||
val file = latest.fileFor(NotificationAccess.AVAILABLE, recommended)
|
||||
?: return@withContext context.getString(R.string.update_notifications_manual)
|
||||
val apk = File(context.cacheDir, "update.apk")
|
||||
SharedHttp.newCall(Request.Builder().url(file.url).build()).await().use { response ->
|
||||
if (!response.isSuccessful) return@withContext context.getString(R.string.update_unreachable)
|
||||
|
||||
@@ -3,6 +3,8 @@ package eu.llembas.android
|
||||
import eu.llembas.android.api.APP_API
|
||||
import eu.llembas.android.api.AgentSubagents
|
||||
import eu.llembas.android.api.AskFrame
|
||||
import eu.llembas.android.api.AttachmentEnvelope
|
||||
import eu.llembas.android.api.CardItem
|
||||
import eu.llembas.android.api.CardSubagent
|
||||
import eu.llembas.android.api.Chat
|
||||
import eu.llembas.android.api.ChatPage
|
||||
@@ -17,10 +19,12 @@ import eu.llembas.android.api.LiveReply
|
||||
import eu.llembas.android.api.Me
|
||||
import eu.llembas.android.api.MemoryEnvelope
|
||||
import eu.llembas.android.api.MemoryList
|
||||
import eu.llembas.android.api.Mentions
|
||||
import eu.llembas.android.api.Message
|
||||
import eu.llembas.android.api.Metrics
|
||||
import eu.llembas.android.api.ModelList
|
||||
import eu.llembas.android.api.Plan
|
||||
import eu.llembas.android.api.ProgressWords
|
||||
import eu.llembas.android.api.SearchResults
|
||||
import eu.llembas.android.api.StatusFrame
|
||||
import eu.llembas.android.api.SteeredFrame
|
||||
@@ -31,8 +35,14 @@ import eu.llembas.android.api.TitleFrame
|
||||
import eu.llembas.android.api.ToolCall
|
||||
import eu.llembas.android.api.TreeFrame
|
||||
import eu.llembas.android.api.TreeView
|
||||
import eu.llembas.android.api.callDuration
|
||||
import eu.llembas.android.api.ending
|
||||
import eu.llembas.android.api.progressText
|
||||
import eu.llembas.android.api.state
|
||||
import eu.llembas.android.api.took
|
||||
import eu.llembas.android.ui.chat.ChatState
|
||||
import eu.llembas.android.ui.chat.approvalTexts
|
||||
import eu.llembas.android.ui.chat.offersAlways
|
||||
import eu.llembas.android.ui.chat.offersTeam
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.builtins.ListSerializer
|
||||
@@ -43,6 +53,7 @@ import org.junit.Assert.assertNotNull
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* The server's contract, as pinned in `contract/` by `scripts/fetch-contract.py`: every shape
|
||||
@@ -190,7 +201,18 @@ class ContractTest {
|
||||
val call = reply.steps[2].calls.single()
|
||||
assertEquals("shell", call.block.kind)
|
||||
assertEquals("bake --slow", call.block.title)
|
||||
assertEquals(listOf("exit 0"), call.block.chips)
|
||||
// Spec 3.7.0: an exit code is a fact only when it is not 0; the call says its state, how
|
||||
// long it took and what its tool is called.
|
||||
assertTrue(call.block.chips.isEmpty())
|
||||
assertEquals("done", call.block.state)
|
||||
assertEquals("done", call.state())
|
||||
assertEquals(2412L, call.ms)
|
||||
assertEquals("2.4s", call.block.duration)
|
||||
assertEquals("2.4s", call.took())
|
||||
assertEquals("2.4s", callDuration("done", call.ms))
|
||||
assertEquals("Bash", call.block.label)
|
||||
assertNull(reply.end)
|
||||
assertNull(reply.ending())
|
||||
assertEquals("and add honey", reply.steps[3].messages.single().text)
|
||||
assertEquals(40, reply.metrics!!.completionTokens)
|
||||
}
|
||||
@@ -316,6 +338,47 @@ class ContractTest {
|
||||
assertEquals("Waybread", read("event_done", DoneFrame.serializer()).chat.title)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun aStoredReplySaysHowItEnded() {
|
||||
val words = ProgressWords { key, args ->
|
||||
mapOf("stopped_reason" to "Stopped: %s", "stopped_reason_person" to "by you", "failed" to "Failed: %s")[key]?.format(*args)
|
||||
}
|
||||
val stopped = read("message_stopped", Message.serializer())
|
||||
assertEquals("person", stopped.end!!.reason)
|
||||
// The app's own words, from the phase and the reason, say what the server's line says.
|
||||
assertEquals(stopped.end!!.text, progressText(stopped.ending()!!, words, 0, Locale.ROOT))
|
||||
val failed = read("message_failed", Message.serializer())
|
||||
assertEquals("failed", failed.ending()!!.phase)
|
||||
assertEquals(failed.end!!.text, progressText(failed.ending()!!, words, 0, Locale.ROOT))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun alwaysAllowIsOfferedOnlyWhereTheRequestOffersIt() {
|
||||
val cards = read("event_ask", AskFrame.serializer()).cards
|
||||
val approvals = cards.filter { it.kind == "approval" }
|
||||
assertEquals(listOf(true, true), approvals.map { offersAlways(it) })
|
||||
val once = approvals[0].copy(items = approvals[0].items.map { it.copy(always = false) })
|
||||
assertFalse(offersAlways(once))
|
||||
// An older server says nothing of it, and offered it always.
|
||||
assertTrue(LembasJson.decodeFromString(CardItem.serializer(), """{"key":"0","kind":"approval"}""").always)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun whatAtOffersAndWhatAttachingItGives() {
|
||||
val items = read("mentions", Mentions.serializer()).items
|
||||
assertEquals(listOf("file", "attachment"), items.map { it.kind })
|
||||
assertEquals("/home/frodo/bread.md", items[0].path)
|
||||
assertEquals("att1", items[1].id)
|
||||
assertEquals("https://example.org/waybread", read("mentions_url", Mentions.serializer()).items.single().url)
|
||||
assertEquals("bread.md", read("attachment_from", AttachmentEnvelope.serializer()).attachment.name)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun aRunningCallComesWithTheTail() {
|
||||
// The tail's `calls` are not drawn yet (the steps are); the frame must still parse.
|
||||
assertEquals("Done. *Wrap", read("event_tail", Tail.serializer()).text)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun doneIsTheEndAndTheChatsNameMayFollow() {
|
||||
// A new chat's first reply: saved and done at once, under the name made from the prompt.
|
||||
|
||||
@@ -8,7 +8,7 @@ import eu.llembas.android.api.Progress
|
||||
import eu.llembas.android.api.ProgressWords
|
||||
import eu.llembas.android.api.ToolCall
|
||||
import eu.llembas.android.api.callDuration
|
||||
import eu.llembas.android.api.end
|
||||
import eu.llembas.android.api.ending
|
||||
import eu.llembas.android.api.localeNumber
|
||||
import eu.llembas.android.api.progressLine
|
||||
import eu.llembas.android.api.progressText
|
||||
@@ -84,7 +84,7 @@ class DisplayTest {
|
||||
private fun reply(stopped: Boolean = false, error: String? = null, progress: Progress? = null) =
|
||||
Message(id = "m", role = "assistant", stopped = stopped, error = error, progress = progress)
|
||||
|
||||
private fun line(message: Message): String? = message.end()?.let { progressText(it, english, 0, Locale.ROOT) }
|
||||
private fun line(message: Message): String? = message.ending()?.let { progressText(it, english, 0, Locale.ROOT) }
|
||||
|
||||
@Test
|
||||
fun aReplyThatDidNotFinishKeepsItsLine() {
|
||||
@@ -96,9 +96,9 @@ class DisplayTest {
|
||||
// An error: its first line is the reason, and the line is the spec's, not the raw text.
|
||||
assertEquals("Failed: 502 Bad Gateway", line(reply(error = "502 Bad Gateway\n at upstream")))
|
||||
// A reply that finished shows nothing; nor does a user's message, or one that is only queued.
|
||||
assertNull(reply().end())
|
||||
assertNull(Message(id = "u", role = "user", stopped = true).end())
|
||||
assertNull(reply(progress = Progress(phase = "queued", ahead = 1)).end())
|
||||
assertNull(reply().ending())
|
||||
assertNull(Message(id = "u", role = "user", stopped = true).ending())
|
||||
assertNull(reply(progress = Progress(phase = "queued", ahead = 1)).ending())
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -115,7 +115,7 @@ class DisplayTest {
|
||||
assertNull(ended.progress)
|
||||
assertEquals("Stopped: by you", line(ended.finished!!))
|
||||
// A reply that finished after all keeps nothing of an earlier stop.
|
||||
assertNull(live.apply("done", doneWith { }).finished!!.end())
|
||||
assertNull(live.apply("done", doneWith { }).finished!!.ending())
|
||||
// The phase moved on before the end (a retry that then worked): no end is remembered.
|
||||
val moved = live.apply("status", """{"text": "Writing", "progress": {"phase": "writing", "since": 1}}""")
|
||||
assertNull(moved.end)
|
||||
@@ -176,7 +176,7 @@ class DisplayTest {
|
||||
val progress = case.getValue("progress").let { if (it is JsonNull) null else LembasJson.decodeFromJsonElement(Progress.serializer(), it) }
|
||||
val want = expect.getValue("line").let { if (it is JsonNull) null else it.jsonPrimitive.content }
|
||||
val message = Message(id = "m", role = "assistant", progress = progress)
|
||||
assertEquals(about, want, message.end()?.let { progressLine(it, english, case.getValue("now").jsonPrimitive.long, Locale.ROOT) })
|
||||
assertEquals(about, want, message.ending()?.let { progressLine(it, english, case.getValue("now").jsonPrimitive.long, Locale.ROOT) })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class ProgressTest {
|
||||
|
||||
@Test
|
||||
fun everyConformanceCase() {
|
||||
assertEquals(25, cases.size)
|
||||
assertEquals(26, cases.size)
|
||||
for (case in cases) {
|
||||
val progress = LembasJson.decodeFromJsonElement(Progress.serializer(), case.getValue("progress"))
|
||||
val now = case.getValue("now").jsonPrimitive.long
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package eu.llembas.android
|
||||
|
||||
import eu.llembas.android.api.AppBuild
|
||||
import eu.llembas.android.api.AppRelease
|
||||
import eu.llembas.android.api.AppsInfo
|
||||
import eu.llembas.android.api.LembasJson
|
||||
import eu.llembas.android.assist.AssistController
|
||||
import eu.llembas.android.assist.Recorder
|
||||
@@ -35,6 +38,26 @@ class SmallThingsTest {
|
||||
assertEquals(LatestFile("https://example.org/a.apk", "aa"), both.fileFor(notificationsBuild = false))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun theInstanceMayNameTheNotificationsBuildOfTheSameRelease() {
|
||||
val plain = Latest(version = "1.0.0", url = "https://example.org/a.apk", sha256 = "aa")
|
||||
val build = AppBuild("https://example.org/a-notifications.apk", "bb")
|
||||
val same = AppRelease(version = "1.0.0", notifications = build)
|
||||
assertEquals(LatestFile(build.url, build.sha256), plain.fileFor(notificationsBuild = true, recommended = same))
|
||||
// Another version, no address worth trusting, or nothing known: it installs nothing itself.
|
||||
assertNull(plain.fileFor(notificationsBuild = true, recommended = same.copy(version = "1.0.1")))
|
||||
assertNull(plain.fileFor(notificationsBuild = true, recommended = same.copy(notifications = build.copy(url = "http://example.org/a.apk"))))
|
||||
assertNull(plain.fileFor(notificationsBuild = true, recommended = null))
|
||||
// The standard build never takes it.
|
||||
assertEquals(LatestFile("https://example.org/a.apk", "aa"), plain.fileFor(notificationsBuild = false, recommended = same))
|
||||
val apps = LembasJson.decodeFromString(
|
||||
AppsInfo.serializer(),
|
||||
"""{"apps":{"android":{"version":"1.0.0","notifications":{"url":"https://example.org/n.apk","sha256":"cc"},"fdroid":{"url":"https://example.org/f.apk","sha256":"dd"}}}}""",
|
||||
)
|
||||
assertEquals("cc", apps.android!!.notifications!!.sha256)
|
||||
assertEquals("dd", apps.android!!.fdroid!!.sha256)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun aVoiceReadsNoMarkup() {
|
||||
val said = AssistController.plain("**Bake** it.\n\n```sh\nbake\n```\nSee [the recipe](https://example.org).")
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"attachment": {
|
||||
"id": "att2",
|
||||
"name": "bread.md",
|
||||
"mime": "text/markdown",
|
||||
"size": 412,
|
||||
"kind": "text",
|
||||
"image": false,
|
||||
"width": 0,
|
||||
"height": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"name": "review",
|
||||
"description": "Review the working tree's changes",
|
||||
"hint": "[base]",
|
||||
"kind": "skill"
|
||||
},
|
||||
{
|
||||
"name": "compact",
|
||||
"description": "Summarise the session so far",
|
||||
"hint": "",
|
||||
"kind": ""
|
||||
}
|
||||
],
|
||||
"device": "workstation"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"kind": "file",
|
||||
"name": "README.md"
|
||||
},
|
||||
{
|
||||
"path": "src/loader",
|
||||
"kind": "dir",
|
||||
"name": "loader"
|
||||
}
|
||||
],
|
||||
"error": "",
|
||||
"device": "workstation"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"devices": [
|
||||
{
|
||||
"id": "token1",
|
||||
"name": "LLeMbas CLI on workstation",
|
||||
"host": "workstation",
|
||||
"platform": "linux",
|
||||
"terminal": true,
|
||||
"terminal_reason": "",
|
||||
"terminal_hint": "",
|
||||
"scheduled": true,
|
||||
"max_mode": "edit"
|
||||
},
|
||||
{
|
||||
"id": "token2",
|
||||
"name": "LLeMbas CLI on laptop",
|
||||
"host": "laptop",
|
||||
"platform": "darwin",
|
||||
"terminal": false,
|
||||
"terminal_reason": "device",
|
||||
"terminal_hint": "laptop does not open terminals. Switch it on there: in LLeMbas Desktop's settings, or with the LLeMbas CLI's remote.terminal setting.",
|
||||
"scheduled": false,
|
||||
"max_mode": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -31,6 +31,7 @@
|
||||
],
|
||||
"multiple": false,
|
||||
"free_text": true,
|
||||
"always": false,
|
||||
"editable": false,
|
||||
"plan": null,
|
||||
"mode_choice": true,
|
||||
@@ -59,6 +60,7 @@
|
||||
"options": [],
|
||||
"multiple": false,
|
||||
"free_text": false,
|
||||
"always": true,
|
||||
"editable": true,
|
||||
"plan": null,
|
||||
"mode_choice": true,
|
||||
@@ -87,6 +89,7 @@
|
||||
"options": [],
|
||||
"multiple": false,
|
||||
"free_text": true,
|
||||
"always": false,
|
||||
"editable": false,
|
||||
"plan": {
|
||||
"version": 2,
|
||||
@@ -146,6 +149,7 @@
|
||||
"options": [],
|
||||
"multiple": false,
|
||||
"free_text": false,
|
||||
"always": true,
|
||||
"editable": true,
|
||||
"plan": null,
|
||||
"mode_choice": true,
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"options": [],
|
||||
"multiple": false,
|
||||
"free_text": false,
|
||||
"always": false,
|
||||
"editable": false,
|
||||
"plan": null,
|
||||
"mode_choice": false,
|
||||
@@ -61,6 +62,7 @@
|
||||
"options": [],
|
||||
"multiple": false,
|
||||
"free_text": false,
|
||||
"always": false,
|
||||
"editable": false,
|
||||
"plan": null,
|
||||
"mode_choice": false,
|
||||
@@ -106,6 +108,7 @@
|
||||
"options": [],
|
||||
"multiple": false,
|
||||
"free_text": false,
|
||||
"always": false,
|
||||
"editable": false,
|
||||
"plan": null,
|
||||
"mode_choice": false,
|
||||
@@ -146,6 +149,7 @@
|
||||
"options": [],
|
||||
"multiple": false,
|
||||
"free_text": false,
|
||||
"always": false,
|
||||
"editable": false,
|
||||
"plan": null,
|
||||
"mode_choice": false,
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"origin": "",
|
||||
"model": "qwen",
|
||||
"attachments": [],
|
||||
"end": null,
|
||||
"steps": [
|
||||
{
|
||||
"index": 0,
|
||||
@@ -41,14 +42,16 @@
|
||||
"purpose": "Bake one loaf",
|
||||
"text": "baked\n",
|
||||
"exit": 0,
|
||||
"ms": 2412,
|
||||
"block": {
|
||||
"kind": "shell",
|
||||
"title": "bake --slow",
|
||||
"chips": [
|
||||
"exit 0"
|
||||
],
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0
|
||||
"removed": 0,
|
||||
"state": "done",
|
||||
"duration": "2.4s",
|
||||
"label": "Bash"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"origin": "",
|
||||
"model": "qwen",
|
||||
"attachments": [],
|
||||
"end": null,
|
||||
"steps": [
|
||||
{
|
||||
"index": 0,
|
||||
@@ -41,14 +42,16 @@
|
||||
"purpose": "Bake one loaf",
|
||||
"text": "baked\n",
|
||||
"exit": 0,
|
||||
"ms": 2412,
|
||||
"block": {
|
||||
"kind": "shell",
|
||||
"title": "bake --slow",
|
||||
"chips": [
|
||||
"exit 0"
|
||||
],
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0
|
||||
"removed": 0,
|
||||
"state": "done",
|
||||
"duration": "2.4s",
|
||||
"label": "Bash"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -29,14 +29,16 @@
|
||||
"purpose": "Bake one loaf",
|
||||
"text": "baked\n",
|
||||
"exit": 0,
|
||||
"ms": 2412,
|
||||
"block": {
|
||||
"kind": "shell",
|
||||
"title": "bake --slow",
|
||||
"chips": [
|
||||
"exit 0"
|
||||
],
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0
|
||||
"removed": 0,
|
||||
"state": "done",
|
||||
"duration": "2.4s",
|
||||
"label": "Bash"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -56,6 +58,28 @@
|
||||
"tail": {
|
||||
"thinking": "",
|
||||
"text": "Done. *Wrap",
|
||||
"label": "4s"
|
||||
"label": "4s",
|
||||
"calls": [
|
||||
{
|
||||
"id": "call9",
|
||||
"name": "bash",
|
||||
"status": "running",
|
||||
"args": {
|
||||
"command": "bake --test",
|
||||
"description": "Try it"
|
||||
},
|
||||
"results": [],
|
||||
"block": {
|
||||
"kind": "shell",
|
||||
"title": "bake --test",
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0,
|
||||
"state": "running",
|
||||
"duration": "",
|
||||
"label": "Bash"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,27 @@
|
||||
{
|
||||
"thinking": "",
|
||||
"text": "Done. *Wrap",
|
||||
"label": "4s"
|
||||
"label": "4s",
|
||||
"calls": [
|
||||
{
|
||||
"id": "call9",
|
||||
"name": "bash",
|
||||
"status": "running",
|
||||
"args": {
|
||||
"command": "bake --test",
|
||||
"description": "Try it"
|
||||
},
|
||||
"results": [],
|
||||
"block": {
|
||||
"kind": "shell",
|
||||
"title": "bake --test",
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0,
|
||||
"state": "running",
|
||||
"duration": "",
|
||||
"label": "Bash"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,684 @@
|
||||
{
|
||||
"about": "Display (display.md, spec 3.7.0), in the plain number format. `show` says what is asked. `title`: a call's `args` (and its `tool`, for the reader) — expect `title`, the one short title (display.md §1), or null where the call has none. `duration`: a call's `state` and `ms` — expect `duration` as drawn beside the title (§2), or null. `change`: a unified `diff` — expect `added`, `removed` counted by its hunks, and `text` (loop.json display.change). `facts`: a finished call's `block` with its `diff`, `exit` or `hits` — expect `facts`, the texts after the title in order. `end`: a turn's last `progress` (or null) — expect `line`, the line that stays on the finished reply (§4), or null. `drawn`: a `block` — whether it is drawn as a call (§3). LLeMbas: services/display.py; CLI: session/display.ts.",
|
||||
"cases": [
|
||||
{
|
||||
"about": "A command is its own title.",
|
||||
"show": "title",
|
||||
"tool": "bash",
|
||||
"args": {
|
||||
"command": "bun test",
|
||||
"description": "Run the tests"
|
||||
},
|
||||
"expect": {
|
||||
"title": "bun test"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Only the first line of a command.",
|
||||
"show": "title",
|
||||
"tool": "bash",
|
||||
"args": {
|
||||
"command": " cd src &&\n make "
|
||||
},
|
||||
"expect": {
|
||||
"title": "cd src &&"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A search is titled by its pattern, not where it looks.",
|
||||
"show": "title",
|
||||
"tool": "grep",
|
||||
"args": {
|
||||
"pattern": "TODO\\(",
|
||||
"path": "src"
|
||||
},
|
||||
"expect": {
|
||||
"title": "TODO\\("
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A file search likewise.",
|
||||
"show": "title",
|
||||
"tool": "glob",
|
||||
"args": {
|
||||
"pattern": "**/*.ts",
|
||||
"path": "src/tui"
|
||||
},
|
||||
"expect": {
|
||||
"title": "**/*.ts"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A read by its path.",
|
||||
"show": "title",
|
||||
"tool": "read",
|
||||
"args": {
|
||||
"path": "src/app.ts",
|
||||
"offset": 120
|
||||
},
|
||||
"expect": {
|
||||
"title": "src/app.ts"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A listing with no path has no title.",
|
||||
"show": "title",
|
||||
"tool": "list",
|
||||
"args": {
|
||||
"depth": 2
|
||||
},
|
||||
"expect": {
|
||||
"title": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "An edit by its path.",
|
||||
"show": "title",
|
||||
"tool": "edit",
|
||||
"args": {
|
||||
"path": "README.md",
|
||||
"old": "a",
|
||||
"new": "b"
|
||||
},
|
||||
"expect": {
|
||||
"title": "README.md"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A web search by its query.",
|
||||
"show": "title",
|
||||
"tool": "web_search",
|
||||
"args": {
|
||||
"query": "opentui extmarks",
|
||||
"max_results": 5
|
||||
},
|
||||
"expect": {
|
||||
"title": "opentui extmarks"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A fetch by its address.",
|
||||
"show": "title",
|
||||
"tool": "web_fetch",
|
||||
"args": {
|
||||
"url": "https://example.org/docs"
|
||||
},
|
||||
"expect": {
|
||||
"title": "https://example.org/docs"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A task by its description, not its prompt.",
|
||||
"show": "title",
|
||||
"tool": "task",
|
||||
"args": {
|
||||
"description": "Find the callers",
|
||||
"prompt": "Look through src/ for every caller of load() and list them."
|
||||
},
|
||||
"expect": {
|
||||
"title": "Find the callers"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A subagent by its name.",
|
||||
"show": "title",
|
||||
"tool": "team_add",
|
||||
"args": {
|
||||
"name": "Reviewer",
|
||||
"role": "reviews the change",
|
||||
"task": "Read the diff."
|
||||
},
|
||||
"expect": {
|
||||
"title": "Reviewer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A phone action by its summary, whatever else it carries.",
|
||||
"show": "title",
|
||||
"tool": "phone_action",
|
||||
"args": {
|
||||
"action": "open_url",
|
||||
"summary": "Open the timetable",
|
||||
"url": "https://example.org/t"
|
||||
},
|
||||
"expect": {
|
||||
"title": "Open the timetable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Python by the first line of its code.",
|
||||
"show": "title",
|
||||
"tool": "python",
|
||||
"args": {
|
||||
"code": "import math\nprint(math.pi)"
|
||||
},
|
||||
"expect": {
|
||||
"title": "import math"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A question by its headers.",
|
||||
"show": "title",
|
||||
"tool": "ask_user",
|
||||
"args": {
|
||||
"why": "The schema is open.",
|
||||
"questions": [
|
||||
{
|
||||
"header": "Database",
|
||||
"question": "Which one?",
|
||||
"options": []
|
||||
},
|
||||
{
|
||||
"header": "Cache",
|
||||
"question": "Which cache?",
|
||||
"options": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"expect": {
|
||||
"title": "Database · Cache"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A patch by the files it names.",
|
||||
"show": "title",
|
||||
"tool": "apply_patch",
|
||||
"args": {
|
||||
"patch": "*** Begin Patch\n*** Update File: src/a.ts\n@@\n-x\n+y\n*** Add File: docs/b.md\n+hello\n*** Delete File: old.txt\n*** End Patch"
|
||||
},
|
||||
"expect": {
|
||||
"title": "src/a.ts, docs/b.md, old.txt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A unified diff as a patch: the +++ paths, without b/ and without /dev/null.",
|
||||
"show": "title",
|
||||
"tool": "apply_patch",
|
||||
"args": {
|
||||
"patch": "--- a/src/a.ts\n+++ b/src/a.ts\n@@ -1 +1 @@\n-x\n+y\n--- a/gone.txt\n+++ /dev/null\n@@ -1 +0,0 @@\n-bye\n"
|
||||
},
|
||||
"expect": {
|
||||
"title": "src/a.ts"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A patch that names nothing falls back to its path.",
|
||||
"show": "title",
|
||||
"tool": "apply_patch",
|
||||
"args": {
|
||||
"patch": "@@ -1 +1 @@\n-x\n+y\n",
|
||||
"path": "src/a.ts"
|
||||
},
|
||||
"expect": {
|
||||
"title": "src/a.ts"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Cut to 80 characters: 79 and an ellipsis.",
|
||||
"show": "title",
|
||||
"tool": "bash",
|
||||
"args": {
|
||||
"command": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
},
|
||||
"expect": {
|
||||
"title": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx…"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Exactly 80 is not cut.",
|
||||
"show": "title",
|
||||
"tool": "bash",
|
||||
"args": {
|
||||
"command": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
|
||||
},
|
||||
"expect": {
|
||||
"title": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Counted in code points, not UTF-16 units.",
|
||||
"show": "title",
|
||||
"tool": "bash",
|
||||
"args": {
|
||||
"command": "echo 🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂"
|
||||
},
|
||||
"expect": {
|
||||
"title": "echo 🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂🙂…"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A blank argument is passed over.",
|
||||
"show": "title",
|
||||
"tool": "grep",
|
||||
"args": {
|
||||
"pattern": " ",
|
||||
"path": "src"
|
||||
},
|
||||
"expect": {
|
||||
"title": "src"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "An argument that is not a string is passed over.",
|
||||
"show": "title",
|
||||
"tool": "job_output",
|
||||
"args": {
|
||||
"id": "job3",
|
||||
"wait": 30
|
||||
},
|
||||
"expect": {
|
||||
"title": "job3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A setting by its key.",
|
||||
"show": "title",
|
||||
"tool": "settings",
|
||||
"args": {
|
||||
"action": "set",
|
||||
"key": "theme",
|
||||
"value": "moria"
|
||||
},
|
||||
"expect": {
|
||||
"title": "theme"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Only an action.",
|
||||
"show": "title",
|
||||
"tool": "tasks",
|
||||
"args": {
|
||||
"action": "list"
|
||||
},
|
||||
"expect": {
|
||||
"title": "list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "No arguments, no title.",
|
||||
"show": "title",
|
||||
"tool": "job_list",
|
||||
"args": {},
|
||||
"expect": {
|
||||
"title": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Arguments that are not an object, no title.",
|
||||
"show": "title",
|
||||
"tool": "read",
|
||||
"args": "src/app.ts",
|
||||
"expect": {
|
||||
"title": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A finished call: tenths under a minute.",
|
||||
"show": "duration",
|
||||
"state": "done",
|
||||
"ms": 412,
|
||||
"expect": {
|
||||
"duration": "0.4s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Seconds.",
|
||||
"show": "duration",
|
||||
"state": "done",
|
||||
"ms": 8449,
|
||||
"expect": {
|
||||
"duration": "8.4s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Just under a minute.",
|
||||
"show": "duration",
|
||||
"state": "failed",
|
||||
"ms": 59940,
|
||||
"expect": {
|
||||
"duration": "59.9s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "What would round to 60.0s is a minute.",
|
||||
"show": "duration",
|
||||
"state": "done",
|
||||
"ms": 59960,
|
||||
"expect": {
|
||||
"duration": "1m 00s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "The last tenth under a minute.",
|
||||
"show": "duration",
|
||||
"state": "done",
|
||||
"ms": 59949,
|
||||
"expect": {
|
||||
"duration": "59.9s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "From a minute: minutes and whole seconds.",
|
||||
"show": "duration",
|
||||
"state": "done",
|
||||
"ms": 65000,
|
||||
"expect": {
|
||||
"duration": "1m 05s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "From an hour: hours and minutes.",
|
||||
"show": "duration",
|
||||
"state": "done",
|
||||
"ms": 7380000,
|
||||
"expect": {
|
||||
"duration": "2h 03m"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A failed call shows how long it took.",
|
||||
"show": "duration",
|
||||
"state": "failed",
|
||||
"ms": 1200,
|
||||
"expect": {
|
||||
"duration": "1.2s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A denied call shows none.",
|
||||
"show": "duration",
|
||||
"state": "denied",
|
||||
"ms": 3,
|
||||
"expect": {
|
||||
"duration": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A running call shows none.",
|
||||
"show": "duration",
|
||||
"state": "running",
|
||||
"ms": 5000,
|
||||
"expect": {
|
||||
"duration": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A stored call whose time was not kept shows none.",
|
||||
"show": "duration",
|
||||
"state": "done",
|
||||
"expect": {
|
||||
"duration": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "One line changed.",
|
||||
"show": "change",
|
||||
"diff": "--- a/a.txt\n+++ b/a.txt\n@@ -1,3 +1,3 @@\n one\n-two\n+2\n three\n",
|
||||
"expect": {
|
||||
"added": 1,
|
||||
"removed": 1,
|
||||
"text": "+1 −1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Headers without a/ and b/ are still headers.",
|
||||
"show": "change",
|
||||
"diff": "Index: a.txt\n===================================================================\n--- a.txt\n+++ a.txt\n@@ -1,2 +1,3 @@\n one\n+one and a half\n two\n",
|
||||
"expect": {
|
||||
"added": 1,
|
||||
"removed": 0,
|
||||
"text": "+1 −0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A removed line that begins with `-- ` and an added one that begins with `++ ` are lines, not headers.",
|
||||
"show": "change",
|
||||
"diff": "--- a/q.sql\n+++ b/q.sql\n@@ -1,3 +1,3 @@\n select 1;\n--- the old comment\n+++ the new one\n select 2;\n",
|
||||
"expect": {
|
||||
"added": 1,
|
||||
"removed": 1,
|
||||
"text": "+1 −1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A new file.",
|
||||
"show": "change",
|
||||
"diff": "--- /dev/null\n+++ b/new.txt\n@@ -0,0 +1,2 @@\n+a\n+b\n",
|
||||
"expect": {
|
||||
"added": 2,
|
||||
"removed": 0,
|
||||
"text": "+2 −0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A hunk header without counts means one line each.",
|
||||
"show": "change",
|
||||
"diff": "--- a/x\n+++ b/x\n@@ -1 +1 @@\n-a\n+b\n",
|
||||
"expect": {
|
||||
"added": 1,
|
||||
"removed": 1,
|
||||
"text": "+1 −1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "No newline at end of file counts for nothing.",
|
||||
"show": "change",
|
||||
"diff": "--- a/x\n+++ b/x\n@@ -1 +1 @@\n-a\n\\ No newline at end of file\n+b\n\\ No newline at end of file\n",
|
||||
"expect": {
|
||||
"added": 1,
|
||||
"removed": 1,
|
||||
"text": "+1 −1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Two files add up.",
|
||||
"show": "change",
|
||||
"diff": "diff --git a/a b/a\n--- a/a\n+++ b/a\n@@ -1 +1,2 @@\n a\n+b\ndiff --git a/c b/c\n--- a/c\n+++ b/c\n@@ -1,2 +1 @@\n c\n-d\n",
|
||||
"expect": {
|
||||
"added": 1,
|
||||
"removed": 1,
|
||||
"text": "+1 −1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "No diff, nothing changed.",
|
||||
"show": "change",
|
||||
"diff": "",
|
||||
"expect": {
|
||||
"added": 0,
|
||||
"removed": 0,
|
||||
"text": "+0 −0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "An edit shows its change.",
|
||||
"show": "facts",
|
||||
"block": "edit",
|
||||
"diff": "--- a/x\n+++ b/x\n@@ -1 +1,2 @@\n-a\n+b\n+c\n",
|
||||
"expect": {
|
||||
"facts": [
|
||||
"+2 −1"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A command that failed shows its exit code.",
|
||||
"show": "facts",
|
||||
"block": "shell",
|
||||
"exit": 2,
|
||||
"expect": {
|
||||
"facts": [
|
||||
"exit 2"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A command that succeeded shows none.",
|
||||
"show": "facts",
|
||||
"block": "shell",
|
||||
"exit": 0,
|
||||
"expect": {
|
||||
"facts": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A search shows its hits.",
|
||||
"show": "facts",
|
||||
"block": "search",
|
||||
"hits": 14,
|
||||
"expect": {
|
||||
"facts": [
|
||||
"14 hits"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "One hit.",
|
||||
"show": "facts",
|
||||
"block": "search",
|
||||
"hits": 1,
|
||||
"expect": {
|
||||
"facts": [
|
||||
"1 hit"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "No hits is a fact too.",
|
||||
"show": "facts",
|
||||
"block": "search",
|
||||
"hits": 0,
|
||||
"expect": {
|
||||
"facts": [
|
||||
"0 hits"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A read has none of these.",
|
||||
"show": "facts",
|
||||
"block": "read",
|
||||
"hits": 3,
|
||||
"exit": 1,
|
||||
"expect": {
|
||||
"facts": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Stopped by the person: the line stays on the reply.",
|
||||
"show": "end",
|
||||
"progress": {
|
||||
"phase": "stopped",
|
||||
"since": 1762790400000,
|
||||
"reason": "person"
|
||||
},
|
||||
"now": 1762790460000,
|
||||
"expect": {
|
||||
"line": "Stopped: by you"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "The budget ran out.",
|
||||
"show": "end",
|
||||
"progress": {
|
||||
"phase": "stopped",
|
||||
"since": 1762790400000,
|
||||
"reason": "budget"
|
||||
},
|
||||
"now": 1762790460000,
|
||||
"expect": {
|
||||
"line": "Stopped: budget"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "The step limit.",
|
||||
"show": "end",
|
||||
"progress": {
|
||||
"phase": "stopped",
|
||||
"since": 1762790400000,
|
||||
"reason": "steps"
|
||||
},
|
||||
"now": 1762790460000,
|
||||
"expect": {
|
||||
"line": "Stopped: step limit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Stopped, no reason known.",
|
||||
"show": "end",
|
||||
"progress": {
|
||||
"phase": "stopped",
|
||||
"since": 1762790400000
|
||||
},
|
||||
"now": 1762790460000,
|
||||
"expect": {
|
||||
"line": "Stopped"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Failed, with the error.",
|
||||
"show": "end",
|
||||
"progress": {
|
||||
"phase": "failed",
|
||||
"since": 1762790400000,
|
||||
"reason": "502 Bad Gateway"
|
||||
},
|
||||
"now": 1762790460000,
|
||||
"expect": {
|
||||
"line": "Failed: 502 Bad Gateway"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A reply that finished shows nothing.",
|
||||
"show": "end",
|
||||
"progress": null,
|
||||
"now": 1762790460000,
|
||||
"expect": {
|
||||
"line": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A phase that is not an end shows nothing on the reply.",
|
||||
"show": "end",
|
||||
"progress": {
|
||||
"phase": "writing",
|
||||
"since": 1762790400000
|
||||
},
|
||||
"now": 1762790460000,
|
||||
"expect": {
|
||||
"line": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A plan change is not drawn as a call.",
|
||||
"show": "drawn",
|
||||
"block": "plan",
|
||||
"expect": {
|
||||
"drawn": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Nor a hidden tool.",
|
||||
"show": "drawn",
|
||||
"block": "hidden",
|
||||
"expect": {
|
||||
"drawn": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A command is.",
|
||||
"show": "drawn",
|
||||
"block": "shell",
|
||||
"expect": {
|
||||
"drawn": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "A tool nobody knows is the generic block.",
|
||||
"show": "drawn",
|
||||
"expect": {
|
||||
"drawn": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -316,6 +316,19 @@
|
||||
"line": "Stopped: step limit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Stopped when the budget ran out.",
|
||||
"progress": {
|
||||
"phase": "stopped",
|
||||
"since": 1762790400000,
|
||||
"reason": "budget"
|
||||
},
|
||||
"now": 1762790400000,
|
||||
"expect": {
|
||||
"text": "Stopped: budget",
|
||||
"line": "Stopped: budget"
|
||||
}
|
||||
},
|
||||
{
|
||||
"about": "Failed.",
|
||||
"progress": {
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ref": "5044168b337309aa52cea6af5ab12b2744896bb5",
|
||||
"commit": "5044168b337309aa52cea6af5ab12b2744896bb5",
|
||||
"sha256": "c417d917e5801e2f6378ee7fbf1d75eb398a4e11ea6f5a03a28554bcbb61e80d"
|
||||
"ref": "9ab0818ae3bb2dac58c9053196b3e6d12c65ad7c",
|
||||
"commit": "9ab0818ae3bb2dac58c9053196b3e6d12c65ad7c",
|
||||
"sha256": "da264d17c7c4a11ef5774482df5e1eaab9c608078b8c2a151ab026d3d14a7298"
|
||||
}
|
||||
+6
-1
@@ -53,5 +53,10 @@
|
||||
"label": "Shire",
|
||||
"scheme": "light"
|
||||
}
|
||||
]
|
||||
],
|
||||
"python": {
|
||||
"enabled": false,
|
||||
"version": "",
|
||||
"files": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"kind": "file",
|
||||
"path": "/home/frodo/bread.md",
|
||||
"name": "bread.md",
|
||||
"detail": "/home/frodo/bread.md"
|
||||
},
|
||||
{
|
||||
"kind": "attachment",
|
||||
"id": "att1",
|
||||
"name": "recipe.pdf",
|
||||
"detail": "document"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"kind": "url",
|
||||
"url": "https://example.org/waybread",
|
||||
"name": "https://example.org/waybread",
|
||||
"detail": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
"origin": "",
|
||||
"model": "qwen",
|
||||
"attachments": [],
|
||||
"end": null,
|
||||
"steps": [
|
||||
{
|
||||
"index": 0,
|
||||
@@ -40,14 +41,16 @@
|
||||
"purpose": "Bake one loaf",
|
||||
"text": "baked\n",
|
||||
"exit": 0,
|
||||
"ms": 2412,
|
||||
"block": {
|
||||
"kind": "shell",
|
||||
"title": "bake --slow",
|
||||
"chips": [
|
||||
"exit 0"
|
||||
],
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0
|
||||
"removed": 0,
|
||||
"state": "done",
|
||||
"duration": "2.4s",
|
||||
"label": "Bash"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"id": "msg5",
|
||||
"role": "assistant",
|
||||
"created_at": "2026-01-02T03:04:05+00:00",
|
||||
"complete": true,
|
||||
"stopped": false,
|
||||
"error": "The model's server answered 503.",
|
||||
"queued": false,
|
||||
"machine": false,
|
||||
"origin": "",
|
||||
"model": "qwen",
|
||||
"attachments": [],
|
||||
"end": {
|
||||
"phase": "failed",
|
||||
"reason": "The model's server answered 503.",
|
||||
"text": "Failed: The model's server answered 503."
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"index": 0,
|
||||
"kind": "text",
|
||||
"open": false,
|
||||
"markdown": "The dough is "
|
||||
},
|
||||
{
|
||||
"index": 0,
|
||||
"kind": "tools",
|
||||
"open": false,
|
||||
"calls": [
|
||||
{
|
||||
"id": "call4",
|
||||
"name": "bash",
|
||||
"status": "denied",
|
||||
"args": {
|
||||
"command": "rm -rf build"
|
||||
},
|
||||
"error": "Plan mode does not run commands.",
|
||||
"block": {
|
||||
"kind": "shell",
|
||||
"title": "rm -rf build",
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0,
|
||||
"state": "denied",
|
||||
"duration": "",
|
||||
"label": "Bash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "call5",
|
||||
"name": "grep",
|
||||
"status": "error",
|
||||
"args": {
|
||||
"pattern": "yeast",
|
||||
"path": "recipes"
|
||||
},
|
||||
"error": "No such directory.",
|
||||
"ms": 61300,
|
||||
"block": {
|
||||
"kind": "search",
|
||||
"title": "yeast",
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0,
|
||||
"state": "failed",
|
||||
"duration": "1m 01s",
|
||||
"label": "Search files"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"plan": null,
|
||||
"metrics": {
|
||||
"prompt_tokens": 0,
|
||||
"completion_tokens": 0,
|
||||
"total_tokens": 0,
|
||||
"context_tokens": 0,
|
||||
"context_limit": 0,
|
||||
"estimated": false,
|
||||
"elapsed_ms": 0,
|
||||
"rounds": 1,
|
||||
"thinking_ms": 0,
|
||||
"percent": 0,
|
||||
"tok_s": 0.0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"id": "msg5",
|
||||
"role": "assistant",
|
||||
"created_at": "2026-01-02T03:04:05+00:00",
|
||||
"complete": true,
|
||||
"stopped": true,
|
||||
"error": null,
|
||||
"queued": false,
|
||||
"machine": false,
|
||||
"origin": "",
|
||||
"model": "qwen",
|
||||
"attachments": [],
|
||||
"end": {
|
||||
"phase": "stopped",
|
||||
"reason": "person",
|
||||
"text": "Stopped: by you"
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"index": 0,
|
||||
"kind": "text",
|
||||
"open": false,
|
||||
"markdown": "The dough is "
|
||||
}
|
||||
],
|
||||
"plan": null,
|
||||
"metrics": {
|
||||
"prompt_tokens": 0,
|
||||
"completion_tokens": 0,
|
||||
"total_tokens": 0,
|
||||
"context_tokens": 0,
|
||||
"context_limit": 0,
|
||||
"estimated": false,
|
||||
"elapsed_ms": 0,
|
||||
"rounds": 1,
|
||||
"thinking_ms": 0,
|
||||
"percent": 0,
|
||||
"tok_s": 0.0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"call_id": "0123456789abcdef",
|
||||
"code": "import csv\nprint(sum(1 for _ in csv.reader(open('/home/frodo/in.csv'))))",
|
||||
"files": [
|
||||
{
|
||||
"path": "/home/frodo/in.csv",
|
||||
"content_b64": "YSxiCjEsMgo="
|
||||
}
|
||||
],
|
||||
"save": [
|
||||
"/home/frodo/out.txt"
|
||||
],
|
||||
"limits": {
|
||||
"seconds": 30,
|
||||
"memory": "512 MB",
|
||||
"output_chars": 20000
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"stdout": "2\n",
|
||||
"result": null,
|
||||
"error": "",
|
||||
"files": [
|
||||
{
|
||||
"path": "/home/frodo/out.txt",
|
||||
"content_b64": "b2s="
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"enabled": true,
|
||||
"version": "0.28.3",
|
||||
"files": [
|
||||
{
|
||||
"name": "pyodide.asm.wasm",
|
||||
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"size": 8765432
|
||||
},
|
||||
{
|
||||
"name": "pyodide.mjs",
|
||||
"sha256": "1111111111111111111111111111111111111111111111111111111111111111",
|
||||
"size": 17931
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"t": "ready",
|
||||
"id": "0123456789abcdef",
|
||||
"resumed": false,
|
||||
"label": "workstation",
|
||||
"dir": "/home/dev/project",
|
||||
"cols": 100,
|
||||
"rows": 30,
|
||||
"shared": false,
|
||||
"osc": true
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"t": "error",
|
||||
"message": "You already have as many terminals open as you may (3). End one first.",
|
||||
"shells": [
|
||||
{
|
||||
"id": "0123456789abcdef",
|
||||
"device": "workstation",
|
||||
"directory": "/home/dev/project",
|
||||
"seconds": 754,
|
||||
"chat": "chat2",
|
||||
"watched": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"shells": [
|
||||
{
|
||||
"id": "0123456789abcdef",
|
||||
"device": "workstation",
|
||||
"directory": "/home/dev/project",
|
||||
"seconds": 754,
|
||||
"chat": "chat2",
|
||||
"watched": false
|
||||
},
|
||||
{
|
||||
"id": "fedcba9876543210",
|
||||
"device": "workstation",
|
||||
"directory": "/home/dev/other",
|
||||
"seconds": 31,
|
||||
"chat": "",
|
||||
"watched": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -23,7 +23,10 @@
|
||||
"title": "/home/frodo/recipe.md",
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0
|
||||
"removed": 0,
|
||||
"state": "done",
|
||||
"duration": "",
|
||||
"label": "Shown"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -50,7 +53,10 @@
|
||||
"title": "",
|
||||
"chips": [],
|
||||
"added": 0,
|
||||
"removed": 0
|
||||
"removed": 0,
|
||||
"state": "done",
|
||||
"duration": "",
|
||||
"label": "Shown"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user