feat(cloud): emit skillPackAcks in heartbeat (V2 capability-visibility)#1328
Merged
Conversation
…lity flip
Pairs with reflectt-cloud PR #3206 (kai lock msg-1777866649814).
On each /capabilities/context fetch, record {provider, version, fetchedAt}
per skill pack the cloud surfaces. sendHeartbeat() forwards the cached
acks under skillPackAcks.acks; cloud uses them to flip
skillPack.injectionStatus from 'pending' to 'active' when provider+version
match the registry and the ack is < 5 min old.
Process-local cache (no persistence). Empty acks → field omitted from
heartbeat body, so older cloud builds without parser are unaffected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
syncCapabilityContext()now readsskillPacks: [{provider, version}]from cloud/capabilities/contextresponse and caches{provider, version, fetchedAt}per pack.sendHeartbeat()forwards the cached acks underskillPackAcks.acks. Cloud flipsinjectionStatusfrompendingtoactivewhen provider+version match the registry and the ack is < 5 min old.What changed
src/cloud.ts: addedskillPackAcksMap +getSkillPackAcksForHeartbeat()helper, populated insyncCapabilityContext(), conditionally emitted fromsendHeartbeat()body.Out of scope
/capabilities/contextfetch — within 1-2 ticks (~10-30s) acks land. 5-min cloud freshness window covers the gap.Test plan
npx tsc --noEmit— clean/api/teams/:teamId/capabilitiesshowsskillPack.injectionStatus: 'active'for browser pack on team that has a host on this image