Plugins โ
Eighteen official plugins, each installable on any plant:
js
import watering from '@smartplant/watering'
await plant.use( watering )
const { advice, daysUntilWater } = await plant.plugin( 'watering' ).predictWatering()| Plugin | Method | Also does locally, with no AI |
|---|---|---|
๐ง @smartplant/watering | predictWatering() | Reacts to plant:thirsty |
โ ๏ธ @smartplant/alerts | checkAlerts() | Stays silent โ and free โ when nothing is wrong |
๐ @smartplant/history | analyzeTrends() | stats(), series(); reports "unknown" rather than inventing a trend |
โ๏ธ @smartplant/lighting | optimizeLight() | dailyLightHours() |
๐จ @smartplant/ventilation | adjustVentilation() | vpd() โ vapour pressure deficit via the Tetens equation |
๐ @smartplant/stress | detectStress() | chronicScore() โ fraction of 48h spent below comfort |
๐ @smartplant/pests | monitorPests() | identify( symptoms ), logged to care history |
๐ฑ @smartplant/fertilizer | guideFertilization() | Errs toward underfeeding โ burn is harder to undo than deficiency |
๐ @smartplant/diary | logAndSummarize() | The plant writes its own journal, stored in memory |
๐ฎ @smartplant/simulator | simulateConditions() | score(), sweep() โ find where tolerance breaks, instantly |
๐ฌ @smartplant/spectrum | diagnose() | probe(), treat(), doses() โ ๐ต๐ข๐ด interrogation with hard interlocks |
๐งฌ @smartplant/migration | bequeath() | receive(), wouldSuit(), outcome() โ inheritance between plants of one species |
๐จ @smartplant/colony | askPeer() | askAll(), report(), corroborate() โ a channel between plants a person can watch but not enter |
๐ชด @smartplant/transplant | plan() | space(), settling() โ notices the pot filling up months before a person does, and never repots anything |
๐ก @smartplant/thermal | stress() | evenness(), map() โ the whole canopy at once, which one leaf clip cannot see |
๐ก @smartplant/presence | uvbAllowed() | room(), explains() โ the UV-B interlock, and motion as a control on electrical events |
๐ @smartplant/season | ranges() | now(), lastYear() โ bends care to the time of year, and fades as the plant learns its own |
๐ @smartplant/energy | forecast() | plan(), canTravel() โ what runs off a panel and a battery, and what sleeps |
Writing your own takes one function:
js
import { definePlugin } from 'smartplant'
export default definePlugin( {
name : 'repotting',
persona : 'botanist',
schema : { advice : '', urgency : 'low' },
on : {
async 'plant:stressed'( event ) {
console.log( await this.whenToRepot() )
},
},
methods : {
async whenToRepot( input = {} ) {
return this.ask( 'Is this plant root-bound?', { extra : input } )
},
},
} )Inside a plugin, this.plant is the kernel, this.ask() runs a context-injected structured AI call, and listeners detach automatically on destroy().
