Repository navigation
0.0.7
version: "0.0.7" was introduced alongside the Kubernetes charm, so this entry
covers everything released since 0.0.6.
Features
- Add a Kubernetes standalone charm (
jaime-k8s) that runs as its own pod and monitors other applications in the same Juju model. Monitoring is opt-in viawatch-applications— empty means nothing is monitored, never "all applications" - Read k8s workload statuses from the Juju controller API (
Client.FullStatus) using a dedicated read-only Juju user, since a unit's own agent identity lacksModelRead - Fetch a watched application's live Juju config via
Application.Get, including which options the operator changed - Collect pod logs, events, and metrics through the Kubernetes API using the pod's in-cluster service account — no
kubectlbinary - Ship
jaime-k8s-rbac.yamlgranting read access topods,pods/log,events, and metrics - Add AI token usage and cost tracking: one
usage_logentry per LLM call, preserved across incident episodes, aggregated with a per-model breakdown by the newshow-usageaction - Add a
get-suggestionaction with anadditional-contextparameter injected into the prompt as authoritative. Suggestions are cached on the incident and regenerated only when that context or the model changes - De-duplicate repeated log lines by normalised pattern, so a health check failing every few seconds collapses to one entry before reaching the AI provider
- Add socket statistics (
ss -antlup) and firewall rules (iptables, ufw, nftables) report sections
Changes
- Restructure into a monorepo: a shared
jaime-package/library,charms/machine/, andcharms/k8s/, each vendoring the library at pack time.jaimeis a namespace package, so shared and charm-local modules merge at runtime - Extract
CoreMixin(core.py) with the substrate-independent behaviour — provider wiring, secret resolution, suggest/act invocation, usage tracking, shared action handlers, and the incident lifecycle state machine. Machine charm 835 -> 262 lines, k8s charm 684 -> 188 - Extract shared log helpers into
logutils.py - Pass the Gemini API token as an
x-goog-api-keyheader instead of a URL query parameter, to keep it out of proxy logs - Accept either a Juju secret URI or a plain string for
api-tokenandjuju-api-password - Write the status state file atomically via a temp file and rename
- Reduce the default
log-window-minutesfrom 120 to 30 - Report Juju's raw status timestamp as
status_sincein the incident events, alongside the Jaime-anchoredfirst_seen - Add
status-sinceto theshow-statusaction output - Remove dead code: the Ops tracing report section and the unused
UsageMetadata.__add__ - Sync
ARCHITECTURE.mdandTASKS.mdwith the implemented state. Restructure the roadmap into eight phases, splitting AI-assisted diagnosis (Phase 2, implemented) from assisted remediation (Phase 4, future) and inserting Kubernetes/multi-substrate support as Phase 3 - Document a two-signal health model in
ARCHITECTURE.md: Juju workload status is the current incident trigger, but a workload can be broken while Juju still reportsactive, so workload-health checks may trigger incidents in future
Bug fixes
- Anchor the incident timer to a Jaime-owned
unhealthy_sinceinstead of Juju'ssince. A charm retrying in a loop re-sets its workload status on every hook, which bumpssinceand previously reset the timer, sofailure-timeout-minuteswas never reached and no incident was ever opened - Treat a continuous run of watched statuses as one episode. Flapping between two watched statuses (e.g.
maintenance<->blocked) no longer clears the open incident and cooldown, so it cannot produce repeat reports for a single failure - Start the log-collection window at
unhealthy_since, so the causal error at the beginning of a failure is inside the collected window - Persist the observation increment on every observe. Each hook is a fresh process, so writing only on episode change meant the increment was reloaded from disk and never advanced past 2
- Add the missing
Incidentimport to the machine charm, which raisedNameErroron every hook - Stop
config-changedfrom overwriting an open-incident display status with a plain "Ready" - Encapsulate
StatusTracker.reset()instead of mutating internal state from the charm - Sort Kubernetes events safely when
lastTimestampandfirstTimestampare both absent - Remove the
subordinateflag from the k8s charm, which is standalone