Test it locally¶
The Node kit is the sdk/ folder of the example plugins (where to get it), and it is
also on its own in kinotvapp/kino-plugin-sdk:
run.mjs (run one function), validate.mjs (check a plugin the way Kino does), init.mjs (scaffold
a new one), kino-shim.mjs (the kino API in Node), contract.mjs (the rules, read from
contract.json), seal.mjs (seals a secret for your manifest, and --keygen/--sign for a signed plugin) and
guide-tables.mjs (regenerates the guide's tables) and ui-tables.mjs (regenerates the screen components' tables). There is nothing to
install. It needs Node 18 or newer (checked on 18.20, 20.11 and 24.14); node --test sdk/test/kit.test.mjs
runs its own tests.
node sdk/run.mjs ./plugin.js search "metropolis"
node sdk/run.mjs ./plugin.js home
node sdk/run.mjs ./plugin.js browse films 2
node sdk/run.mjs ./plugin.js episodes 'Dragnet1951'
node sdk/run.mjs ./plugin.js resolve 'Dragnet1951|Dragnet/Season 1/Dragnet (1951) - S01E01 - The Human Bomb.mp4'
The first argument is your entry file (or the folder that holds kino-plugin.json), then the
function, then its argument: the text to search for, the ref for episodes and resolve, or the
ref and an optional cursor for browse. The runner reads your manifest, provides the kino
global, calls that one function the way Kino does, checks the answer with the app's rules and
prints what Kino would keep as JSON on stdout; every entry Kino would drop is reported on stderr with
the reason (--raw prints your answer untouched). Logs, console.* and errors go to stderr, so you can
pipe the result (... | head -30, ... | jq). The exit code is 0 on success, 1 when your code
throws and 2 when the command is wrong. The runner only runs functions your manifest declares.
--config key=value(repeatable) sets a setting; the runner also readssdk/config.json({ "server": "http://192.168.1.10:8096", "user": "ana" }; keep it out of git). A required setting with no value stops the run withauth_required, as in the app.--record fixtures.jsonsaves everykino.fetchanswer;--replay fixtures.jsonanswers from that file only, with no network. Record once, then your tests run offline and always the same (the scaffold'stest/plugin.test.mjsdoes exactly that).--device tv|phone(orKINO_DEVICE=tv) sets whatkino.devicesays, to try the TV side of your plugin; the default is"phone". Any other value stops the run.KINO_TYPE=movie|series|music|podcast|anysets thetypeof the search (defaultany;musicandpodcastare apiVersion 8, Kino 0.9.54).- To fill the other fields of the query, pass the whole query as JSON:
node sdk/run.mjs ./plugin.js search '{"q":"dragnet","type":"series","year":1951}'(season,episode,tmdbIdandyearare0otherwise). - Under the Node kit
kino.storageis a file named.kino-storage.jsonand the cookie jar.kino-cookies.json, both next to your manifest. Add them to your.gitignore. Delete them to start from scratch. A plugin withsecretsalso reads.kino-secrets.jsonfrom the same folder (below).node sdk/init.mjsalready lists all three in the scaffold's.gitignore. node sdk/validate.mjs <folder>checks the manifest with every rule of the manifest (the same Spanish messages the app shows) and that each declared capability is exported, and prints the consent sheet's extra lines as the person will read them (the red ones, aninsecureHttphost,"liveStreamHosts": "any"or"streamHosts": "any", marked "(en rojo)";secretsadds "Usa datos sellados por su autor", with a note that only the app can check which repository they were sealed for);--run <function> [argument]also runs it and lists what Kino would drop. With--run liveCategories, every declared playlist is downloaded and parsed too: one that cannot be downloaded or parses to 0 channels is a problem, and its discarded entries are listed. With--run meta <ids>it asks yourmeta(below).--run section [tab],--run categories,--run settingsStatus,--run action <key>and--run validateSettings '<json>'(apiVersion 6) run them asrun.mjsdoes and as the app reads them: the section and categories with their drops, each status line and its missing ones, what an action shows (and whether it refreshes or clears settings), and whether the save is accepted. A call the app never makes is a problem: no"section"in the manifest,categorieswithout apiVersion 6 andbrowse, an action key noactionsetting has, a function not exported, or avalidateSettingsanswer Kino cannot read. Exit code 0 means Kino would accept it.- The
sdk/folder does not have to live in your repository. Copy it anywhere and runnode /path/to/sdk/run.mjs ./plugin.js .... - A stack trace names a temporary
plugin.mjs: the runner loads a copy of your file so that Node treats it as an ES module whatever its version andpackage.jsonsay. The line numbers are yourplugin.js's.
Copy the kit into a new plugin¶
A repository made with Use this template already has the kit. When you start from node sdk/init.mjs instead, copy the
kit next to the new plugin's kino-plugin.json: the folder sdk/ and the file contract.json (the kit looks for it next to
sdk/: both are required; kino.d.ts is optional, only for your editor's typings, since the kit never reads it). Leave out sdk/test/: those are the kit's own tests (more than 60 files),
useless in a plugin, and a bare node --test would run them. Copy without it, or delete it afterwards:
cp -r kino-plugin-sdk/sdk kino-plugin-sdk/contract.json kino-plugin-sdk/kino.d.ts my-plugin/
rm -rf my-plugin/sdk/test # PowerShell: Remove-Item -Recurse -Force my-plugin\sdk\test
A plugin made from a template carries sdk/test/ too: delete it the same way. Nothing in sdk/ reads sdk/test/ when it
runs; your plugin's own tests live in test/, and you run them by name (node --test test/plugin.test.mjs).
Sealed secrets (apiVersion 4)¶
The kit can never open a seal: it has no private key. So it reads the plain values straight from
.kino-secrets.json next to your manifest ({ "apiKey": "..." }; keep it out of git, as the
scaffold's .gitignore does) and simulates every rule of kino.secret: the
markers, the substitution inside kino.fetch, the manifest-hosts-over-https check on every hop, the
kino.crypto restrictions and the redaction of what comes back. --record never writes the plain
value to a fixtures file either: a canonical placeholder stands in for it, so a committed recording
never carries a secret however it is replayed later.
To make the seal itself: node sdk/seal.mjs --repo owner/repo --name apiKey, then type the value at
the hidden prompt (or pipe it on stdin). Seal for the repository people will install from, and test
the sealed build in the app installed from its default branch, with no @ref
(why).
Signed plugins (apiVersion 5)¶
validate.mjs checks a signed plugin the way Kino does: the signature field's shape,
the signature itself against your entry file (--repo owner/repo[/folder], or the folder's GitHub
origin when you omit it), that no *.pem is tracked by git, and it prints the author key's
fingerprint and the consent line "Firmado por su autor". It also refuses "entry": "./plugin.js"
(Kino 0.9.45 and older do not install it) and warns when hosts has more than 20 entries (Kino 0.9.44
and older refuse that). Sign again after every change to the entry file or the version.
Live channels (apiVersion 3)¶
The channels exports run through live, with the plugin folder first:
node sdk/run.mjs . live categories
node sdk/run.mjs . live channels noticias
node sdk/run.mjs . live channels noticias 2
node sdk/run.mjs . live guide canal1,canal2
node sdk/run.mjs . live search noticias
node sdk/run.mjs live playlist https://iptv-org.github.io/iptv/countries/co.m3u
node sdk/run.mjs live playlist ./lista.m3u --epg ./guia.xml.gz
live categoriescallsliveCategories()and prints what Kino keeps. Then, for each{ playlist }in the answer, it downloads the list as the app would (yourheaders, yourhostsor the person's server only, every redirect too) and prints, on stderr, the same summary aslive playlistand the list's groups as the categories people will see.live channels <categoryId> [cursor]callsliveChannels({ categoryId, cursor }), then plays the first channel that has arefand nostreamthe way Kino would: it sends thatreftoresolve()and checks the answer as a live channel's (so"liveStreamHosts": "any"applies). Withvalidate.mjs --run liveChannels, a refused answer there is a problem.live search <query>callsliveSearch({ query }), prints the channels Kino keeps (at most 100) and plays the first one with areflikelive channelsdoes.resolve <ref> --livechecks aresolve()answer as a live channel's. Without--livethe kit cannot know therefis a channel's and applies the strict rule; when only that stops the URL and your manifest has"liveStreamHosts": "any", it says "si este ref es de un canal en vivo, prueba con --live".live guide <id,id>callsguide()with those ids and a 24-hour window starting two hours ago.live playlist <url|file>needs no plugin: it reads any M3U list with Kino's own rules and printsN canales en M categorías; K entradas descartadas; L ocultas (adultos), the categories, and the first 20 channels asgroup › name url. With--epg <url|file>it also shows what each of those 20 has on now, or "sin guía". A guide that declares a DOCTYPE is refused, as in the app, and the command says so: "La guía declara un DOCTYPE; Kino la rechaza por seguridad". Use it on a list before you write a line of plugin.
The kit reads lists and guides with sdk/live-playlist.mjs, a copy of the app's readers pinned to
the same test files (docs/plugins/fixtures/live in Kino's repository): what it keeps is what Kino
keeps.
What's new in apiVersion 6¶
node sdk/run.mjs . section [tab] # needs "section" in the manifest
node sdk/run.mjs . categories # needs the browse capability
node sdk/run.mjs . theme # your colors, their contrast ratios and fallbacks
node sdk/run.mjs . settingsStatus
node sdk/run.mjs . action logout
node sdk/run.mjs . validateSettings '{"email":"ana@x.co"}'
node sdk/run.mjs --within '<ref>' ./plugin.js search "texto" # scopedSearch
node sdk/run.mjs ./plugin.js sign '{"url":"https://cdn.example/seg.ts","kind":"segment","ref":"<ref>","context":"<signContext>"}'
node sdk/run.mjs --retry conflict:1 ./plugin.js resolve '<ref>' # or conflict:1:409
node sdk/validate.mjs . --run liveSearch noticias # 18+ marks on liveSearch hits
node sdk/run.mjs ./plugin.js migrate '{"kind":"title","ref":"<old ref>"}'
run.mjs shows what Kino would drop as [dropped by Kino] (clearSettings, alternateHosts), prints
what the person would read for a userMessage (or why it would not be
shown), and validate.mjs warns about debug before publishing, about a scopedSearch that never reads
within and about a plugin that uses kino.crypto's key pairs without "apiVersion": 6. The pages:
The settings form, Signing every request,
Moving saved titles, Section, categories and colors,
Logs and telemetry.
Describing titles (meta)¶
node sdk/run.mjs . meta tt1254207 tmdb:10378 # apiVersion 6, "meta": Kino's verdict field by field and the info page
node sdk/validate.mjs . --run meta tt1254207 # the same, as a check; null is a note, not a problem
meta <ids> [movie|series] calls your meta() with the query Kino builds for a title another source listed,
{ type, ids: { imdb?, tmdb?, kitsu?, mal?, anilist? }, id?, lang? }: tt… is ids.imdb, tmdb:N ids.tmdb, and
kitsu:N, mal:N, anilist:N set that id and the query's id (the source's own id, as for a Stremio anime);
lang=xx (default KINO_LANG, else es), id=<source id>, or the whole query as JSON. It never takes a ref: Kino
describes a title by its ids, whatever plugin listed it, and asks nobody about a title with none. The call gets Kino's
6 s; past them the kit stops waiting, as the app does. On stderr: the query, your answer as you returned it, Kino's
verdict field by field (✓ kept, ~ cut or partly kept, ✗ dropped, · absent, - ignored, with the reason for each
dropped entry), then how the info page would use it; on stdout, what Kino keeps (null when it is no answer). If the
manifest declares meta and the entry does not export it, the runner says Kino refuses the install. A shortened run
against the own-server reference plugin (Tu servidor 1.5.0, its server.mjs running):
$ node sdk/run.mjs --config server=http://192.168.2.13:18096 --config user=ana --config password=s3cr3t . meta tt1254207 tmdb:10378
meta({"type":"movie","ids":{"imdb":"tt1254207","tmdb":10378},"lang":"es"})
the plugin answered:
{ … }
Kino's verdict, field by field:
✓ title kept: 14 characters; the page keeps the source's own title, this one is not shown
✓ overview kept: 73 characters; shown as the synopsis when TMDB and AniList have none (HTML tags stripped)
✓ poster kept: http://192.168.2.13:18096/img/poster/bbb.png (a server the person typed); used when the page has no poster
✓ year kept: 2008
✓ genres kept: 2 of 2: Animación, Comedia
✓ runtimeMinutes kept: 10; shown only for a movie (a series' runtime is per episode)
· episodes absent: not given
✓ ratings kept: 2 of 2: imdb 6.4, letterboxd 3.4/5
✓ cast kept: 2 of 2
{ … }
How the info page would use it (only where TMDB and AniList left the part blank; their values always win):
info line: ★ <the page's score> · IMDb 6.4 · Letterboxd 3.4/5 · 2008 · 10 min
synopsis: Un conejo enorme y tranquilo contra tres roedores que no lo dejan en paz.
…
A dropped part reads like ✗ backdrop dropped: 192.168.1.4 is a private, local or reserved IP address: never the home network,
and a list with bad entries like ~ ratings partly kept: 3 of 4: … followed by one line per entry. The same rules
run on the app's own test vectors (docs/plugins/fixtures/meta/vectors.json in Kino's repository), so what the kit keeps
is what Kino keeps.
validate.mjs --run also chains meta: with --run search, browse, home or section and the meta capability, your
meta is asked about the first title of the answer that carries ids.imdb or ids.tmdb (the way Kino builds the
query); what it drops is listed, and a throw or a timeout past 6 s is a problem.
kino.meta and kino.tmdb (Kino 0.9.53)¶
Both work in every function the runner calls, through the kit's stand-ins (any apiVersion):
KINO_META_FIXTURE=meta.json node sdk/run.mjs . home # kino.meta answers from meta.json; without it, null
KINO_TMDB_KEY=<your TMDB key> node sdk/run.mjs . home # kino.tmdb asks TMDB with YOUR key where Kino uses its own (or "tmdbKey" in sdk/config.json)
KINO_TMDB_FIXTURE=tmdb.json node sdk/run.mjs . search matrix # kino.tmdb answers offline from tmdb.json
meta.jsonmaps"<type>:<idKey>:<value>"or"<idKey>:<value>"("movie:imdb:tt0133093","tmdb:1399") to an answer; the first id of the query with an entry answers, elsenull(Kino's own TMDB/AniList lookup and the person's other plugins do not exist in Node).tmdb.jsonmaps"<path>?<params sorted by name, URL-encoded>"or just"<path>"to TMDB's body ("/trending/movie/week?language=es-MX"); a fixture stands in for TMDB and for a key, and a path it lacks answersnot_found.- Your key stands in for Kino's own, under Kino's limit for its key (20 calls per 10 s); the kit has no person's key to
fall back to, so past that limit it throws
rate_limited. - Without a key or a fixture,
kino.tmdbthrowsno_tmdb_key, as a Kino build without a key of its own does for a person who has none, and the runner prints the sentence Kino would show. Your key is never printed. - Validation, rate limits, the cache and the error codes are the app's (
kino.meta,kino.tmdb);node sdk/validate.mjswarns when your code calls either withouttypeof kino.<name> === "function"(older Kino has neither). Samples of both files are indocs/plugins/fixtures/kino-services/of Kino's repository.
kino.device and kino.seed (Kino 0.9.55)¶
The kit has both. kino.device is "phone" unless you pass --device tv (or set KINO_DEVICE=tv), so you can run your
plugin once as each. kino.seed sends nothing anywhere: it applies the same filter as the app
(the contract's kinoSeed keys and limits) and logs which keys Kino would keep, never their values, because they are
tokens; with no "telemetry" in your manifest the line says the app would send nothing.
apiVersion 13 (Kino 0.9.74)¶
The kit knows apiVersion 13, which Kino supports from 0.9.74 (What's new):
validate.mjs checks the six new capabilities (each refused below 13, read required with byteSource and image
with imageSource) and the settings form's qr type with its refreshMs. What each one does in the kit:
kino.wsruns over Node's globalWebSocketwith the app's rules:wss://only, a declared host on port 443, no IP literal or local name, 4 sockets, the frame cap,hex/base64frames accepted and refused word for word like the app. SwapglobalThis.WebSocketfor a fake to test offline (an example).byteSource:run.mjs . resolveaccepts a{ source: "plugin", handle, size, mime }answer with the app's rules;node sdk/run.mjs --size <total bytes> . read <handle> <offset> <length>calls yourreadas Kino's proxy does and prints the byte count, the sha256 and the first bytes;askRead(plugin, manifest, stream, offset, length)does the same from a test (Sockets and plugin-served bytes).kino.catalogis the app's catalog in memory, for one run: the same answers and errors (both run the same shared test vectors), with the file size estimated instead of measured.storageLargegiveskino.storagethe 16 MB, 2 MB per value and 1,000-key limits of the app.kino.qr.scanneeds a fake:createKino(manifest, { qrScan: async ({ title }) => "text" }); without one, or with--device tv, it fails withunavailable. It checks where the call comes from like the app (QR codes).imageSource:checkOutputkeeps or drops a reference like the app, andaskImage(plugin, manifest, ref)fromsdk/kino-shim.mjsasks yourimagethe way Kino does (Images from the plugin);node sdk/run.mjs --out poster.jpg . image <handle>writes what it answers.kino.crypto's byte operations (aesIge,aesIgeVerify,modPow,gunzip,convert) give the app's answers. They depend on the Kino version, not on your manifest, so the kit offers what its own contract has: feature-detect each one in your plugin (typeof kino.crypto.convert === "function").init.mjs --with byteSource,images,catalog,socket(any of them) scaffolds an apiVersion 13 plugin that declares those capabilities, with a working, commented example of each (read,image,kino.catalog,kino.ws).
apiVersion 14: screens, panels, jobs and shared results¶
Available with Kino 0.9.74
Available from Kino 0.9.74. The kit knows all of it.
Screens, panels in screen mode, tabs you contribute to another plugin's panel,
background jobs and kino.shared have their own commands:
node sdk/validate.mjs <folder> # the manifest, the exports, every consent line, enhancements
node sdk/run.mjs <folder> screen # the tree as Kino reads it (aliases resolved, drops logged)
node sdk/run.mjs --device tv <folder> screen # as a TV
node sdk/run.mjs --state '{"inputs":{"q":"dune"}}' <folder> screenEvent search
node sdk/run.mjs --context '{"route":{"name":"categories","params":{},"args":{"from":"categories"}}}' <folder> screen
node sdk/run.mjs <folder> panel <ref> # a panel (legacy or screen format)
node sdk/run.mjs --state '{}' --screen <folder> panelAction <ref> <name> press
node sdk/run.mjs --foreign latino:Latino <folder> panel <ref> # a tab you contribute to another plugin's title
node sdk/run.mjs --device phone <folder> job refresh manual # one job run, with Kino's caps
node sdk/run.mjs --device tv <folder> screen # ...then read what the job shared, as the TV
node sdk/run.mjs <folder> shared # what the simulated phone and TV hold
run.mjs prints the tree after Kino's rules (with the older names Kino reads internally, the per-size values resolved in
byClass), every dropped node and field, and the answer's fields; validate.mjs checks the tree and go objects like
the app, and reports every enhancements block Kino would drop as a problem. The environment
variables KINO_LIBRARY_FIXTURE, KINO_LIBRARY_REVOKED, KINO_ROOM_REVOKED, KINO_PLAYER_CONTROL_REVOKED,
KINO_AI_REPLY, KINO_AI_ERROR and KINO_AI_REVOKED play the person's data and choices. In node --test files,
import the kit's helpers (createKino, createKitRoom...) as the examples' tests do
(kino-plugin-news,
kino-plugin-watch-party). The shared case files in sdk/test/
(screen-cases.json, room-cases.json, job-cases.json, ai-cases.json, shared-cases.json,
player-control-cases.json, panel-foreign-cases.json, qr-origin-cases.json) are the very cases the app's tests
run. More in Screens: testing with the kit.
apiVersion 15: identity, notices and stores¶
Arrives with Kino 0.9.77. The kit already checks and runs all of it with the app's rules:
identity:kino.identity.telegramanswers with a fake account:KINO_IDENTITY_TG=<id|none>,KINO_IDENTITY_TOKEN,KINO_IDENTITY_AUTHORandKINO_IDENTITY_REVOKED=1. Only inside a call the person started (screen,screenEvent,panelAction). The kit gives thetokento any author, like a debug build of Kino. Identity.notifications:kino.notifications.postandclearwrite to<folder>/.kino-notices.json;node sdk/run.mjs . notificationsprints it andKINO_NOTIFICATIONS_REVOKED=1simulates the person switching it off. Notices in the bell.pluginStore:node sdk/run.mjs <folder> storeSync [--since <ms>] [--state '<json>'],storeList [popular|recent] [category]andstoreSearch "<q>" [category]print the answer as Kino's index would keep it and tell you on stderr what Kino would drop.node sdk/init.mjs my-store --store local|livescaffolds a store. Plugin stores and Example stores.kino.library: on a watched series,seasonandepisode(the latest chapter played, only when its source numbered it); never on a movie. WithKINO_LIBRARY_FIXTURE.
apiVersion 16 to 18: coins, your month and app themes¶
kino.coins(apiVersion 16): a pretend balance with the app's gates (the capability, the calling export, 30 calls a minute).KINO_COINS_BALANCE=<n>sets the starting balance (5 by default; eachgivelowers it by one),KINO_COINS_DISABLED=1is the person's Kinos switch off (disabled) andKINO_COINS_REVOKED=1a revoked approval (permission_denied).kino.coins.kino.library.stats(apiVersion 17): answered fromKINO_LIBRARY_FIXTURElikewatchedandsaved;KINO_LIBRARY_REVOKED=1simulates the switch off. A screen'senableJobanswer is checked (run.mjssays on stderr when Kino would drop it, for example below apiVersion 17).appThemes(apiVersion 18):node sdk/validate.mjs .checks the format with the app's parser and prints each theme's warnings for the phone and the TV (appThemes <id> (tv): …; Kino's is used).node sdk/run.mjs --context '{"activeTheme":"<id>"}' . screendraws your presentation screen with a theme on, andscreenEvent <name> --trigger tapsays what Kino does with ago.useThemeorgo.setExperiencein the answer. The kit draws no colours: check the look in Kino. App themes.
apiVersion 20: the plugin protocol¶
The whole workflow, with examples, is in the plugin protocol. In short:
- Scaffolds:
node sdk/init.mjs my-provider --kind provider(provides-only, a door with a call and a stream, its test) andnode sdk/init.mjs my-consumer --kind consumer --repo owner/name --door <door> --call <call>(a screen-only consumer,"hosts": []: a screen with the install gate, one compact bar, a detail route, the error codes and a stream switch, tested againsttest/provider: a stand-in with the same door and call names, to replace with a copy of the real provider).node sdk/init.mjs --helplists the options;--host <a host the screen really fetches from>adds one, only if it fetches (the consumer'shosts). - A provider on its own:
node sdk/run.mjs <provider folder> proto <door>.<call> '<arg json>'andproto <door>.<stream> ['<cursor json>']go through the app's checks and error codes. Exit 0 with the answer, 1 with✗ <code>: <message>, 2 for a wrong command. - A consumer against a provider folder:
node sdk/run.mjs --context '{"installed":{"kinotvapp/kino-plugin-tmdb":true}}' --provider ../kino-plugin-tmdb ./cine-trivia screenEvent playanswers everykino.plugins.callfrom the provider'sproto_<door>_<call>exports, with the app's types, sizes, error codes and rate limits.--providercan be repeated; without it every call rejects withprovider_missing. Withoutinstalleda gated consumer does nothing. - A stream:
... screenEvent protocol tmdb.trendingpolls the stream once and sends theprotocolevent{ alias, stream, items };--cursor '<json>'polls from a cursor the provider already returned (try repeated items). - A route and a typed value:
--context '{"installed":{…},"route":{"name":"detail","params":{"id":1}}}'draws a pushed route;screenEvent search "" '"tomate"' --trigger submitsends a field's text (the value is the third word, JSON). - Error codes: the kit provokes only
provider_missing(no--provider) andprovider_failed(the provider throws); the other codes are tested by drawing them,--state '{"error":"timeout"}'(which codes). - Was a prop accepted? The printed tree does not echo every flag (
denseis not printed); a wrong value prints a· dropped:line (appBar dense "yes" is not true or false, ignored), so nodroppedline means it was accepted, and--rawshows the tree as your plugin returned it. - The install gate:
screengetsinstalledwith everyrecommendsentryfalse;--context '{"installed":{"kinotvapp/kino-plugin-tmdb":true}}'draws it as if the provider were installed. - The English texts:
--lang en(the same as"lang": "en"in--context).run.mjsprints the Spanish ones otherwise. - The manifest:
node sdk/validate.mjs .checksprovidesandconsumes, at the top level and insideenhancements["20"], like the app; a declared call or stream without itsproto_export fails it, and it warns about a consumed repository missing fromrecommends, aneverySecondsoutside 30..86,400, aprovidesOnlyfield and a placeholder host (example.com,*.example.com,example.org,.test,.invalid,.example; a screen-only consumer is told to declare none,"hosts": []). - The kit serves a
consumesentry with the first provider that has the door (it has no repositories, so it never checks yourrepo), and it does not apply the 18+ rule, the sealed-secret check nor the self-call refusal: see the plugin protocol and What the kit cannot copy.
apiVersion 22 and 23: progress and the player slot¶
kino.progress (apiVersion 22) keeps its elements in memory for the run, with Kino's checks and error codes. The player slot
(apiVersion 23) has its own two commands, with the same context switches as a panel:
node sdk/run.mjs <folder> playerSlot [ref] # the frame Kino keeps: declared order, refreshMs clamped
node sdk/run.mjs <folder> playerSlotAction <ref> <button id> # what Kino does with a press: { openPanel, player, controlled }
node sdk/run.mjs --bare <folder> playerSlot # the context of a title Kino cannot share (no kind)
node sdk/run.mjs --live-channel tdt:la1:La 1 <folder> playerSlot - # an En vivo channel
validate.mjs checks the slot block and the two exports and prints the red line of a fixed element. See
The player slot.
Kino 0.9.88: getting ready ahead, live by clock¶
node sdk/run.mjs <folder> prepare <ref> # runs prepare(ref): what Kino does with it, or why it never calls it
node sdk/validate.mjs <folder> # notes what "resolveAhead": true and an exported prepare mean, and warns
prepare <ref>runs yourpreparewith thatrefand prints what Kino does with it (its answer is ignored), or warns that Kino never calls it (beside"resolveAhead": true,catalogOnlyorbrowser, or without theresolvecapability); past 15 s it warns that Kino stops waiting there.validate.mjswarns about aresolveAheadthat is nottrueorfalse, or that sits besidecatalogOnlyorbrowser, in the words the app logs, and notes what atruethat stands means. It does not check the rest of the rule: Kino resolves ahead only with an approved"fetchHosts": "any"and video from any server (Getting a title ready ahead).kino.pluginApiVersionis your feature apiVersion: yourapiVersionor the highestenhancementskey the kit applied.clockLiveis not modelled yet:resolvechecks the plainurl(Live by clock).
What the Node kit does not reproduce¶
Kino is the authority; the kit only approximates it so you can iterate fast. Before you publish, install the plugin in the app and try it there. The differences:
kino.html.selectthrows (it uses Jsoup, which exists only in the app).- The kit's XMLTV reader is a tolerant regex walk, not the app's XML parser. It gives the app's answer on every shared test guide, but on malformed XML in mid-document it may keep more than the app (which stops at the first error and keeps what it read up to there).
- The rejection trap of Limits and engine quirks: Node catches what Kino 0.9.49 and older would not.
- The globals Kino lacks (
setTimeout,fetch,Buffer, ...) are missing in the kit too: your plugin runs in an isolated environment that holds only what Kino provides (KINO_SDK_NO_SANDBOX=1turns it off for debugging). Kino'sURLhas no punycode. - The host, redirect and request-count rules are the same, and so are the cookie rules as far as Node's own parsing goes, but there is no refusal of names that resolve to private addresses, bodies are always read as UTF-8, and the 15 s timeout covers the wait for the response but not the download.
- The kit never asks about a host: an undeclared one fails as
host_not_allowedeven duringresolveorepisodes, where the app could ask the person. It has no broad video permission either;"streamHosts": "any"it does apply. - The per-call time limits, the memory limit and the size caps on requests, answers and selectors
are not enforced, except
meta's 6 s (Kino gives up silently there, so the kit says so). kino.browser.captureandkino.browser.pagealways answerbrowser_unavailable(Hidden browser). The kit'skino.browser.captureAllistrueand it checks the Kino 0.9.54 capture options as the app does (invalid_request) before answering that.kino.langis always"es-CO"; the app's follows its language from Kino 0.9.54 (kino.lang).- There is no
detailscommand: try thedetailsexport (apiVersion 8, Kino 0.9.54) on a movie page in the app.