Commit Graph

225 Commits

Author SHA1 Message Date
EugeneTes
f42b00cb1c fix(a2a-client): watches no longer hang on a silently dead task stream
Hour-long remote tasks were never delivered: a subscribe watch held one SSE stream for up to a day, the remote
sent nothing while its agent worked without text, and once the quiet connection died on the way (no FIN/RST) the
watch waited on it with no error and no log line.

- A subscription lasts at most 5 minutes (SubscriptionSlice), then GetTask and a new subscription: a pause, not a
  failure. A slice ended mid-read counts as ours even when it surfaces as an I/O error.
- The shared handler connects with TCP keepalive (60 s, every 15 s, 4 probes) and HTTP/2 pings.
- Log lines when a watch starts or is restored, when a slice ends on a running task, when a result is delivered or
  kept; the Telegram host's console log carries a UTC timestamp.
- action=status on a settled task ends its watch, so the result isn't delivered a second time.
- A "context busy" refusal of send says nothing was sent, names the watched task in that context and that its
  result will arrive by itself; refusals never touch a watch.
2026-10-16 13:48:32 +00:00
EugeneTes
644f72068c feat(skills): session-start and turn-end hooks and protected paths declared in SKILL.md
A skill's SKILL.md frontmatter may declare session-start (output into
<skill_session_context>, at session start, /new, resume and after compaction),
turn-end (after every run, in the background; output or a failure reaches the
next run as a hidden notice, repeats suppressed until a clean run) and
protected-paths (write/edit refused inside them). Hooks run from the skill
directory with VOLCANIC_WORKSPACE, VOLCANIC_SKILL_DIR and the chat's TZ; waits
are bounded by each hook's timeout and failures never break a run. /skills
shows declared hooks and broken fields.
2026-10-16 12:27:44 +00:00
EugeneTes
d51438e665 feat(telegram): several admins via ADMIN_USER_IDS, each impersonating independently
ADMIN_USER_IDS (Telegram:AdminUserIds) takes a comma separated list; the older
ADMIN_USER_ID / Telegram:AdminUserId still works, also takes a list and is merged.
Empty entries and duplicates are ignored, non-numeric entries fail validation.
Impersonation is now per admin: one admin per target, an impersonating admin
can't be impersonated, and every admin's chat menu lists /impersonate.
2026-10-15 14:02:59 +00:00
EugeneTes
7fef3ce94e feat(telegram): ElevenLabs text to speech for the voice tool
ElevenLabs speaks for the voice tool when ELEVENLABS_API_KEY and ELEVENLABS_VOICE_ID
are set (TTS_PROVIDER=elevenlabs|openai picks, the other is the fallback). Opus output
(opus_48000_64) goes to Telegram as is; voice names resolve through /v2/voices;
instructions become audio tags on eleven_v3 and are ignored on other models. The key
is redacted from tool output and never reaches agent processes.
2026-10-14 13:07:36 +00:00
EugeneTes
6e3241fed9 feat(scheduler): scheduled jobs inside skills (.volcanic/skills/<skill>/jobs/<job>.md)
Skill directories may now declare prompt or watcher jobs as files (cron or one-off at).
The file is the source of truth: the scheduler re-reads every chat's jobs/ every minute,
around agent runs and before /jobs and /skills, and schedules, re-plans or removes them.
Ids are <skill>/<job>; run state lives in .volcanic/scheduler/skill-jobs-state.json, never
in jobs.json. Watchers run from the skill directory with VOLCANIC_WORKSPACE and
VOLCANIC_SKILL_DIR. Broken files are shown with the reason in /jobs, /skills, schedule list
and the new <skill_jobs> prompt section; cancel answers with the file to edit. Every part of
a skill directory is optional; file reading and frontmatter parsing move to Abstractions.
2026-10-14 12:54:40 +00:00
EugeneTes
6893ee8197 fix(a2a-client): read 0.3-shaped file parts and report parts the SDK can't read
The 1.0 SDK ignores unknown part fields, so a file part shaped {kind:file, file:{bytes|uri,
name, mimeType}} arrived as an empty part and vanished. A2AWireCompat rewrites such parts
to {raw|url, filename, mediaType} in JSON and SSE responses before the SDK reads them, and
marks any part it still can't read so the result lists it with its field names.
2026-10-12 16:26:11 +00:00
EugeneTes
a92623b89b fix(a2a-client): save every file the remote agent returns, per task, with size and type
File parts were only taken from artifacts as inline bytes up to 10 MB; parts in the
status message or the history were dropped silently, URL parts were never downloaded,
and a plain message reply lost its files. Files now go to inbox/a2a/<taskId>/ from
artifacts, status message and recent agent messages (deduplicated), URLs are streamed
to disk (agent key only on the agent's origin, else https without it), the cap is the
new MaxReceivedFileBytes (200 MB), and results list path, bytes and media type or why
a file was not saved. Re-saving a task overwrites, so action=status refetches files.
2026-10-12 16:16:14 +00:00
EugeneTes
0cae6f600a feat(telegram): pass GOOGLE_CLIENT_SECRET to agent processes, still redacted
GOOGLE_CLIENT_SECRET is no longer denied by name in the core defaults (the
*_SECRET glob still removes it); the Telegram host allows it by default so
workspace skills (gmail, gdrive) can use the Google OAuth client. Its value
stays in SecretValues: redacted from tool output, and aliases with the same
value are still removed.
2026-10-12 15:10:49 +00:00
EugeneTes
bb1c534a7a feat(core): always-on INSTRUCTIONS.md in skill directories
A skill directory may hold INSTRUCTIONS.md, with or without SKILL.md. Its body
(frontmatter cut) goes into every system prompt in <skill_instructions>, re-read
on every run: 16 KB per file, 64 KB in total, truncation marked with the file's
path. /skills marks skills with instructions and lists instruction-only dirs.
2026-10-12 10:15:05 +00:00
EugeneTes
dccdf3a8ed fix(core): skills live in <cwd>/.volcanic/skills, next to the rest of the workspace config 2026-10-10 14:16:20 +00:00
EugeneTes
c3095c69ca feat(core): per-workspace Agent Skills listed in the system prompt, /skills in Telegram
Skills live in <cwd>/.claude/skills/<name>/SKILL.md (frontmatter name + description).
SkillCatalog re-reads them on every run and the prompt lists name, description and
path; the model reads the full SKILL.md with the read tool when a task matches.
2026-10-10 14:13:42 +00:00
EugeneTes
891a644590 feat(mcp): remote MCP servers per chat with sealed keys and owner-only commands
Streamable HTTP/SSE servers from the workspace's .volcanic/mcp/servers.json.
Headers are sealed with AES-GCM; the chat and the visible fields are the
associated data, so only /mcp_add|remove|tools change servers. Tools
<server>__<tool> go live in the session. An unreachable server is skipped
and reported in the system prompt. Keys are redacted from tool results, and
Telegram deletes messages that carry one.
2026-10-09 21:11:01 +00:00
EugeneTes
87240238cc feat(telegram): voice tool sends spoken replies as Telegram voice notes
OpenAI gpt-4o-mini-tts (female voice nova by default; TTS_MODEL/TTS_VOICE) renders OGG/Opus,
sent with sendVoice in order with rendered output. Up to 4500 characters per call, split
into 1500-character parts at paragraph/sentence/word boundaries; all parts are synthesized
before any is sent, and API errors come back to the agent as text with the key hidden.
On whenever OPENAI_API_KEY is set.
2026-10-09 10:09:46 +00:00
EugeneTes
923a6e04ac docs(a2a): client exposures, URLs without queries, README/architecture 2026-10-08 14:42:18 +00:00
EugeneTes
1817272b73 test(telegram): A2A server sessions never get the a2a tool 2026-10-08 14:39:56 +00:00
EugeneTes
5e50d902af docs(a2a): A2A client guide, configuration and Telegram notes 2026-10-08 14:34:02 +00:00
EugeneTes
8eea09baba fix(a2a-client): delivery set before polling, flushes respect stop, restore re-arms first 2026-10-08 14:28:31 +00:00
EugeneTes
81f4ffe02b fix(docker): restore the A2A server and client projects in the restore layer 2026-10-08 14:21:34 +00:00
EugeneTes
4a20ff4635 feat(telegram): A2A client per chat behind A2AClient__Enabled, watch results as follow-ups, /a2a lists agents 2026-10-08 14:21:34 +00:00
EugeneTes
adee225fcb fix(a2a-client): stopped registry starts no watch loops 2026-10-08 14:16:05 +00:00
EugeneTes
ab714a24ce refactor(a2a-client): no runtime-internal native calls for attachments 2026-10-08 14:09:18 +00:00
EugeneTes
0d2583ab01 fix(a2a-client): no orphaned remote tasks, bounded tool calls, safer file reads 2026-10-08 14:07:21 +00:00
EugeneTes
173b7dfc18 feat(a2a-client): the a2a tool with agents, send, status and cancel, and per-session wiring 2026-10-08 13:49:06 +00:00
EugeneTes
d7f5e0b900 fix(a2a-client): no leaked claim on a failed store, retry a flush that skipped a failing delivery, accurate StopAsync doc 2026-10-08 13:49:06 +00:00
EugeneTes
e1e0f35bb9 fix(a2a-client): deliver outside the workspace lock 2026-10-08 13:31:27 +00:00
EugeneTes
24e2ad9877 fix(a2a-client): sturdier watches — transient agents.json errors, bounded remote calls, single delivery 2026-10-08 13:15:40 +00:00
EugeneTes
8ba99b1477 feat(a2a-client): watch long remote tasks by push, subscribe or poll and deliver the results 2026-10-08 12:58:53 +00:00
EugeneTes
4fc523f86c feat(a2a-client): connect to remote agents through their cards with the configured key 2026-10-08 12:48:39 +00:00
EugeneTes
24747858eb fix(a2a-client): fake MCP server on the ASP.NET framework, question-first results, safer file names 2026-10-08 12:46:32 +00:00
EugeneTes
ef906b34dd chore(a2a-client): drop test package references the ASP.NET framework provides 2026-10-08 12:39:48 +00:00
EugeneTes
1fe9bfe4e8 feat(a2a-client): persist watches in pending.json 2026-10-08 12:36:29 +00:00
EugeneTes
fcc0191319 feat(a2a-client): describe remote tasks and save their files to the inbox 2026-10-08 12:36:12 +00:00
EugeneTes
168e8fc80d feat(a2a-client): read remote agents from agents.json on every call 2026-10-08 12:35:47 +00:00
EugeneTes
76e465ed2a feat(a2a-client): scaffold the A2A client extension behind A2AClient__Enabled 2026-10-08 12:35:26 +00:00
EugeneTes
e70557725a docs(plan): A2A client implementation plan; spec revisions 2026-10-08 12:29:29 +00:00
EugeneTes
b8be0f82ab docs(spec): task files carry caller and push configs only 2026-10-07 14:38:10 +00:00
EugeneTes
3360c320e7 docs(a2a): security reach, ports and limits 2026-10-07 14:32:33 +00:00
EugeneTes
fdb0bde798 fix(a2a): review polish 2026-10-07 14:31:35 +00:00
EugeneTes
0d1ddcc4df fix(a2a): unambiguous session scopes and validated context ids 2026-10-07 14:29:50 +00:00
EugeneTes
d542fcfe42 docs(a2a): A2A server guide, architecture, Telegram and Docker notes
Add docs/a2a.md (concepts, file formats, endpoints, sessions, task
lifecycle, configuration, security notes, curl examples) describing
what src/Volcanic.AgenticCore.A2A.Server actually does. Add an A2A
project paragraph to architecture.md, an "A2A" section to
telegram-bot.md (/a2a, notify_owner, isolated sessions, port 8080),
A2A_ENABLED/A2A_PUBLIC_URL and the aspnet image to docker.md, and
project-map/test-command updates to CLAUDE.md.

Mark the A2A server design spec implemented and record the deviations
found while building it (A2AHostOptions, synchronous
IA2ACallerDirectory.Find, generic WorkspaceCallerDirectory, per-status
push payload, split file-part error handling, the outbound guarded
handler, the per-caller server/router architecture, the restart grace
period, the owner= log field, the aspnet image, and the actual push
retry schedule). Note the aspnet image in the docker-deployment spec
too, without rewriting its historical decisions.
2026-10-07 14:20:19 +00:00
EugeneTes
f87a8dd8c1 chore(docker): rely on the aspnet image's port setting
mcr.microsoft.com/dotnet/aspnet:10.0-noble already sets ASPNETCORE_HTTP_PORTS=8080;
also setting ASPNETCORE_URLS made Kestrel log an override warning on every start.
2026-10-07 14:11:56 +00:00
EugeneTes
b53c339bf3 chore(docker): aspnet runtime image, port 8080 and A2A settings 2026-10-07 14:08:11 +00:00
EugeneTes
372c600503 fix(telegram): clean exit on A2A bind failure, log listen URLs, /a2a polish 2026-10-07 14:02:49 +00:00
EugeneTes
a3aee939d4 feat(telegram): /a2a lists a chat's A2A callers and recent tasks 2026-10-07 13:53:47 +00:00
EugeneTes
c1a8744eb7 feat(telegram): serve A2A from the bot, callers per chat workspace, notify_owner into the chat 2026-10-07 13:50:54 +00:00
EugeneTes
93a4504607 feat(a2a): standalone A2A sample host 2026-10-07 13:45:53 +00:00
EugeneTes
baddd320c7 fix(a2a): fresh response artifact per run, atomic continuation, sturdier e2e tests
- Each run's first text delta replaces the response artifact (append:false) and a resumed task
  drops the previous run's response, so a failed/canceled continuation never keeps old text.
- Resumed is built from a fresh store read, history chronological (question, then answer),
  timestamps on the TaskUpdater clock.
- Pool.Track refuses a second unfinished run of the same task; the pre-check rejects
  continuations of a running task with UnsupportedOperation.
- Tests: continuation history, streaming continuation, response replacement, concurrent
  continuation; busy test waits for the model call; TimeoutException in waits; push test
  matches TASK_STATE_COMPLETED; harness cleans up on failed start.
2026-10-07 13:38:36 +00:00
EugeneTes
ebdf4a1aa4 test(a2a): push delivery, URL guard and push receiver 2026-10-07 13:25:33 +00:00
EugeneTes
7b044c5437 test(a2a): streaming, input-required, busy contexts, cancel, subscribe, files and hops 2026-10-07 13:25:33 +00:00
EugeneTes
7d4b6ae119 fix(a2a): continuations emit the resumed task, guarded clients bypass proxies
A continued task (input-required -> new message) produced only status updates, so the SDK
answered 'Agent handler did not produce any response events'. The handler now enqueues the
resumed task (caller message and question in history, working) as the first event.
The guarded SocketsHttpHandler sets UseProxy = false: a proxy would make the connection and
skip the ConnectCallback address check.
2026-10-07 13:25:33 +00:00