mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 05:37:19 +01:00
feat/shared-knowledge-map
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9d53f55028 |
fix(terminal): name the agent, read the model from a limit, and make limit steps commands (#1324)
From the owner's phone (2026-10-19), a session that hit "You've reached your
Fable limit":
- The header and box said "cloud builder" and "Message the agent…": no
live process badge yet. They now name the agent the tab resolves to.
- The model chip said "Model": Claude Code's limit line carries no model.
It names the one that hit the limit, and the chip now reads it ("Fable").
- The replies were sentences sent to an agent that answers nothing until
the limit is dealt with ("switch to a different model with /model",
"request additional credits from the user"). A limit now offers Claude
Code's own commands, typed as commands: Use Opus, Use Sonnet, Continue
with usage credits (/usage-credits, added to the command list).
- The next-steps prompt now says every line is sent TO the agent.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
071ef57447 |
fix(session): switch to Fable or Opus from the phone, see it confirmed; the terminal says it is opening (#1312)
From a phone the owner could not switch a session from Fable to Opus, and
opening the terminal showed a black pane before the screen appeared.
- The model sheet offers each family by Claude Code's own alias: Fable,
Opus, Sonnet, Haiku. Fable was missing. Versions are never written
down, because the aliases resolve to the newest model in each family.
- Claude Code's own "Set model to Opus 5.5", "Set effort level to high"
and refusals ("Model 'x' isn't available for your account") are read
from the session log as setting items. The sheet settles on them at
once and shows a refusal in Claude Code's words. The conversation
gets a quiet line where the change happened. A runner too old to send
these items still settles on the next answer.
- The chip reads "Model · Auto" instead of "Model? · Auto".
- The box's book button is now a slash button labelled "Commands and
prompts". It always opened the agent's commands above the library.
- The terminal pane says "Opening the screen…" until the first frame.
The server remembers each session's last screen, and a new viewer sees
it at once, marked "Last screen · updating", until the runner's live
replay lands. A remembered screen never counts as proof of life for
the stall watchdog, and closing a session forgets it.
- The conversation view's wait reads "Opening the conversation…".
- Fleet Runner 0.8.46 carries the log reader.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
96335c2ebe |
feat(terminal): the session names its effort; box agents ask for Loki's records in one line (#1245)
- Claude Code writes the effort level on each answer in its log, beside the model. The reducer reads it and SessionInfo shows it: "Opus 5.5 · high effort · Auto", and the sheet's Effort row names the current level. - The box agents' contract gains "What Loki knows that this machine does not": records arrive attached; when one is missing, say "I need the feedback reports for <project>." (which the box turns into an Attach button), never ask the operator to export them by hand. A test ties that sentence to the detector. - The contract was only installed when the builder was first set up, so every later edit stayed in the repo. deploy-hetzner.sh now re-applies it (merge-only, 60 s cap, never fails the deploy). Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
12cdce76d3 |
feat(terminal): the agent gets Loki's feedback, and the session says its model and mode (#1228)
Asked to synthesize user feedback, the agent in a session searched its memory folder, the repo and GitHub, found nothing, and asked for an export of reports Loki already holds. And the conversation view said "Auto" with no model and no way to learn what Auto meant. - Loki's feedback reports reach the agent as a visible file on the box (/api/feedback/export, fenced as untrusted, no contact data): from "/", from a chip when the agent asks for feedback, and with any library prompt that declares `attach: ["feedback"]` — in a session and in Run with Loki. - SessionInfo names the model (read from the session log) and the mode in words; its sheet changes the model, the effort (/effort) and the mode. - Next-step chips use gpt-oss-120b and never approve an agent that said it lacks data or access. - Library prompts that pointed at things the agent cannot reach (the knowledge graph, Loki's database) now say what to use and to say "can't tell" instead of guessing. - A pasted_content closing tag with attributes no longer leaks into the conversation. - "/" opens SessionPicker, never taller than the room above the box (it ran off a 320×568 screen). Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
2b0b1bc49a |
Unify mobile agent conversations, run status and shared project progress (#1201)
* Make mobile agent conversations and shared project progress coherent * Remove the retired automatic personal-goal dispatch reader * Keep the conversation connection indicator in sync with its live stream * Preserve existing phone install identity and clarify the historical implementation plan * Make session recovery instructions user-facing and record the security-alert source review * Carry project proposals into coding handoffs and clarify empty-session routing |
||
|
|
2011f31d64 |
feat(loki, terminal): AI next steps, one-action dispatch card, chat view's clock and mode (#1046)
* feat(loki, terminal): AI next steps, a dispatch card with one next step, the chat view's clock
From the operator, on a phone (2026-10-05): smarter suggestions, a less
confusing dispatch card, a phone layout pass, and a chat view more like the
Claude app.
- AI next steps. Once a session's screen or Claude's reply stops changing,
the fast model reads it (POST /api/terminal/next-steps, one call per
distinct context) and its three steps lead the suggestion row in both the
Prompt box and the chat view. The rule-based chips show at once and stay
as the fallback when the model is slow or fails.
- Dispatch card. "Queued · waiting for a builder · Target: loki" over
Control state / Cloud terminal / This computer is now a headline that
names where the work is ("Waiting for this computer"), one line on what
happens next, and ONE primary action chosen by state: Connect Fleet Runner
while it waits on this computer, Watch it while it runs (on the terminal
it actually runs on), Open in Control when it failed, See the result when
it finished. lib/dispatch-card.ts, tested.
- Chat view. The live line carries the turn's age ("2 min 5 s"), the way
the Claude app shows it; a single tool step names itself ("Ran" + the
command in mono) instead of "Ran a command".
- Status dots. dispatchToneDotClass returned a colour class without the
ui-dot size, so every dispatch status line (Loki card, terminal composer,
prompt run modal, activity retry) began with a 0×0 dot.
- Suggestion chips ellipsize instead of cutting a step mid-word.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQdyreKqCfy8iwRBRUVm39
* feat(terminal): Claude Code's mode beside the message box, one tap to the next
The Claude app shows Auto / Accept edits / Plan beside its composer. Loki's
conversation view now does too.
- Claude Code writes `permissionMode` on every message you send. The shared
log reader (lib/claude-transcript, also Fleet Runner's) keeps it on user
items; the frame route accepts it; sessionMode() reads the newest.
- SessionModeChip in the composer row: the mode as of your last message,
and a tap sends Shift+Tab, the TUI's next-mode key. It says "Switched…"
until your next message records the new mode. No pick-a-mode list on
purpose: the cycle order varies by Claude Code version and settings, so a
picker could land on the wrong mode and claim otherwise.
- Fleet Runner 0.8.40 (the runner reduces the log), with its changelog
entry. Older runners send no mode and the chip simply does not show.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQdyreKqCfy8iwRBRUVm39
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
88c08a70cb |
Claude Code as a phone conversation, texting-app chat, operator-only OpenClaw, one task to several projects (#1024)
* feat(control): one task, several projects — write a cross-repo task once
A change that spans repositories ("make it so I can post prompts in
OrangeCat and Loki") had to be pasted into each project separately, and
each agent then tried to build the whole thing in its own repo.
- lib/multi-project-dispatch.ts fans one task out through injectPrompt
(same routing, serialisation, tracking as /api/inject). Names resolve
before anything is sent; an unknown name refuses the whole task and
lists the projects that would have worked.
- lib/multi-dispatch-prompt.ts: with 2+ projects each agent is told who
else got the task, which part is theirs, and to write down any
cross-repo contract it assumed.
- POST /api/inject/multi (session / agent token).
- POST /api/orangecat/task: signed OrangeCat rail, runs as the Loki user
linked to the actor, 409 with the next step when unlinked.
- Control: select projects on the rail -> "Send a task" opens the shared
Composer; a partial send keeps the draft and retries only the refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cwwmrb1uCjRv7wKDWLiA21
* fix(loki): the operator's OpenClaw agent and personal session are the operator's alone
Loki is multi-user with open sign-up, but three paths let any signed-in
account reach the instance operator's private agent:
- ask_openclaw (a `read` tool every user's tool loop advertised) queried
the operator's OpenClaw agent, which remembers their Telegram and
WhatsApp threads.
- The gateway fallback ran for every user whose tool loop failed, with
the operator's gateway token at operator.write scope.
- LOKI_PERSONAL_SESSION_KEY put every user's "Ask Loki" into the
operator's personal session.
Now: tools can be marked operatorOnly and runLokiTurn drops them unless
operator === true (fail closed); askLoki resolves "operator" from the
account (users.is_default) — never from a caller option — and only then
may fall back to the gateway; the personal session key applies to the
operator's account only. Everyone else keeps the shared chain and their
own per-user thread.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cwwmrb1uCjRv7wKDWLiA21
* feat(loki): a texting-app chat on phones
On a phone the chat got about a fifth of the screen: the app top bar, a
second row of two icons, a "save this exchange" row, a row of starter
chips, a four-row composer and the bottom tabs. Now:
- An open conversation takes the whole phone (useImmersiveChat hides
the app top bar and bottom tabs below md). Its own ThreadHeader is one
line: back to chats, the title with the project scope under it, and a
menu (New chat, All chats, Projects).
- Your messages are neutral bubbles, answers are plain 16px text, and
copy/retry are icon-only 44px targets on phones.
- The composer is one rounded card: words first, then one row —
attach · model · project on the left, mic beside send on the right.
The project pill sits inline (tap to change, × to drop) instead of a
header row, the builder badge is a coloured dot on phones, and starter
chips stay off phones mid-conversation. chatkit's stylesheet is
unlayered, so these overrides are unlayered too (a rule inside @layer
components silently loses to it).
- "Save this exchange to a project" scrolls with the thread instead of
holding a fixed row.
- The start screen is a messages inbox — round initials, title + time,
project under it, eight deep. It used to hide recent chats on every
phone because the desktop rail's pin (on by default) was treated as
"the rail is visible", so Back from a thread landed on nothing.
- On the start screen the chat's own two icons render inside the app
top bar's empty left half (TopbarSlot) instead of a second header.
Checked at 320/390 in light and dark: no horizontal overflow, send
never pushed off (model and project pills give up width first).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cwwmrb1uCjRv7wKDWLiA21
* feat(terminal): Claude Code as a conversation on your phone; a model sheet that reads like one
/terminal showed a Claude session only as its PTY — answers as 80-column
TUI cells, unreadable on a phone. Claude Code already writes the same
conversation as structured data, so now it is shown as one.
- lib/claude-transcript.ts (pure, tested): Claude Code's session JSONL
→ user / assistant / tool items. A tool's result lands on a later line
and updates its row in place; harness noise, sidechains and meta lines
are dropped; results are previews, never whole files. Consecutive tool
calls fold into one line ("Ran 2 commands, edited a file"), and a live
one says what is happening now ("Running git push").
- Runner (desktop 0.8.37): transcript-streamer.ts follows the newest log
for the folder the agent was launched in, reading only appended bytes
with fs/promises on a 1s timer, and only while someone watches — it
rides peek_start/peek_stop.
- Server: POST /api/control/transcript-frame (runner token) and
GET /api/control/transcript-stream (session). The server keeps the
latest conversation per (user, tab), so a phone that slept repaints at
once.
- ClaudeChatView: bubbles, readable answers, folded tool runs you can
open, an animated status line while Claude works, Allow / Always / Deny
when Claude may be asking, and a composer that types into the same PTY
(bracketed paste, so newlines do not send early). Stop is Esc; once you
type mid-run the slot becomes Send and Claude Code queues it. Chat is
the default view; the raw terminal is one tap away (header icon on
phones, "Chat" in the desktop pane chrome) and agents that write no
Claude log always get the terminal.
- Model picker: a bottom sheet on phones — plain names, one line on what
each is for, a check, locked rows saying why in words.
- Fix: the chat model you picked never reached the chat turn (askLoki had
no model; runLokiTurn always started at LOKI_MODEL). It now sets where
the free chain starts. And it is no longer handed to dispatched project
agents, which were being launched with a Groq/OpenRouter model id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cwwmrb1uCjRv7wKDWLiA21
---------
Co-authored-by: Claude <noreply@anthropic.com>
|