Problem
There is no way from the codeoid UI to pick up a merged change to an installed
pack. When a pack's registry (e.g. ai-factory) gets a fix on main, the only
way to apply it locally today is out-of-band:
git -C ~/.codeoid/packs/<registry> pull --ff-only # update the cache
systemctl --user restart codeoid.service # reload the pack
The web UI exposes registry.add, pack.install, pack.remove, pack.trust,
pack.select — but no refresh/resync. Hit in practice: after merging
ai-factory#4 (a pipeline-phase fix), the running daemon kept using the stale
pack until a manual pull + restart.
Proposal
A small resync / refresh button on each installed registry row in
PackBrowser, backed by a new pipeline.registry.refresh verb.
The correctness catch (important)
PackService.refresh(name) already exists — but it only git pulls the cache.
That is not enough: the live daemon holds the pack loaded in-memory
(installPack(loadPack(...)) at boot / install), so a pull alone updates the
files while the running pipeline keeps the OLD pack. A refresh that only pulls
would look like it worked and silently do nothing to a live run.
So the verb must pull AND reload: for each installed pack whose
registry === name, re-run loadPack(entry.dir, {trusted}) → installPack and
re-link skills (respecting the trust gate from #233 — an untrusted pack still
does not link). Reply with the refreshed pack.list result like every other
mutating pack verb.
Sketch
- protocol:
PipelineRegistryRefreshMsg { type: "pipeline.registry.refresh", name?: string } (omit name = all); reply reuses pipeline.pack.list.result.
- PackService:
refreshRegistry(name?) = refresh() (pull) + reload each installed pack from that registry into the live manager + #linkSkills when trusted.
- session-manager:
#registryRefresh handler behind #packManageGuard.
- web state (
state/packs.ts): refreshRegistry(name) action (existing dispatch pattern).
- web UI (
PackBrowser.tsx): refresh button per installed registry, in-flight spinner.
- tests: PackService reload-after-pull (a pulled pack.yaml change is live without re-install), + the untrusted-still-not-linked case.
Notes
Related
Problem
There is no way from the codeoid UI to pick up a merged change to an installed
pack. When a pack's registry (e.g.
ai-factory) gets a fix onmain, the onlyway to apply it locally today is out-of-band:
The web UI exposes
registry.add,pack.install,pack.remove,pack.trust,pack.select— but no refresh/resync. Hit in practice: after mergingai-factory#4 (a pipeline-phase fix), the running daemon kept using the stale
pack until a manual pull + restart.
Proposal
A small resync / refresh button on each installed registry row in
PackBrowser, backed by a newpipeline.registry.refreshverb.The correctness catch (important)
PackService.refresh(name)already exists — but it onlygit pulls the cache.That is not enough: the live daemon holds the pack loaded in-memory
(
installPack(loadPack(...))at boot / install), so a pull alone updates thefiles while the running pipeline keeps the OLD pack. A refresh that only pulls
would look like it worked and silently do nothing to a live run.
So the verb must pull AND reload: for each installed pack whose
registry === name, re-runloadPack(entry.dir, {trusted}) → installPackandre-link skills (respecting the trust gate from #233 — an untrusted pack still
does not link). Reply with the refreshed
pack.listresult like every othermutating pack verb.
Sketch
PipelineRegistryRefreshMsg { type: "pipeline.registry.refresh", name?: string }(omitname= all); reply reusespipeline.pack.list.result.refreshRegistry(name?)=refresh()(pull) + reload each installed pack from that registry into the live manager +#linkSkillswhen trusted.#registryRefreshhandler behind#packManageGuard.state/packs.ts):refreshRegistry(name)action (existing dispatch pattern).PackBrowser.tsx): refresh button per installed registry, in-flight spinner.Notes
Related