Repository navigation
Releases
Releases · QuittyMR/shoulder-daemon
v0.7.1
v0.7.1-rc
Fixed
- A candidate's npm package is published under the
rcdist-tag. npm
refuses a pre-release version without one, so the v0.7.0-rc npm job
failed; andlatestis what a plain install reads, so a candidate must
not take it. shoulderd update --rcgives the module proxy ten seconds to list the
tags instead of two. The first ask after a tag fetches a list the proxy
has not cached, and that took longer than two seconds.
v0.7.0-rc
Added
- Release candidates. A tag
vX.Y.Z-rcbuilds and publishes like a release,
marked as a pre-release, with its container image taggedlatest-rc; the
latestaliases do not move.shoulderd update --rctakes the newest
candidate; without the flag a candidate is never offered, and a candidate
build is told of the release that follows it.
Changed
- The prompt hook asks the model about the prompt before the assistant reads
it. One call, no tools, the prompt and the stored rules alone, three
seconds for the first ask and a retry together; on a timeout or a refusal
the hook answers as before and the background consult still runs. Context
the background consult wrote for "the next prompt" used to land on a
prompt minutes later, about something else. The hook script gives the
prompt post four seconds instead of two; every other post keeps two. - A text that reached the assistant is not said again for ten main-thread
events, five prompts with their answers. The decision model read a stored
rule on every event it bore on and said it every time. - Context written for the next prompt is for that prompt alone: when the
prompt arrives, the one note it takes is delivered and the rest are
dropped, and a note older than two minutes is dropped unread. - A decision answer that is not the decision object is asked for once more
before it counts as a failure. The second ask shows the model the start of
what it wrote and tells it to answer with the JSON object only. The small
Gemini model answers the transcript in the editor's voice now and then,
and one such answer flipped the daemon to "model down" until the next
event. A refused retry is still one failure, logged and noticed once. The
retry is counted inshoulder_advisor_retry_total.
v0.6.3
Changed
- Every request to the model asks for JSON at the wire: the chat completion
payload carriesresponse_format: {"type":"json_object"}for the
decision, the tidying pass,learn,message,digestand the start-up
probe. A model that answered with a stored fact or a tool result instead
of the decision object did so after a tool call; told at the API level
that only JSON is accepted, it is far less likely to. messageanddigestanswer inside JSON,{"answer":""}and
{"digest":""}, and the daemon reads the field. A prose answer is refused
withno JSON object in model output, counted on the existing error
metric and logged with the first 400 characters of what the model wrote.- A decision object with none of the expected keys,
inject,factsor
keywords, and amessageordigestobject without its field, are
refused with an error instead of being read as an empty answer.
v0.6.2
Changed
- The licence is the GNU General Public License, version 3, where it was
MIT: the repository, the Claude Code plugin, the OpenCode plugin and the
container image say so.
Fixed
- A decision the daemon could not read as JSON was logged with the error
alone, and what the model had written instead was thrown away. The
decision failedlog line now carries the first 400 characters of it,
on one line, asoutput. The notice in the editor is unchanged: the
text is for the log, not the harness.
v0.6.1
Added
shoulderd updatebrings the binary to the newest release. A plugin or
release install has its binary replaced after a check against the
publishedSHA256SUMS, ago installbuild is installed again, and a
checkout or a container is told what to run.--checkonly asks and
exits 3 when a newer release is out.- The Claude Code plugin's
SessionStarthook says, once a day, when a
newer release is out. It does not install it: the place where the harness
would is a stub inscripts/ensure-daemon.sh, empty on purpose. - The install guide has an update section: the binary, the adapter and the
process, and what moves each. - Notices in the editor, on by default. The daemon tells the person what
it does, as it does it: errors, advice injected with its text, facts
stored with their text, and facts superseded.warnings(a fact that
could not be kept, and why) andmaintenance(tidying passes, with
counts) are named to switch on withSHOULDER_NOTIFY;allis
everything,offis silence. Claude Code shows them assystemMessage, the one hook field
addressed to the person and never the model; OpenCode shows them as
toasts. A notice is queued for the session it concerns and rides on that
session's next hook.shoulderd doctorprints the setting in use.
Fixed
shoulderd doctortold a plugin install that the plugin fetches a newer
release on the next editor start. It never did: the start script fetches
only when there is no binary at all. The hint now saysshoulderd update.
v0.5.2
Added
- The daemon keeps the last word its decision model gave. It asks the model
one question when it starts and after everyconfig setthat changes the
model, and records every decision call after that. A model that refuses -
a dead key, say - used to leave a daemon that looked healthy from every
angle while nothing was learned from any session; one ran that way for
thirteen days. shoulderd doctorreports a refusing model with the cause, since when and
how many calls in a row, and exits 1. A model that answers is reported with
since when. The report used to say only which model was configured./readyzcarriesmodel,model_providerandmodel_since. The status
code is unchanged: no restart mends a dead key.shoulderd monitorshows every decision the model refused and every
tidying pass that failed, asfailed, with the refusal on one line, and
the model going down and coming back asmodel downandmodel up. The
view filtered these out before, which is how thirteen days of refusals
went unseen.- The Claude Code plugin's
SessionStarthook tells you when the decision
model refuses, as thesystemMessageof the one JSON object it prints.
Everything the start script said on stderr before went nowhere: the
harness shows a person nothing from a hook that exits 0 except that
field, so every warning the script has is now said that way at session
start. docs/AGENT-SETUP.mdis the install and setup procedure written for the
coding agent to follow, in Claude Code or OpenCode: hooks, daemon, model,
key, start, and a doctor report. The README's install section opens with
the one line to paste into either agent.
Changed
shoulderd monitorprints the date with the time. A log spans days, and a
clock time alone could not say which day a movement belonged to.
v0.5.1
Changed
- Every per-event hook of the Claude Code plugin is now a command,
scripts/post-event.sh <event>, in place of the HTTP hooks. The script
posts the event to the relay with the token and prints the relay's answer
for the harness; when the post cannot connect it runs
scripts/ensure-daemon.sh, so a relay that has stopped under a working
session is started again by the first event that misses it, whatever that
event is. An HTTP hook that cannot connect only prints
connect ECONNREFUSED 127.0.0.1:8787and nothing acts on it, and the one
restart point, the boot script before each typed prompt, never ran for a
session that was busy with tool calls and subagents. That per-prompt run is
removed;SessionStartstill runs the boot script, which is also where the
binary is fetched. TheallowedHttpHookUrlsallowlist no longer applies to
the plugin, andshoulderd doctorno longer points at it. Only a 200 answer
is printed; a refused or unknown post prints nothing, and the script always
exits 0.
v0.5.0
Added
- Subagent prompts and results are observed as part of the session: the
Agenttool call's prompt and theSubagentStopanswer are consulted like
the user's own prompt and answer end, under the parent's session id. The
plugin now registersSubagentStart, the first hook to carry the id Claude
Code gave the agent; the relay records it as anagent_startand pairs it
with theAgentcall that spawned it, oldest of the type first. Advice from
a subagent's prompt is queued at the action level, addressed to that call
and from there to the id, and lands at the subagent's start when it is
ready by then or at its next tool call; neither the main thread nor a
sibling takes it. A subagent's injections are charged to the session's
character cap and leave the main thread's event gap alone. A subagent's event
may add findings and facts but never rules or preferences: those are
dropped before the write, counted in
shoulder_facts_agent_rule_dropped_total, and logged with their content. A
subagent's stop does not advance the session's event counter and does not start the
periodic tidy. A neutral event that names anagent_idis taken as the
agent's whether or not it also sendsorigin. - An optional triage step in front of the decision model, backed by TypeSafe's
Jev (System One). WithSHOULDER_TRIAGE=jevandTYPESAFE_API_KEY, every
event is first classified as needing nothing, a new fact, a change to a stored
fact, or a stored fact repeated to the session. A confident "repeat" injects
the stored fact as it is at the next tool call, and a confident "nothing" at
pickinessbalancedor stricter settles it, both without calling the
decision model; everything else, including "nothing" ateageroropen, a
verdict underSHOULDER_JEV_MIN_CONFIDENCE(0.6) and any triage failure,
goes to the decision model unchanged. Triage is cut off after a quarter of
ADVISOR_TIMEOUT_SECONDS, at most 5s, so a stalled Jev does not use up the
decision model's time, and its latency is reported as
shoulder_hook_latency_seconds{event="triage"}. Triage also runs with no
SHOULDER_LLM, where a fact it wants written is counted in
shoulder_triage_unhandled_totalrather than dropped.shoulderd config showreports the triage in use. shoulderd doctorreports the decision model on anllm:line and compares
the provider, the model where the env file names one, and the store with
what the env file asks for./v1/cli/configand/v1/cli/memorynow say
where each value came from - the env file, the process environment,
config set, or nothing - and which file the daemon read. A difference in a
value from the file or from nothing is a daemon started before the file was
edited or from another file, and fails asMISMATCH; one from the process
environment orconfig setwas chosen over the file and is printed as a
note. Doctor also fails when there is no decision model, and when the store
failed to open at start, which it reports with the reason rather than as no
store. A triage with no decision model readsllm: none (triage only)and
passes. While nothing listens, it shows the end of the start command's
output.--livenessis unchanged.shoulderd env path|get|set|unsetreads and writes the env file with the
grammar the daemon reads it with;setchanges a setting where it first
stands, takes a secret on standard input and writes through a link. The
setup skill'senv-set.shandmake install-pluginsnow go through it, and
the token the daemon generates is written single-quoted, so every value they
write reads back as itself. A leading~/inSHOULDER_ENV_FILEis home
everywhere the file is resolved.make up-checkprints whethermake upwould recreate the relay, and the
names of the variables behind the answer, without doing anything.make check-stackruns the compose stack throughmake upunder a project,
a port, a volume, an env file, adeploy/.envand a state directory of its
own, with a stub model and a stub store, and fails unless compose reads that
env file and no other,make uprecreates a relay that is stale or predates
the hash and leaves a current one alone, and doctor reports the configured
model and store as coming from the file. It leaves a running install alone
and removes what it created.
Changed
- The word "turn" is gone from the project: the unit is the event, one
utterance by the user or by an agent, and nothing groups a prompt with its
answer. Renamed with it:- the wire kind
turn_endisanswer_end./v1/eventsstill accepts
turn_endfrom an adapter installed before this, and records it as an
answer_end; the OpenCode adapter sends the new name; - the setting
BUDGET_MIN_TURN_GAPisBUDGET_MIN_EVENT_GAP. The old key
is still read while the new one is unset, and the daemon logs one line
at start naming the replacement; - the metric
shoulder_advice_suppressed_turn_gap_totalis
shoulder_advice_suppressed_event_gap_total, with no alias; - in the advice a neutral adapter is answered with,
created_turnand
ttl_turnsarecreated_eventandttl_events; in the/v1/sessions
listing,turnismain_events; in the log, theturnattribute of
advice queuedismain_events, whichshoulderd monitorprints as
event N; - the decision prompt's
<recent-turn>tag is<recent-events>, the state
sent to Jev names the windowrecent_events, and both prompts speak of
events; replay -max-turnsisreplay -max-answers.
- the wire kind
- The session's counter, which advice is aged and budgeted in, advances on
every prompt of the user and on every answer end of the main thread, where
it advanced on the answer end alone; a subagent's prompt and stop still
leave it alone. Everything counted in it is doubled so that a session
behaves as before: the default ofBUDGET_MIN_EVENT_GAPis 6 where it was 3,
advice expires 4 counts after it was written where it was 2, and the
periodic tidy runs every 10 where it was 5. A gap set in
an env file keeps its number and now spans half as much of the session:
double it to keep the gap it had. The tidy runs at the first answer end in
each span of 10, so a prompt whose answer was interrupted does not put it
off. A note delivered before the first answer ended did not open the gap;
it does now. A note written at an answer end is current for the next two
prompts, where it was three. - Every prompt and every answer end is consulted, the main thread's and a
subagent's alike, and the consults of one session run concurrently. Before,
one consult ran per session at a time and a prompt or an answer end that
arrived meanwhile was dropped, so agents spawned together were not all
advised and an answer end behind a slow consult lost its facts.
shoulder_advisor_skipped_inflight_totalis gone with the drop, and
advisor_in_flightis gone from the session summary. Only the rewrite of
the session's keyword record is serialised, one consult at a time. Advice
whose text is already pending for the same session and addressee is not
queued twice and is counted inshoulder_advice_duplicate_total. - The fact categories are now
finding(something a session established by
looking),fact(a durable truth about the project or the machine),rule
(a constraint or decision that governs how work is done here) and
preference(how the person wants work or communication done; private).
Aruleor apreferenceis stored only when the user said it: the
decision prompt refuses one from an agent line or from what the assistant
concluded, andfacts.UserOnlynames the two for the pipeline to enforce on
a consult that comes from a subagent. The old names map forward on read, on
fact add, on migration and in the model's reply:decision,constraint
andcorrectionbecomerule,structureandreferencebecomefact.
The docs store files new records inFINDINGS,FACTS,RULESand
USER.shoulder.md, writes every category under its current name, and keeps
reading and correcting in place theARCHITECTURE,DECISIONS,
CONVENTIONSandREFERENCES.shoulder.mdfiles an older daemon wrote. - Recall searches each scope for the recent prose as a whole and once more for
each of its sentences, up to sixteen, and merges the hits by record with the
best score kept, so a stored fact that matches one sentence closely is found
rather than averaged away by the rest of the window. A sentence ends at a
line break or at a terminator that ends a word, so a file name, a version
or a hostname is not cut in two; a one-word piece is not searched, and a
window over the cap keeps its newest sentences. The searches run four at a
time; the cut is counted inshoulder_recall_sentences_dropped_total. - The built-in store returns a legacy category under its current name on
every read, as the docs store and the memory service already did, so a
facts.jsonwritten by an older daemon no longer putsdecisionor
structurein front of the decision model or inshoulderd fact list. - The registry no longer holds facts recorded explicitly for an event: nothing
ever recorded one, so the path that reconciled them with the model's was
dead, and an event triage settles now writes nothing.
Fixed
- The container reads the daemon's one env file,
$SHOULDER_ENV_FILEor
${XDG_CONFIG_HOME:-~/.config}/shoulder-daemon/env, the file the docs tell
you to write and the CLI and the adapters read, and no other. It used to read
deploy/.envinstead, so an install configured as documented ran with no
model and the built-in store, silently.deploy/.envis no longer read for
the daemon's settings: move them into the env file. The Makefile resolves
the path; compose run by hand needsSHOULDER_ENV_FILEset ...
v0.4.1
Added
- A
setup-shoulder-daemonskill ships with the Claude Code plugin. It reads
shoulderd doctorand the env file first so it asks only what is still open,
then interviews the user over the decision model, the store and how recall
ranks, and configures all of it from inside the session: it starts the
mcp-memory-service container and waits for it to answer before writing
SHOULDER_MEMORY_URL, restarts the daemon through the plugin's own script,
and finishes on adoctorrun rather than on its own say-so. An API key is
copied from the environment by name and never printed, and when there is none
the skill stops and hands the user the line to run rather than writing a
placeholder that reports as configured and fails on the first turn.
Fixed
make updateandmake upno longer drop a running mcp-memory-service.
Compose acts only on the services its profiles select, so either command
recreated the relay and left it pointing at a store that was no longer there -
which the daemon reported as healthy while it dropped every search. Both now
select the memory profile whenever the store's volume exists, so the first
upafter amake downbrings the store back too.make up, which is what
SHOULDER_START_CMDruns every time the daemon idles out and a session brings
it back, passes--no-recreate, because podman-compose otherwise recreates a
healthy relay and makes the store pay its model load on every session start.
make downremoved the store either way and now says so explicitly.- Stopping the daemon no longer cuts writes off half way. It exits when the last
session ends or it has been idle, and until now it did so while requests,
the advice for a turn and the tidying pass were still writing: a fact the
model had already decided could be lost, a tidying pass could leave both
wordings of a merged fact behind, and a stray temporary file could be left
beside the store. The daemon now cancels what has not decided yet, lets what
has decided finish writing, waits for the last tidying pass before going idle,
and closes the store only after all of it, within a fixed shutdown budget.
shoulderd memory migrateandshoulderd learncut off by a stop now say so
and exit non-zero instead of reporting a partial copy as complete, and a
partly read document is never removed by--replace.