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.
This commit is contained in:
EugeneTes
2026-10-16 12:27:44 +00:00
parent d51438e665
commit 644f72068c
20 changed files with 1282 additions and 15 deletions

View File

@@ -25,8 +25,8 @@ public sealed partial class JobScheduler : IAsyncDisposable
public static readonly TimeSpan MaxTimerDelay = TimeSpan.FromHours(1);
public static readonly TimeSpan LateThreshold = TimeSpan.FromSeconds(60);
public static readonly TimeSpan StopGrace = TimeSpan.FromSeconds(10);
public const string WorkspaceVariable = "VOLCANIC_WORKSPACE";
public const string SkillDirVariable = "VOLCANIC_SKILL_DIR";
public const string WorkspaceVariable = SkillHookFiles.WorkspaceVariable;
public const string SkillDirVariable = SkillHookFiles.SkillDirVariable;
private const string IdAlphabet = "abcdefghjkmnpqrstuvwxyz23456789";
private readonly SchedulerOptions _options;